123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- # ---------- ---------- ---------- ---------- ---------- ----------
- #
- # django_sso
- #
- # 1) config, vars, and target
- # 2) functions
- # 3) phonies
- #
- # ---------- ---------- ---------- ---------- ---------- ----------
- NAME=django_sso
- target: help
- # ---------- ---------- ---------- ---------- ---------- ----------
- # functions
- # ---------- ---------- ---------- ---------- ---------- ----------
- define fix-python
- @isort . || echo "isort returned nonzero"
- @black . || echo "black returned nonzero"
- endef
- define lint
- @ruff check . || echo "ruff returned nonzero"
- endef
- define lint-types
- @mypy . || echo "mypy returned nonzero"
- endef
- define find-cve
- @pip-audit || echo "pip-audit returned nonzero"
- endef
- # ---------- ---------- ---------- ---------- ---------- ----------
- # phonies
- # ---------- ---------- ---------- ---------- ---------- ----------
- .PHONY: help
- help:
- @echo "Usage: make [PHONY]"
- @sed -n -e "/sed/! s/\.PHONY: //p" Makefile
- @echo ""
- .PHONY: clean
- clean:
- @py3clean ./src/ ./tests/ || echo "pyclean not installed"
- @rm -rf var/ .mypy_cache/
- .PHONY: fix-python
- fix-python:
- @$(call fix-python)
- .PHONY: fix-all
- fix-all: fix-python
- .PHONY: lint
- lint:
- @$(call lint)
- .PHONY: lint-types
- lint-types:
- @$(call lint-types)
- .PHONY: find-cve
- find-cve:
- @$(call find-cve)
- .PHONY: dev
- dev: fix-all lint lint-types find-cve test
- .PHONY: test
- test:
- @coverage run --source='.' -m unittest discover -s tests.django_sso_tests -t .
- @coverage report -m
|