Files
concrete/Makefile
Arthur Meyre deb7631a3a chore(tools): add mypy_test and mypy_ci target
- update tests that were failing with new mypy check
- mypy_test runs mypy on all .py source files in tests
- mypy_ci runs mypy and mypy_test, mypy is for source i.e. hdk/ only
2021-07-26 18:28:39 +02:00

54 lines
1.2 KiB
Makefile

setup_env:
poetry install
poetry run python -m pip install -U pip wheel setuptools
.PHONY: setup_env
sync_env:
poetry install --remove-untracked
make setup_env
.PHONY: sync_env
python_format:
poetry run env bash ./script/source_format/format_python.sh --dir hdk --dir tests
.PHONY: python_format
check_python_format:
poetry run env bash ./script/source_format/format_python.sh --dir hdk --dir tests --check
.PHONY: check_python_format
pylint:
poetry run pylint --rcfile=pylintrc hdk tests
.PHONY: pylint
conformance: python_format
.PHONY: conformance
pcc: check_python_format pylint mypy_ci
.PHONY: pcc
pytest:
poetry run pytest --cov=hdk -vv --cov-report=xml tests/
.PHONY: pytest
# Not a huge fan of ignoring missing imports, but some packages do not have typing stubs
mypy:
poetry run mypy -p hdk --ignore-missing-imports
.PHONY: mypy
# Friendly target to run mypy without ignoring missing stubs and still have errors messages
# Allows to see which stubs we are missing
mypy_ns:
poetry run mypy -p hdk
.PHONY: mypy_ns
mypy_test:
find ./tests/ -name "*.py" | xargs poetry run mypy --ignore-missing-imports
.PHONY: mypy_test
mypy_ci: mypy mypy_test
.PHONY: mypy_ci
docs:
cd docs && poetry run make html
.PHONY: docs