Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo Upgrades #8

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Continuous Deployment

on:
push:
branches:
- main
- master

jobs:
deployment:
runs-on: ubuntu-latest
steps:
-
name: Create release
id: release-please
uses: google-github-actions/release-please-action@v3
with:
release-type: python
package-name: amakihi
-
name: Publish to PyPI
if: ${{ steps.release-please.outputs.release_created }}
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build --verbose
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Continuous Integration

on:
push:
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'

jobs:
pre-commit:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8']
steps:
-
name: Setup code repository
uses: actions/checkout@v2
-
name: Install Pre-Commit
run: |
pipx install pre-commit
-
name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
-
name: Execute pre-commit
run: |
pre-commit run --all-files

tests:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.8']
steps:
-
name: Setup code repository
uses: actions/checkout@v2
-
name: Install poetry & docker-compose
run: |
pipx install poetry
-
name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
-
name: Install Amakihi
run: |
poetry install
-
name: Execute Tests
run: |
poetry run pytest --cov . --cov-report=lcov -s -v
115 changes: 102 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,111 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Sphinx documentation
#docs/_build/
# C extensions
*.so

# setup
amakihi.egg-info/
dist/
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/generated/*.rst
docs/source/generated/*.rst

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# Particular to amakihi
CADC_LOGIN.md
loop_imdiff*
# mypy
.mypy_cache/

# token for working on repo
TOKEN
# VS Code
.vscode/

# cookiecutter stuff, will be fixed later
Makefile
requirements_dev.txt
# MacOS
.DS_Store
96 changes: 96 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
repos:
- hooks:
- args:
- --multi-line=3
- --trailing-comma
- --force-grid-wrap=0
- --use-parentheses
- --line-width=88
id: isort
repo: https://github.com/pycqa/isort
rev: 5.12.0
- hooks:
- args:
- --max-line-length=89
- --max-complexity=15
id: flake8
repo: https://github.com/pycqa/flake8
rev: 6.0.0
- hooks:
- args:
- --py36-plus
id: pyupgrade
repo: https://github.com/asottile/pyupgrade
rev: v3.9.0
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 23.7.0
- hooks:
- additional_dependencies:
- types-attrs
- types-requests
- types-setuptools
- types-PyYAML
args:
- --ignore-missing-imports
- --no-implicit-optional
id: mypy
repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
- hooks:
- args:
- --convention=numpy
- --add-ignore=D104
id: pydocstyle
repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
- hooks:
- id: blacken-docs
repo: https://github.com/asottile/blacken-docs
rev: 1.15.0
- hooks:
- exclude: ^docs/*
id: trailing-whitespace
- exclude: ^docs/*
id: end-of-file-fixer
- id: debug-statements
- id: check-case-conflict
- id: check-json
- args:
- --unsafe
id: check-yaml
- id: mixed-line-ending
- id: check-toml
- id: pretty-format-json
- id: check-docstring-first
- id: check-symlinks
- id: detect-private-key
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
- hooks:
- args:
- -iii
- -lll
id: bandit
repo: https://github.com/PyCQA/bandit
rev: 1.7.5
- hooks:
- additional_dependencies:
- radon
args:
- cc
- --min=C
- --total-average
entry: radon
id: radon
language: python
name: radon
verbose: true
repo: local
- hooks:
- id: commitizen
stages:
- commit-msg
repo: https://github.com/commitizen-tools/commitizen
rev: 3.5.3
9 changes: 9 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Credits

## Development Lead

- Nicholas Vieira \<<[email protected]>\>

## Contributors

None yet. Why not be the first?
13 changes: 0 additions & 13 deletions AUTHORS.rst

This file was deleted.

Empty file added CHANGELOG.md
Empty file.
Loading