Makefile 992 B

12345678910111213141516171819202122232425262728293031323334353637
  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 wagtail
  16. isort --check-only --diff --recursive wagtail
  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. test:
  23. python runtests.py
  24. test-all:
  25. tox
  26. coverage:
  27. coverage run --source wagtail setup.py
  28. coverage report -m
  29. coverage html
  30. open htmlcov/index.html