-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmakefile
More file actions
80 lines (58 loc) · 1.61 KB
/
Copy pathmakefile
File metadata and controls
80 lines (58 loc) · 1.61 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
#!make
.DEFAULT_GOAL := dc-test
# Makefile target args
args = $(filter-out $@,$(MAKECMDGOALS))
# Docker commands
dc-up:
docker compose up -d app
dc-build:
docker compose build --no-cache app
dc-down:
docker compose down
dc-migrate:
docker compose run --rm migrations alembic upgrade head
dc-migrate-rollback:
docker compose run --rm migrations alembic downgrade -1
dc-history:
docker compose run --rm migrations alembic history
dc-migrations:
docker compose run --rm migrations alembic revision --autogenerate -m "$(MESSAGE)"
dc-logs:
docker compose logs -f $(args)
dc-test-exec:
docker compose run --rm test /bin/bash
dc-test:
docker compose run --rm test pytest --reuse-db -svvl $(args)
dc-test-new-db:
docker compose run --rm test pytest -svvl $(args)
dc-test-parallel:
docker compose run --rm test pytest --reuse-db -svvl -n 2 $(args)
dc-test-unit:
docker compose run --rm test pytest --without-db -svvl $(args)
dc-test-watch:
docker compose run --rm test pytest --reuse-db -svvl -f --ff $(args)
dc-test-cov:
docker compose run --rm test ./docker/test-ci.sh $(args)
dc-purge_celery: dc-up-app
docker compose exec app celery -A scec purge
dc-app-exec: dc-up-app
docker compose exec app $(args)
lint-check:
black --check $(args)
isort --check-only $(args)
ruff check $(args)
lint:
black $(args)
isort $(args)
ruff check --fix $(args)
clean:
rm -rf `find . -name __pycache__`
rm -f `find . -type f -name '*.py[co]' `
rm -f `find . -type f -name '*~' `
rm -f `find . -type f -name '.*~' `
rm -rf dist *.egg-info
rm -rf .cache
rm -rf .pytest_cache
rm -f coverage
rm -f coverage.*
rm -rf artifacts/*