Skip to content

Commit 39cb33f

Browse files
lwjohnst86signekb
andauthored
chore: 🔥 remove Django-specific configs (#22)
## Description This PR removes all config settings that related to Django specific content, files, or configs. Related to our discussion in seedcase-project/seedcase-sprout#845 <!-- Select quick/in-depth as necessary --> This PR needs an in-depth review. --------- Co-authored-by: Signe Kirk Brødbæk <40836345+signekb@users.noreply.github.com>
1 parent c619115 commit 39cb33f

File tree

6 files changed

+20
-64
lines changed

6 files changed

+20
-64
lines changed

.gitignore

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,9 @@ site
8787
persistent_storage
8888
!persistent_storage/**/*.md
8989

90-
# Python Django
90+
# Python Web App
91+
*.sqlite3
92+
*.sqlite3-journal
93+
94+
# Misc files
9195
*.log
92-
local_settings.py
93-
db.sqlite3
94-
db.sqlite3-journal
95-
# We'll disable migrations for now, until we have actual users
96-
migrations

.vscode/extensions.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// List of extensions which should be recommended for users of this workspace.
55
"recommendations": [
66
"jebbs.plantuml",
7-
"batisteo.vscode-django",
87
"donjayamanne.githistory",
98
"felipecaputo.git-project-manager",
109
"GitHub.vscode-pull-request-github",
@@ -18,9 +17,7 @@
1817
"vivaxy.vscode-conventional-commits",
1918
"charliermarsh.ruff",
2019
"pshaddel.conventional-branch",
21-
"yy0931.vscode-sqlite3-editor",
22-
"junstyle.vscode-django-support",
23-
"monosans.djlint"
20+
"yy0931.vscode-sqlite3-editor"
2421
],
2522
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
2623
"unwantedRecommendations": []

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
"[python]": {
3030
"editor.defaultFormatter": "charliermarsh.ruff"
3131
},
32-
"[html][django-html]": {
33-
"editor.defaultFormatter": "monosans.djlint"
34-
},
3532
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
3633
"python.languageServer": "Pylance",
3734
"files.insertFinalNewline": true,

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

pyproject.toml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,10 @@ python = "^3.12"
2828

2929
[tool.poetry.group.test.dependencies]
3030
pytest = "^8.3.2"
31-
pytest-django = "^4.8.0"
3231

3332
[tool.poetry.group.dev.dependencies]
3433
ruff = "^0.6.2"
3534

36-
[tool.poetry.group.django.dependencies]
37-
psycopg2-binary = "^2.9.9"
38-
django-widget-tweaks = "^1.5.0"
39-
dj-database-url = "^2.2.0"
40-
gunicorn = "^23.0.0"
41-
whitenoise = "^6.7.0"
42-
django = "^5.1"
43-
4435
[build-system]
4536
requires = ["poetry-core"]
4637
build-backend = "poetry.core.masonry.api"
47-
48-
[tool.pytest.ini_options]
49-
DJANGO_SETTINGS_MODULE = "CONFIG_FOLDERNAME.settings"

ruff.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ extend-select = [
1414
# Ignore missing docstring at the top of files
1515
ignore = ["D100"]
1616

17-
# Ignore Django migration files
18-
exclude = ["**/migrations/*.py"]
19-
2017
[lint.pydocstyle]
2118
convention = "google"
2219

0 commit comments

Comments
 (0)