Skip to content

Commit 31f7b77

Browse files
authored
Merge pull request #2497 from ohcnetwork/develop
Merge Develop to Staging v24.40.0
2 parents 1d69bc9 + 663bf30 commit 31f7b77

File tree

304 files changed

+6279
-7523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

304 files changed

+6279
-7523
lines changed

.flake8

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/combine-dependencies.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
${{ runner.os }}-buildx-build-
9393
9494
- name: Build and push image
95-
uses: docker/build-push-action@v5
95+
uses: docker/build-push-action@v6
9696
with:
9797
context: .
9898
file: docker/prod.Dockerfile
@@ -142,7 +142,7 @@ jobs:
142142
uses: actions/checkout@v4
143143

144144
- name: Configure AWS credentials
145-
uses: aws-actions/configure-aws-credentials@v1
145+
uses: aws-actions/configure-aws-credentials@v4
146146
with:
147147
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
148148
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -154,22 +154,6 @@ jobs:
154154
IMAGE_TAG: latest-${{ github.run_number }}
155155
run: echo "IMAGE_VALUE=`echo ghcr.io/${{ github.repository }}:$IMAGE_TAG`" >> $GITHUB_ENV
156156

157-
- name: Fill Backend Api definition
158-
id: task-def-api
159-
uses: aws-actions/amazon-ecs-render-task-definition@v1
160-
with:
161-
task-definition: ${{ env.ECS_TASK_DEFINITION_BACKEND }}
162-
container-name: ${{ env.CONTAINER_NAME_BACKEND }}
163-
image: ${{env.IMAGE_VALUE}}
164-
165-
- name: Deploy Backend Api
166-
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
167-
with:
168-
task-definition: ${{ steps.task-def-api.outputs.task-definition }}
169-
service: ${{ env.ECS_SERVICE_BACKEND }}
170-
cluster: ${{ env.ECS_CLUSTER }}
171-
wait-for-service-stability: true
172-
173157
- name: Fill Celery Cron definition
174158
id: task-def-celery-cron
175159
uses: aws-actions/amazon-ecs-render-task-definition@v1
@@ -187,13 +171,29 @@ jobs:
187171
image: ${{env.IMAGE_VALUE}}
188172

189173
- name: Deploy Backend Celery
190-
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
174+
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
191175
with:
192176
task-definition: ${{ steps.task-def-celery-worker.outputs.task-definition }}
193177
service: ${{ env.ECS_SERVICE_CELERY }}
194178
cluster: ${{ env.ECS_CLUSTER }}
195179
wait-for-service-stability: true
196180

181+
- name: Fill Backend Api definition
182+
id: task-def-api
183+
uses: aws-actions/amazon-ecs-render-task-definition@v1
184+
with:
185+
task-definition: ${{ env.ECS_TASK_DEFINITION_BACKEND }}
186+
container-name: ${{ env.CONTAINER_NAME_BACKEND }}
187+
image: ${{env.IMAGE_VALUE}}
188+
189+
- name: Deploy Backend Api
190+
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
191+
with:
192+
task-definition: ${{ steps.task-def-api.outputs.task-definition }}
193+
service: ${{ env.ECS_SERVICE_BACKEND }}
194+
cluster: ${{ env.ECS_CLUSTER }}
195+
wait-for-service-stability: true
196+
197197
deploy-staging-gcp:
198198
needs: build
199199
if: github.ref == 'refs/heads/staging'

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ jobs:
2323

2424
- uses: actions/setup-python@v5
2525
with:
26-
python-version: "3.11"
26+
python-version: "3.12"
2727
cache: 'pipenv'
2828

2929
- name: Install pipenv
30-
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
30+
run: pip install pipenv
3131

3232
- name: Install dependencies
3333
run: pipenv sync --categories "docs"
@@ -54,7 +54,7 @@ jobs:
5454
- uses: actions/checkout@v4
5555

5656
- name: Download sphinx documentation
57-
uses: actions/download-artifact@v3
57+
uses: actions/download-artifact@v4
5858
with:
5959
name: sphinx-docs
6060
path: ./build

.github/workflows/linter.yml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,14 @@ on:
77
- staging
88
merge_group:
99

