-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (42 loc) · 1.44 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
port=8080 # default django run port
clean: clean-pyc clean-build clean-test ## remove all build, test, coverage and Python artifacts
runprocess: test lint precommit clean
test: # run tests for django api
uv run pytest
clean-build: # remove build artifacts
rm -rf -f build/
rm -rf -f dist/
rm -rf -f .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
clean-pyc: # remove Python file artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
find . -name '.DS_Store' -exec rm -fr {} +
clean-test: # remove test and coverage artifacts
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr .pytest_cache
migrate: # run django migrations & migrate
uv run python manage.py makemigrations
uv run python manage.py migrate
coverage: # run the coverage checks
uv run coverage run -m pytest
uv run coverage report
uv run coverage html
install: # install the project dependencies
uv install
precommit: # run the pre-commit hook
uv run pre-commit run --all-files
run: # run the django server
uv run python manage.py runserver 0.0.0.0:${port}
run-celery: # run the celery worker
uv run celery -A core worker -l info
lint: # lint the codes
uv run ruff check --fix .
uv run pre-commit run --all-files -c .pre-commit-config.yaml
export: # export the requirements.txt
uv export --no-hashes -o requirements.txt