-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
75 lines (59 loc) · 3.64 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
68
69
70
71
72
73
74
75
build:
docker compose build
up: down build
# docker compose up --watch
docker compose up
down:
docker compose -f docker-compose.test.yaml -f docker-compose.yaml down
stop:
docker compose stop
logs:
docker compose logs -f
migrations:
docker compose exec web uv run manage.py makemigrations
blank-migration:
# docker compose exec web uv run manage.py makemigrations -n tide_data_types --empty deployments
docker compose exec web uv run manage.py makemigrations --empty deployments
migrate:
docker compose exec web uv run manage.py migrate
prune:
docker volume rm $(shell docker volume ls -qf dangling=true)
docker buildx prune -f
docker system prune --volumes
docker system prune -a
load:
# docker compose exec web uv run manage.py loaddata deployments/fixtures/*.yaml
docker compose exec web uv run manage.py loaddata deployments/fixtures/platforms.yaml
docker compose exec web uv run manage.py loaddata deployments/fixtures/Alerts.yaml
docker compose exec web uv run manage.py loaddata deployments/fixtures/datatypes.yaml
docker compose exec web uv run manage.py loaddata deployments/fixtures/deployments.yaml
docker compose exec web uv run manage.py loaddata deployments/fixtures/erddapservers.yaml
docker compose exec web uv run manage.py loaddata deployments/fixtures/ErddapDataset.yaml
docker compose exec web uv run manage.py loaddata deployments/fixtures/programs.yaml
docker compose exec web uv run manage.py loaddata deployments/fixtures/platformattribution.yaml
docker compose exec web uv run manage.py loaddata deployments/fixtures/
user:
docker compose exec web uv run manage.py createsuperuser
shell:
docker compose exec web uv run manage.py shell
test:
docker compose -f docker-compose.test.yaml run --rm -e DJANGO_ENV=test web-test uv run pytest --cov=. --cov-config=tox.ini --cov-report=xml:./coverage.xml
test-debug:
docker compose -f docker-compose.test.yaml run --rm -e DJANGO_ENV=test web-test uv run pytest -v --pdb --log-cli-level=INFO
coverage:
docker compose exec web coverage run --source='.' manage.py test
docker compose exec web coverage report
docker compose exec web coverage html
open app/htmlcov/index.html
fixtures:
docker compose exec web uv run manage.py dumpdata --natural-primary --natural-foreign --format yaml deployments.Program -o deployments/fixtures/programs.yaml
docker compose exec web uv run manage.py dumpdata --natural-primary --natural-foreign --format yaml deployments.Platform -o deployments/fixtures/platforms.yaml
docker compose exec web uv run manage.py dumpdata --natural-primary --natural-foreign --format yaml deployments.ProgramAttribution -o deployments/fixtures/platformattribution.yaml
docker compose exec web uv run manage.py dumpdata --natural-primary --natural-foreign --format yaml deployments.Deployment -o deployments/fixtures/deployments.yaml
docker compose exec web uv run manage.py dumpdata --natural-primary --natural-foreign --format yaml deployments.DataType -o deployments/fixtures/datatypes.yaml
docker compose exec web uv run manage.py dumpdata --natural-primary --natural-foreign --format yaml deployments.ErddapServer -o deployments/fixtures/erddapservers.yaml
docker compose exec web uv run manage.py dumpdata --natural-primary --natural-foreign --format yaml deployments.TimeSeries -o deployments/fixtures/TimeSeries.yaml
docker compose exec web uv run manage.py dumpdata --natural-primary --natural-foreign --format yaml deployments.ErddapDataset -o deployments/fixtures/ErddapDataset.yaml
docker compose exec web uv run manage.py dumpdata --natural-primary --natural-foreign --format yaml deployments.Alert -o deployments/fixtures/Alerts.yaml
lint:
docker compose exec web prospector