2021-04-21 22:37:06 +02:00
|
|
|
.PHONY: clean-pyc develop lint test coverage
|
2014-02-07 16:20:27 +01:00
|
|
|
|
|
|
|
help:
|
|
|
|
@echo "clean-pyc - remove Python file artifacts"
|
2021-04-21 22:37:06 +02:00
|
|
|
@echo "develop - install development dependencies"
|
2014-02-07 16:20:27 +01:00
|
|
|
@echo "lint - check style with flake8"
|
2021-04-21 22:37:06 +02:00
|
|
|
@echo "test - run tests"
|
|
|
|
@echo "coverage - check code coverage"
|
2014-02-07 16:20:27 +01:00
|
|
|
|
|
|
|
clean-pyc:
|
|
|
|
find . -name '*.pyc' -exec rm -f {} +
|
|
|
|
find . -name '*.pyo' -exec rm -f {} +
|
|
|
|
find . -name '*~' -exec rm -f {} +
|
|
|
|
|
2016-06-14 11:39:45 +02:00
|
|
|
develop: clean-pyc
|
|
|
|
pip install -e .[testing,docs]
|
2019-03-21 21:41:14 +01:00
|
|
|
npm install --no-save && npm run build
|
2016-06-14 11:39:45 +02:00
|
|
|
|
2014-02-07 16:20:27 +01:00
|
|
|
lint:
|
2020-10-02 17:56:26 +02:00
|
|
|
flake8
|
2020-10-19 21:10:28 +02:00
|
|
|
isort --check-only --diff .
|
2019-05-09 11:10:14 +02:00
|
|
|
# Filter out known false positives, while preserving normal output and error codes.
|
|
|
|
# See https://github.com/motet-a/jinjalint/issues/18.
|
|
|
|
jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:70' | tee /dev/tty | wc -l | grep -q '0'
|
2017-08-18 02:28:38 +02:00
|
|
|
npm run lint:css --silent
|
|
|
|
npm run lint:js --silent
|
2020-10-21 13:38:52 +02:00
|
|
|
doc8 docs
|
2014-02-07 16:20:27 +01:00
|
|
|
|
|
|
|
test:
|
2014-02-13 13:44:49 +01:00
|
|
|
python runtests.py
|
2014-02-07 16:20:27 +01:00
|
|
|
|
|
|
|
coverage:
|
2021-04-21 22:37:06 +02:00
|
|
|
coverage run --source wagtail runtests.py
|
2014-02-07 16:20:27 +01:00
|
|
|
coverage report -m
|
|
|
|
coverage html
|
2021-04-21 22:37:06 +02:00
|
|
|
open coverage_html_report/index.html
|