icm/Makefile

60 lines
1019 B
Makefile

coverage_opt=--cov --cov-report=term-missing:skip-covered --durations=10
clean:
pipenv --rm
install:
pipenv install
install_dev:
pipenv install --dev
make requirements
run_dev:
git ls-files | entr -r pipenv run python dev.py
tdd:
git ls-files | entr make test opt='$(opt)'
git ls-files | entr make functionnal_tests
refactor_tdd:
make tdd opt="--pdb --ff --lf --ff -x"
watch_db:
watch "sqlite3 sql_app.db 'select count(*) from movies'"
test:
pipenv run pytest $(coverage_opt) $(opt) utests
functionnal_tests:
pipenv run python -m pytest functionnal_test.py
requirements:
pipenv requirements > requirements.txt
pipenv requirements --dev-only > requirements_dev.txt
docs:
cd docs/ && make html
cd docs && firefox ./_build/html/README.html ./_build/html/index.html &
.PHONY: docs
venv_install:
make -f MakefileVenv install_dev
venv_test:
make -f MakefileVenv test
db_clean:
rm sql_app.db && touch sql_app.db
db_fill:
pipenv run python database.py
db_reset: db_clean db_fill