Spaces:
Runtime error
Runtime error
# globals | |
VERSION := $(shell grep __version__ recommendation_app/__metadata__.py | head -1 | cut -d \" -f2 | cut -d \' -f2) | |
## install development requirements | |
requirements-dev: | |
@python -m pip install -U -r requirements.dev.txt | |
## install prod requirements | |
requirements-minimum: | |
@python -m pip install -U -r requirements.txt | |
## install requirements | |
requirements: requirements-dev requirements-minimum | |
## run code style checks with black | |
style-check: | |
@echo "" | |
@echo "Code Style" | |
@echo "==========" | |
@echo "" | |
@python -m black --check --exclude="build/|buck-out/|dist/|_build/|pip/|\.pip/|\.git/|\.hg/|\.mypy_cache/|\.tox/|\.venv/" . && echo "\n\nSuccess" || (echo "\n\nFailure\n\nRun \"make black\" to apply style formatting to your code"; exit 1) | |
## run code quality checks with flake8 | |
quality-check: | |
@echo "" | |
@echo "Flake 8" | |
@echo "=======" | |
@echo "" | |
@python -m flake8 && echo "Success" | |
@echo "" | |
## run code type checks with mypy | |
type-check: | |
@echo "" | |
@echo "Mypy" | |
@echo "=======" | |
@echo "" | |
@python -m mypy --install-types --non-interactive recommendation_app && echo "Success" | |
@echo "" | |
## run all code checks | |
checks: style-check quality-check type-check | |
## fix stylistic errors with black and isort | |
apply-style: | |
@python -m black --exclude="build/|buck-out/|dist/|_build/|pip/|\\.pip/|\.git/|\.hg/|\.mypy_cache/|\.tox/|\.venv/" . | |
@python -m isort recommendation_app/ tests/ |