Skip to content

Commit ece6a21

Browse files
committed
chore: 🔨 remove Django build recipes from justfile
1 parent afc43fd commit ece6a21

File tree

1 file changed

+14
-36
lines changed

1 file changed

+14
-36
lines changed

justfile

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
@_default:
22
just --list --unsorted
33

4-
run-all: install-deps format-python check-python run-tests
4+
run-all: install-deps format-python check-python run-tests check-commits build-website
5+
6+
# Install Python package dependencies
7+
install-deps:
8+
poetry install
59

610
# Generate SVG images from all PlantUML files
711
generate-puml-all:
@@ -11,59 +15,33 @@ generate-puml-all:
1115
generate-puml name:
1216
docker run --rm -v $(pwd):/puml -w /puml ghcr.io/plantuml/plantuml:latest -tsvg "**/{{name}}.puml"
1317

14-
# Start up the docker container
15-
start-docker:
16-
docker compose up -d
17-
18-
# Close the docker container
19-
stop-docker:
20-
docker compose down
21-
22-
# Update the Django migration files
23-
update-migrations: install-deps
24-
yes | poetry run python manage.py makemigrations
25-
poetry run python manage.py migrate
26-
27-
# Run Django tests
28-
run-tests: install-deps update-migrations
18+
# Run Python tests
19+
run-tests:
2920
poetry run pytest
3021

3122
# Check Python code with the linter for any errors that need manual attention
32-
check-python: install-deps
23+
check-python:
3324
poetry run ruff check .
3425

3526
# Reformat Python code to match coding style and general structure
36-
format-python: install-deps
27+
format-python:
3728
poetry run ruff check --fix .
3829
poetry run ruff format .
3930

40-
# Builds and starts a development web server for the Django app (at http://localhost:8000)
41-
start-app: install-deps update-migrations
42-
poetry run python ./manage.py runserver
43-
44-
# Install Python package dependencies
45-
install-deps:
46-
poetry install
47-
48-
# Add test data when running locally based on json files found in `fixtures/`
49-
add-test-data: install-deps update-migrations
50-
poetry run python manage.py loaddata */*/fixtures/*.json
51-
52-
# Reset local Sprout (remove __pycache__ folders, db, migrations, and persistent storage raw files)
31+
# Reset local Sprout (remove __pycache__ folders, generated build files, etc)
5332
reset-local:
5433
find . -type d -name "__pycache__" -exec rm -rf {} +
55-
find */**/migrations -type f ! -name '__init__.py' -exec rm {} \;
56-
rm db.sqlite3
57-
rm persistent_storage/raw/*.csv
34+
rm -rf .storage
5835

5936
# Build the documentation website using Quarto
60-
build-website: install-deps
37+
build-website:
6138
# To let Quarto know where python is.
6239
export QUARTO_PYTHON=.venv/bin/python3
6340
poetry run quartodoc build
6441
poetry run quarto render --execute
6542

66-
check-commit:
43+
# Run checks on commits with non-main branches
44+
check-commits:
6745
#!/bin/zsh
6846
if [[ $(git rev-parse --abbrev-ref HEAD) != "main" ]]
6947
then

0 commit comments

Comments
 (0)