10-
permissions: { }
11-
1210
jobs:
13-
build:
14-
name: Lint Code Base
11+
lint:
1512
runs-on: ubuntu-latest
16-
permissions:
17-
contents: read
18-
packages: read
19-
statuses: write
20-
2113
steps:
22-
- name: Checkout Code
23-
uses: actions/checkout@v4
14+
- uses: actions/checkout@v4
2415
with:
2516
fetch-depth: 0
26-
27-
- name: Lint Code Base
28-
uses: super-linter/super-linter/slim@v6
29-
env:
30-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
VALIDATE_ALL_CODEBASE: false
32-
VALIDATE_PYTHON_BLACK: true
33-
VALIDATE_PYTHON_FLAKE8: true
34-
VALIDATE_PYTHON_ISORT: true
35-
LINTER_RULES_PATH: /
36-
PYTHON_BLACK_CONFIG_FILE: "pyproject.toml"
37-
PYTHON_FLAKE8_CONFIG_FILE: ".flake8"
38-
PYTHON_ISORT_CONFIG_FILE: "pyproject.toml"
17+
- uses: actions/setup-python@v3
18+
- uses: pre-commit/action@v3.0.1
19+
with:
20+
extra_args: --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}

.github/workflows/reusable-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,15 @@ jobs:
3030
${{ runner.os }}-buildx-
3131
3232
- name: Bake docker images
33-
uses: docker/bake-action@v4
33+
uses: docker/bake-action@v5
3434
with:
3535
load: true
3636
set: |
3737
*.cache-from=type=local,src=/tmp/.buildx-cache
3838
*.cache-to=type=local,dest=/tmp/.buildx-cache-new
3939
files: docker-compose.yaml,docker-compose.local.yaml
40+
env:
41+
DOCKER_BUILD_NO_SUMMARY: true
4042

4143
- name: Start services
4244
run: |

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,3 +352,5 @@ secrets.sh
352352

353353
# Redis
354354
*.rdb
355+
356+
jwks.b64.txt

.pre-commit-config.yaml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,9 @@ repos:
1616
- id: check-yaml
1717
- id: check-toml
1818

19-
- repo: https://github.com/PyCQA/isort
20-
rev: 5.13.2
19+
- repo: https://github.com/astral-sh/ruff-pre-commit
20+
rev: v0.6.7
2121
hooks:
22-
- id: isort
23-
additional_dependencies: ["isort[pyproject]"]
24-
25-
- repo: https://github.com/psf/black
26-
rev: 24.4.2
27-
hooks:
28-
- id: black
29-
args: ["--config=pyproject.toml"]
30-
31-
- repo: https://github.com/PyCQA/flake8
32-
rev: 7.1.0
33-
hooks:
34-
- id: flake8
35-
args: ["--config=.flake8"]
36-
additional_dependencies: [flake8-isort]
22+
- id: ruff
23+
args: [ --fix ]
24+
- id: ruff-format

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"boto3typed.boto3-ide",
44
"ms-python.python",
55
"ms-python.vscode-pylance",
6-
"ms-python.isort"
6+
"charliermarsh.ruff"
77
]
88
}

.vscode/settings.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
"editor.formatOnSave": false
44
},
55
"[python]": {
6+
"editor.formatOnSave": true,
67
"editor.codeActionsOnSave": {
8+
"source.fixAll": "explicit",
79
"source.organizeImports": "explicit"
810
},
9-
"editor.formatOnSave": true
11+
"editor.defaultFormatter": "charliermarsh.ruff"
1012
},
1113
"files.associations": {
1214
"*.envrc": "shellscript",
@@ -19,10 +21,5 @@
1921
"files.trimFinalNewlines": true,
2022
"files.trimTrailingWhitespace": true,
2123
"githubPullRequests.ignoredPullRequestBranches": ["develop", "staging"],
22-
"python.formatting.blackPath": "${workspaceFolder}/.venv/bin/black",
23-
"python.formatting.provider": "black",
24-
"python.languageServer": "Pylance",
25-
"python.linting.flake8Args": ["--config=.flake8"],
26-
"python.linting.flake8Path": "${workspaceFolder}/.venv/bin/flake8",
27-
"isort.args": ["--profile", "black"]
24+
"python.languageServer": "Pylance"
2825
}

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,20 @@ reset_db:
5252
docker compose exec backend bash -c "python manage.py reset_db --noinput"
5353
docker compose exec backend bash -c "python manage.py migrate"
5454

55+
ruff-all:
56+
ruff check .
57+
58+
ruff-fix-all:
59+
ruff check --fix .
60+
61+
ruff:
62+
ruff check --fix $(shell git diff --name-only --staged | grep -E '\.py$$|\/pyproject.toml$$')
63+
64+
ruff-all-docker:
65+
docker exec care bash -c "ruff check ."
66+
67+
ruff-docker:
68+
docker exec care bash -c "ruff check --fix $(shell git diff --name-only --staged | grep -E '\.py$$|\/pyproject.toml$$')"
69+
5570
%:
5671
docker compose exec backend bash -c "python manage.py $*"

