Skip to content

Commit

Permalink
🚜 Update Compose and Deps (#27)
Browse files Browse the repository at this point in the history
* 🚜 Update compose

* ⬆️ Updates requirements.txt

* ⬆️ Bumps pre-commit

* 📝 Updates GHA to run uv and to use our utility service
  • Loading branch information
jefftriplett authored May 26, 2024
1 parent 91c71ae commit 13a46c6
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 37 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "django<5.0"
python -m pip install --upgrade pip uv
python -m uv pip install --system "django<5.0"
- name: Create a project based on our settings
run: |
Expand All @@ -47,4 +47,4 @@ jobs:
- name: Docker - Test generated starter project
run: |
cd test_project
docker compose run --rm web pytest
docker compose run --rm utility pytest
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -25,23 +25,23 @@ repos:
# - id: djjs
# alias: autoformat
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.13.0
rev: 1.17.0
hooks:
- id: django-upgrade
args: [--target-version, "4.2"]
alias: autoformat
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 24.4.2
hooks:
- id: black
alias: autoformat
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.261
rev: v0.4.5
hooks:
- id: ruff
alias: autoformat
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
rev: 1.16.0
hooks:
- id: blacken-docs
alias: autoformat
File renamed without changes.
3 changes: 2 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ services:

utility:
<<: *common-settings
tty: true

web:
<<: *common-settings
command: ["python", "-m", "manage", "runserver", "0.0.0.0:8000"]
command: ["python", "-m", "manage", "runserver", "--noinput", "--skip-checks", "0.0.0.0:8000"]
entrypoint: ["/src/compose-entrypoint.sh"]
init: true
ports:
Expand Down
10 changes: 2 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@ bootstrap *ARGS:
cp .env-dist .env
fi

if [ ! -f "compose.override.yml" ]; then
echo "compose.override.yml created"
cp compose.override.yml-dist compose.override.yml
fi

just upgrade

docker compose {{ ARGS }} build --force-rm
just build {{ ARGS }} --force-rm

@build *ARGS:
docker compose build {{ ARGS }}
Expand Down Expand Up @@ -100,5 +95,4 @@ bootstrap *ARGS:
docker compose up {{ ARGS }}

@upgrade:
python -m pip install --upgrade pip uv
python -m uv pip install --upgrade --requirement requirements.in
just lock --upgrade
51 changes: 31 additions & 20 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,65 +1,76 @@
# This file was autogenerated by uv via the following command:
# uv pip compile ./requirements.in --resolver=backtracking --output-file ./requirements.txt
asgiref==3.7.2
# uv pip compile requirements.in --resolver=backtracking --output-file requirements.txt
asgiref==3.8.1
# via django
cfgv==3.4.0
# via pre-commit
click==8.1.7
# via django-click
coverage==7.4.3
coverage==7.5.2
# via pytest-cov
distlib==0.3.8
# via virtualenv
dj-database-url==2.1.0
# via environs
dj-email-url==1.0.6
# via environs
django==5.0.2
django==5.0.6
# via
# -r requirements.in
# dj-database-url
# model-bakery
django-cache-url==3.4.5
# via environs
django-click==2.3.0
django-click==2.4.0
# via -r requirements.in
django-test-plus==2.2.3
environs==10.3.0
filelock==3.13.1
# via -r requirements.in
environs==11.0.0
# via -r requirements.in
filelock==3.14.0
# via virtualenv
identify==2.5.35
identify==2.5.36
# via pre-commit
iniconfig==2.0.0
# via pytest
marshmallow==3.21.0
marshmallow==3.21.2
# via environs
model-bakery==1.17.0
model-bakery==1.18.0
# via -r requirements.in
nodeenv==1.8.0
# via pre-commit
packaging==23.2
packaging==24.0
# via
# marshmallow
# pytest
platformdirs==4.2.0
platformdirs==4.2.2
# via virtualenv
pluggy==1.4.0
pluggy==1.5.0
# via pytest
pre-commit==3.6.2
pre-commit==3.7.1
# via -r requirements.in
psycopg2-binary==2.9.9
pytest==8.0.2
# via -r requirements.in
pytest==8.2.1
# via
# -r requirements.in
# pytest-cov
# pytest-django
pytest-cov==4.1.0
pytest-cov==5.0.0
# via -r requirements.in
pytest-django==4.8.0
# via -r requirements.in
python-dotenv==1.0.1
# via environs
pyyaml==6.0.1
# via pre-commit
setuptools==69.1.1
setuptools==70.0.0
# via nodeenv
sqlparse==0.4.4
sqlparse==0.5.0
# via django
typing-extensions==4.10.0
typing-extensions==4.12.0
# via dj-database-url
virtualenv==20.25.1
virtualenv==20.26.2
# via pre-commit
whitenoise==6.6.0
# via -r requirements.in

0 comments on commit 13a46c6

Please sign in to comment.