2
0

Makefile 977 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. .PHONY: clean-pyc develop
  2. help:
  3. @echo "clean-pyc - remove Python file artifacts"
  4. @echo "lint - check style with flake8"
  5. @echo "test - run tests quickly with the default Python"
  6. @echo "coverage - check code coverage quickly with the default Python"
  7. clean-pyc:
  8. find . -name '*.pyc' -exec rm -f {} +
  9. find . -name '*.pyo' -exec rm -f {} +
  10. find . -name '*~' -exec rm -f {} +
  11. develop: clean-pyc
  12. pip install -e .[testing,docs]
  13. npm install --no-save && npm run build
  14. lint:
  15. flake8
  16. isort --check-only --diff .
  17. # Filter out known false positives, while preserving normal output and error codes.
  18. # See https://github.com/motet-a/jinjalint/issues/18.
  19. jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:70' | tee /dev/tty | wc -l | grep -q '0'
  20. npm run lint:css --silent
  21. npm run lint:js --silent
  22. doc8 docs
  23. test:
  24. python runtests.py
  25. test-all:
  26. tox
  27. coverage:
  28. coverage run --source wagtail setup.py
  29. coverage report -m
  30. coverage html
  31. open htmlcov/index.html