Pipfile

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ name = "pypi"
55

66
[packages]
77
argon2-cffi = "==23.1.0"
8-
authlib = "==1.3.1"
9-
boto3 = "==1.35.0"
8+
authlib = "==1.3.2"
9+
boto3 = "==1.35.25"
1010
celery = "==5.4.0"
11-
django = "==4.2.15"
11+
django = "==5.1.1"
1212
django-environ = "==0.11.2"
13-
django-cors-headers = "==4.3.1"
14-
django-filter = "==24.2"
13+
django-cors-headers = "==4.4.0"
14+
django-filter = "==24.3"
1515
django-maintenance-mode = "==0.21.1"
16-
django-model-utils = "==4.5.1"
1716
django-queryset-csv = "==1.1.0"
1817
django-ratelimit = "==4.1.0"
1918
django-redis = "==5.4.0"
@@ -26,51 +25,47 @@ dry-rest-permissions = "==0.1.10"
2625
drf-nested-routers = "==0.94.1"
2726
drf-spectacular = "==0.27.2"
2827
"fhir.resources" = "==6.5.0"
29-
gunicorn = "==22.0.0"
28+
gunicorn = "==23.0.0"
3029
healthy-django = "==0.1.0"
31-
jsonschema = "==4.22.0"
30+
jsonschema = "==4.23.0"
3231
jwcrypto = "==1.5.6"
3332
newrelic = "==9.13.0"
34-
pillow = "==10.3.0"
35-
psycopg = { extras = ["c"], version = "==3.1.19" }
33+
pillow = "==10.4.0"
34+
psycopg = { extras = ["c"], version = "==3.2.2" }
3635
pycryptodome = "==3.20.0"
37-
pydantic = "==1.10.15" # fix for fhir.resources < 7.0.2
38-
pyjwt = "==2.8.0"
36+
pydantic = "==1.10.18" # fix for fhir.resources < 7.0.2
37+
pyjwt = "==2.9.0"
3938
python-slugify = "==8.0.4"
4039
pywebpush = "==2.0.0"
41-
redis = { extras = ["hiredis"], version = "==5.0.5" } # constraint for redis-om
42-
redis-om = "==0.3.1"
40+
redis = { extras = ["hiredis"], version = "==5.0.8" } # constraint for redis-om
41+
redis-om = "==0.3.1" # > 0.3.1 broken with pydantic < 2
4342
requests = "==2.32.3"
44-
sentry-sdk = "==2.13.0"
45-
whitenoise = "==6.6.0"
43+
sentry-sdk = "==2.14.0"
44+
whitenoise = "==6.7.0"
4645

4746
[dev-packages]
48-
black = "==24.4.2"
49-
boto3-stubs = { extras = ["s3", "boto3"], version = "==1.35.0" }
50-
coverage = "==7.5.3"
51-
debugpy = "==1.8.1"
47+
boto3-stubs = { extras = ["s3", "boto3"], version = "==1.35.25" }
48+
coverage = "==7.6.1"
49+
debugpy = "==1.8.5"
5250
django-coverage-plugin = "==3.1.0"
53-
django-debug-toolbar = "==4.4.2"
5451
django-extensions = "==3.2.3"
55-
django-silk = "==5.1.0"
56-
django-stubs = "==5.0.2"
57-
djangorestframework-stubs = "==3.15.0"
58-
factory-boy = "==3.3.0"
59-
flake8 = "==7.1.1"
52+
django-silk = "==5.2.0"
53+
djangorestframework-stubs = "==3.15.1"
54+
factory-boy = "==3.3.1"
6055
freezegun = "==1.5.1"
61-
ipython = "==8.25.0"
62-
isort = "==5.13.2"
63-
mypy = "==1.10.0"
64-
pre-commit = "==3.7.1"
56+
ipython = "==8.27.0"
57+
mypy = "==1.11.2"
58+
pre-commit = "==3.8.0"
6559
requests-mock = "==1.12.1"
6660
tblib = "==3.0.0"
67-
watchdog = "==4.0.1"
68-
werkzeug = "==3.0.3"
61+
watchdog = "==5.0.2"
62+
werkzeug = "==3.0.4"
63+
ruff = "==0.6.7"
6964

7065
[docs]
71-
furo = "==2024.5.6"
72-
sphinx = "==7.3.7"
73-
myst-parser = "==3.0.1"
66+
furo = "==2024.8.6"
67+
sphinx = "==8.0.2"
68+
myst-parser = "==4.0.0"
7469

7570
[requires]
76-
python_version = "3.11"
71+
python_version = "3.12"

0 commit comments

Comments
 (0)