2020-09-25 15:37:40 +00:00
|
|
|
.PHONY: quality_checks quality style fixup test test-examples docs
|
2019-12-22 20:31:12 +00:00
|
|
|
|
|
|
|
|
# Check that source code meets quality standards
|
|
|
|
|
|
2020-09-25 15:37:40 +00:00
|
|
|
quality_checks:
|
2019-12-22 20:31:12 +00:00
|
|
|
flake8 examples templates tests src utils
|
2020-09-22 09:02:27 +00:00
|
|
|
python utils/check_copies.py
|
2020-08-07 13:18:37 +00:00
|
|
|
python utils/check_repo.py
|
2019-12-22 20:31:12 +00:00
|
|
|
|
2020-09-25 15:37:40 +00:00
|
|
|
quality:
|
|
|
|
|
black --check examples templates tests src utils
|
|
|
|
|
isort --check-only examples templates tests src utils
|
|
|
|
|
${MAKE} quality_checks
|
|
|
|
|
|
|
|
|
|
# Format source code automatically and check is there are any problems left that need manual fixing
|
2019-12-21 14:50:39 +00:00
|
|
|
|
|
|
|
|
style:
|
2020-09-23 02:12:36 +00:00
|
|
|
black examples templates tests src utils
|
2020-08-24 15:03:01 +00:00
|
|
|
isort examples templates tests src utils
|
2019-12-22 20:31:12 +00:00
|
|
|
|
2020-09-25 15:37:40 +00:00
|
|
|
fixup: style quality_checks
|
|
|
|
|
|
2020-09-22 09:02:27 +00:00
|
|
|
# Make marked copies of snippets of codes conform to the original
|
|
|
|
|
|
|
|
|
|
fix-copies:
|
|
|
|
|
python utils/check_copies.py --fix_and_overwrite
|
|
|
|
|
|
2019-12-22 20:31:12 +00:00
|
|
|
# Run tests for the library
|
|
|
|
|
|
|
|
|
|
test:
|
|
|
|
|
python -m pytest -n auto --dist=loadfile -s -v ./tests/
|
|
|
|
|
|
|
|
|
|
# Run tests for examples
|
|
|
|
|
|
|
|
|
|
test-examples:
|
|
|
|
|
python -m pytest -n auto --dist=loadfile -s -v ./examples/
|
2020-08-27 16:25:16 +00:00
|
|
|
|
|
|
|
|
# Check that docs can build
|
|
|
|
|
|
|
|
|
|
docs:
|
|
|
|
|
cd docs && make html SPHINXOPTS="-W"
|