Files
OpenMensa-Parser-STW-Potsdam/Makefile
T
f4lco 5ccbf57851 Repair debug entry point after using absolute imports
Using absolute imports broke the debug target due to
a Werkzeug bug:
https://github.com/pallets/werkzeug/issues/461
Solution is to avoid running Flask apps using
"python -m", and to use "flask run". This also
gets rid of the coverage exception for
"__main__.py".
2019-01-27 20:47:27 +01:00

35 lines
717 B
Makefile

RUN=FLASK_APP="stw_potsdam.views" pipenv run flask run
dependencies:
pipenv sync --dev
run:
$(RUN)
debug:
FLASK_ENV=development $(RUN)
test:
pipenv run python -m pytest -v --cov-branch --cov stw_potsdam --cov-report term --cov-report html
test_debug:
pipenv run python -m pytest -v --trace
coverage_publish:
pipenv run python -m coveralls
coverage_report:
pipenv run python -m coverage report --fail-under 90
lint:
pipenv run pycodestyle stw_potsdam tests
pipenv run pydocstyle stw_potsdam tests
pipenv run pylint stw_potsdam tests
clean:
pipenv run python -m coverage erase
rm -rf .pytest_cache .cache
.PHONY: dependencies run debug test test_debug coverage_publish coverage_report lint clean