-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove setup.py - Switch to pyproject.toml - Update GitHub actions to use poetry - Clean up code a bit according to feedback from flake8 - Update release guide
- Loading branch information
Showing
16 changed files
with
1,173 additions
and
185 deletions.
There are no files selected for viewing
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,8 +1,6 @@ | ||
[run] | ||
source=cassis | ||
omit= | ||
setup.py | ||
cassis/__init__.py | ||
cassis/__version__.py | ||
tests/* | ||
docs/* |
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
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
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,13 +1,50 @@ | ||
.PHONY: docs tests | ||
PYTHON_FILES = cassis tests | ||
|
||
test: | ||
python -m pytest -m "not performance" tests/ | ||
# Dependencies | ||
dependencies: | ||
poetry install | ||
|
||
# Tests | ||
unit-tests: | ||
poetry run py.test --cov=cassis --cov-branch --cov-fail-under=90 tests | ||
|
||
tests: unit-tests integ-tests | ||
|
||
coverage: | ||
poetry run py.test --cov=cassis --cov-branch --cov-fail-under=90 --cov-report=xml:coverage.xml -m "not performance" tests | ||
|
||
# Static analysis/linting | ||
format: | ||
black -l 120 cassis/ | ||
black -l 120 tests/ | ||
black cassis/ | ||
black tests/ | ||
isort --profile black $(PYTHON_FILES) --multi-line=3 --trailing-comma --force-grid-wrap=0 --use-parentheses --line-width=120 | ||
|
||
lint: | ||
# stop the build if there are Python syntax errors or undefined names | ||
poetry run flake8 --select=E9,F63,F7,F82 --show-source $(PYTHON_FILES) | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
poetry run flake8 --exit-zero $(PYTHON_FILES) | ||
|
||
# Docs | ||
docs: | ||
poetry run mkdocs serve | ||
|
||
html: | ||
cd docs && make html | ||
cd docs && make html | ||
|
||
# Building and publishing | ||
build: unit-tests lint | ||
poetry build | ||
|
||
publish: build | ||
poetry publish | ||
|
||
# CI | ||
|
||
ci-publish: | ||
poetry publish --build --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" --no-interaction | ||
|
||
ci-bump-version: | ||
poetry run bump2version patch |
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
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
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
Oops, something went wrong.