From 446f70bc571386dc993ca942ed717309d6eab1ec Mon Sep 17 00:00:00 2001 From: bensteinberg Date: Wed, 9 Oct 2024 09:28:41 -0400 Subject: [PATCH 1/2] Upgrade Django --- web/requirements.in | 3 ++- web/requirements.txt | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/web/requirements.in b/web/requirements.in index 101e457..6c74d13 100644 --- a/web/requirements.in +++ b/web/requirements.in @@ -6,7 +6,7 @@ invoke # project automation psycopg2 # postgres connector # Django stuff -django~=3.2.0 +django~=4.2.16 django-nested-inline # show all related record in the admin django-polymorphic # for model inheritance django-simple-history # tracks changes made to model instances @@ -15,6 +15,7 @@ django-simple-history # tracks changes made to model instances pynacl # encryption python-dateutil # for relativedelta and other utils werkzeug # for its utilities +pytz # for timezone # Testing flake8 # code linting diff --git a/web/requirements.txt b/web/requirements.txt index 1a3e442..763f1cf 100644 --- a/web/requirements.txt +++ b/web/requirements.txt @@ -128,9 +128,9 @@ coverage[toml]==7.4.1 \ --hash=sha256:f90515974b39f4dea2f27c0959688621b46d96d5a626cf9c53dbc653a895c05c \ --hash=sha256:fe558371c1bdf3b8fa03e097c523fb9645b8730399c14fe7721ee9c9e2a545d3 # via pytest-cov -django==3.2.25 \ - --hash=sha256:7ca38a78654aee72378594d63e51636c04b8e28574f5505dff630895b5472777 \ - --hash=sha256:a52ea7fcf280b16f7b739cec38fa6d3f8953a5456986944c3ca97e79882b4e38 +django==4.2.16 \ + --hash=sha256:1ddc333a16fc139fd253035a1606bb24261951bbc3a6ca256717fa06cc41a898 \ + --hash=sha256:6f1616c2786c408ce86ab7e10f792b8f15742f7b7b7460243929cb371e7f1dad # via # -r requirements.in # django-polymorphic @@ -347,10 +347,10 @@ python-dateutil==2.8.2 \ # via # -r requirements.in # faker -pytz==2024.1 \ - --hash=sha256:2a29735ea9c18baf14b448846bde5a48030ed267578472d8955cd0e7443a9812 \ - --hash=sha256:328171f4e3623139da4983451950b28e95ac706e13f3f2630a879749e7a8b319 - # via django +pytz==2024.2 \ + --hash=sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a \ + --hash=sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725 + # via -r requirements.in six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 From 16601bcd7e582edea82c5e0d9ad3d4ec578966e3 Mon Sep 17 00:00:00 2001 From: bensteinberg Date: Wed, 9 Oct 2024 09:37:09 -0400 Subject: [PATCH 2/2] Replace docker-compose with "docker compose" --- .github/workflows/tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0354aec..ca78a2d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,20 +19,20 @@ jobs: ### run tests ### - - name: docker-compose up + - name: docker compose up run: | # separate pull so downloads run in parallel, with # --ignore-pull-failures for PRs with new images that haven't been pushed yet: - docker-compose -f docker-compose.yml pull --ignore-pull-failures || true - docker-compose -f docker-compose.yml up -d # use -f to suppress docker-compose.override.yml + docker compose -f docker-compose.yml pull --ignore-pull-failures || true + docker compose -f docker-compose.yml up -d # use -f to suppress docker-compose.override.yml docker ps -a # show running containers - docker-compose logs # show logs + docker compose logs # show logs - name: Python tests - shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"' # avoid docker-compose "the input device is not a TTY" -- see https://github.com/actions/runner/issues/241#issuecomment-842566950 + shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"' # avoid docker compose "the input device is not a TTY" -- see https://github.com/actions/runner/issues/241#issuecomment-842566950 run: | set -x - docker-compose exec web invoke test --ci + docker compose exec web invoke test --ci ### codecov ### # https://github.com/codecov/codecov-action @@ -42,7 +42,7 @@ jobs: # Commit image version change if necessary, then deploy via Salt reactor - name: Deploy if: github.event_name == 'push' && github.ref == 'refs/heads/develop' - shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"' # avoid docker-compose "the input device is not a TTY" -- https://github.com/actions/runner/issues/241#issuecomment-842566950 + shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"' # avoid docker compose "the input device is not a TTY" -- https://github.com/actions/runner/issues/241#issuecomment-842566950 env: DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} DEPLOY_URL: ${{ secrets.DEPLOY_URL }}