@@ -4,51 +4,44 @@ docker_config = --settings=config.docker-compose
44gql_compose_config = -f docker-compose.yml -f Resources/compose/docker-compose-prod-graphql.yml
55gqlv1beta_compose_config = -f docker-compose.yml -f Resources/compose/docker-compose-prod-graphql.yml -f Resources/compose/docker-compose-prod-graphql-v1beta.yml
66
7- # Auto-detect Python and pip commands
8- PYTHON := $(shell which python3 2>/dev/null || which python 2>/dev/null || echo python3)
9- PIP := $(shell which pip3 2>/dev/null || which pip 2>/dev/null || echo pip3)
10-
117.PHONY : help
128.SILENT :
139
1410help :
1511 @grep -E ' ^[a-zA-Z_-]+:.*?# .*$$' $(MAKEFILE_LIST ) | sort | awk ' BEGIN {FS = ":.*?# "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
1612
1713install : # Install base requirements to run project
18- $(PIP ) install -r requirements.txt
19-
20- dev-install : # Install developer requirements + base requirements
21- $(PIP ) install -r test-requirements.txt
14+ uv sync
2215
2316setup : # Set up the project database
24- $( PYTHON ) manage.py migrate ${local_config}
17+ uv run manage.py migrate ${local_config}
2518
2619build-db : # Build database
27- echo " from data.v2.build import build_all; build_all()" | $( PYTHON ) manage.py shell ${local_config}
20+ echo " from data.v2.build import build_all; build_all()" | uv run manage.py shell ${local_config}
2821
2922wipe-sqlite-db : # Delete's the project database
3023 rm -rf db.sqlite3
3124
3225serve : # Run the project locally
33- $( PYTHON ) manage.py runserver ${local_config}
26+ uv run manage.py runserver ${local_config}
3427
3528test : # Run tests
36- $( PYTHON ) manage.py test ${local_config}
29+ uv run manage.py test ${local_config}
3730
3831clean : # Remove any pyc files
3932 find . -type f -name ' *.pyc' -delete
4033
4134migrate : # Run any outstanding migrations
42- $( PYTHON ) manage.py migrate ${local_config}
35+ uv run manage.py migrate ${local_config}
4336
4437make-migrations : # Create migrations files if schema has changed
45- $( PYTHON ) manage.py makemigrations ${local_config}
38+ uv run manage.py makemigrations ${local_config}
4639
4740shell : # Load a shell
48- $( PYTHON ) manage.py shell ${local_config}
41+ uv run manage.py shell ${local_config}
4942
5043openapi-generate :
51- $( PYTHON ) manage.py spectacular --color --file openapi.yml ${local_config}
44+ uv run manage.py spectacular --color --file openapi.yml ${local_config}
5245
5346docker-up : # (Docker) Create services/volumes/networks
5447 docker compose up -d
0 commit comments