-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
67 lines (48 loc) · 2.16 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.PHONY: check coverage dumpblog fix flush loadblog migrate migrations pip_compile pip_outdated pip_sync pip_update precommit_install precommit_run precommit_update runserver simpletest test update
check:
python -m manage check
python -m manage makemigrations --dry-run --check
python -m ruff format --check .
python -m ruff check .
python -m bandit --configfile pyproject.toml --quiet --recursive --exclude tests .
python -m pip_audit --require-hashes --disable-pip --requirement requirements/common.txt
coverage:
python -m coverage run manage.py test --buffer --noinput --parallel --shuffle
python -m coverage combine
python -m coverage html
python -m coverage report
dumpblog:
python -m manage dumpdata blog --natural-foreign --natural-primary --output blog/fixtures/blog.json
fix:
python -m ruff format .
python -m ruff check --fix .
flush:
python3 -m manage flush --noinput
loadblog:
python -m manage loaddata blog/fixtures/blog.json
migrate:
python -m manage migrate --noinput
migrations:
python -m manage makemigrations --no-header
pip_compile: pip_update
python -m piptools compile --generate-hashes --no-annotate --no-header --quiet --resolver=backtracking --strip-extras --upgrade --output-file requirements/common.txt requirements/common.in
python -m piptools compile --generate-hashes --no-annotate --no-header --quiet --resolver=backtracking --strip-extras --upgrade --output-file requirements/local.txt requirements/local.in
python -m piptools compile --generate-hashes --no-annotate --no-header --quiet --resolver=backtracking --strip-extras --upgrade --output-file requirements/test.txt requirements/test.in
pip_outdated:
python -m pip list --outdated
pip_sync: pip_update
python -m piptools sync requirements/local.txt
pip_update:
python -m pip install --quiet --upgrade pip pip-tools
precommit_install:
python -m pre_commit install
precommit_run:
python -m pre_commit run --all-files
precommit_update:
python -m pre_commit autoupdate
runserver:
python3 -m manage runserver 0:8000
simpletest:
python -m manage test --debug-sql --duration 10 --failfast --pdb --shuffle --timing --verbosity 2
test: check coverage
update: pip_compile precommit_update