-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from Samreay/develop
Updating to python 3.10
- Loading branch information
Showing
139 changed files
with
8,937 additions
and
8,785 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: CICD | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [opened] | ||
workflow_dispatch: | ||
release: | ||
types: [created] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: pip install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
architecture: 'x64' | ||
cache: 'poetry' | ||
- run: make install | ||
- run: make precommit | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: pip install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
architecture: 'x64' | ||
cache: 'poetry' | ||
- run: make install | ||
- run: make docs | ||
- run: make pushdocs | ||
if: | | ||
github.event_name == 'release' || github.ref == 'refs/heads/master' | ||
build_and_publish: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: pip install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
architecture: 'x64' | ||
cache: 'poetry' | ||
- run: make install | ||
- run: make build | ||
- name: Publish | ||
run: make publish | ||
if: github.event_name == 'release' | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,63 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
# Compiled source # | ||
################### | ||
*.com | ||
*.class | ||
*.dll | ||
*.exe | ||
*.o | ||
*.so | ||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
|
||
# PYTHON # | ||
__pycache__ | ||
*.py[cod] | ||
*$py.class | ||
*.py~ | ||
|
||
# PyCharm | ||
.idea/* | ||
# envs | ||
.env | ||
.venv | ||
|
||
# C extensions | ||
*.so | ||
# To use VS code | ||
.vscode | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
# Setup.py build | ||
build/ | ||
develop-eggs/ | ||
*egg-info/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# Sphinx doco | ||
doc/out/** | ||
|
||
# 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/ | ||
.pytest | ||
.pytest_cache | ||
.mypy_cache | ||
id_rsa | ||
*.ipynb | ||
coverage* | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# IPython Notebook | ||
.dmypy.json | ||
dmypy.json | ||
.idea | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.ruff_cache | ||
.cache | ||
profile_default/ | ||
ipython_config.py | ||
__pypackages__/ | ||
.python-version | ||
qodana.yaml | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
**/*.log | ||
**/*tmp* | ||
**/*secret* | ||
**/*.pkl | ||
|
||
# Rope project settings | ||
.ropeproject | ||
doc/examples/* | ||
doc/modules/* | ||
doc/out/ | ||
.vscode | ||
generated/ | ||
.mypy_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-added-large-files | ||
args: ["--maxkb=5000"] | ||
- id: check-toml | ||
- id: check-json | ||
- id: check-symlinks | ||
- id: debug-statements | ||
- id: detect-private-key | ||
- id: check-yaml | ||
args: | ||
- --unsafe | ||
- id: trailing-whitespace | ||
- repo: https://github.com/psf/black | ||
rev: 23.9.1 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.0.292 | ||
hooks: | ||
- id: ruff | ||
args: ["--fix"] | ||
- repo: local | ||
hooks: | ||
- id: tests | ||
name: tests | ||
language: system | ||
types: [python] | ||
pass_filenames: false | ||
entry: poetry run pytest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Guide for contributing! | ||
|
||
1. Please read over the online documentation, or use GitHub discussions to chat if you're unsure about anything. | ||
2. Fork the repo + clone it out | ||
3. I highly recommend either a nix system or using the Windows Subsystem for Linux | ||
4. Install a developer version by running (in the directory you just cloned into): `make install` | ||
1. This should install poetry, dependencies, and a pre-commit hook | ||
2. Verify it all looks good by running `make precommit` | ||
5. Code! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.PHONY: tests docs build | ||
VERSION := $(shell git for-each-ref refs/tags --format='%(refname:short)' | grep -E "^v?[0-9]+\..*" | tail -n1) | ||
|
||
install: | ||
pip install -U pip poetry -q | ||
poetry install --with=dev,test --all-extras | ||
poetry run pre-commit install | ||
poetry run pre-commit autoupdate | ||
|
||
precommit: | ||
poetry run pre-commit run --all-files | ||
|
||
test: | ||
poetry run pytest | ||
|
||
serve: | ||
rm -rf docs/generated/gallery; | ||
poetry run mkdocs serve --clean | ||
|
||
docs: | ||
poetry run poetry version $(VERSION) && poetry run mkdocs build | ||
|
||
pushdocs: | ||
poetry run poetry version $(VERSION) && poetry run mkdocs gh-deploy --force | ||
|
||
build: | ||
rm -rf dist; poetry version $(VERSION) && poetry publish --build --dry-run | ||
|
||
publish: | ||
rm -rf dist; poetry config pypi-token.pypi $PYPI_TOKEN && poetry version $(VERSION) && poetry publish --build -y | ||
|
||
tests: test | ||
|
||
all: precommit tests |
Oops, something went wrong.