Skip to content

Commit d6f72ab

Browse files
authored
Merge branch 'develop' into update-prescription-perms
2 parents 11355cf + 6aa885d commit d6f72ab

File tree

80 files changed

+1953
-548
lines changed

Some content is hidden

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

80 files changed

+1953
-548
lines changed

.flake8

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

.github/dependabot.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ updates:
1010
schedule:
1111
interval: "weekly"
1212
groups:
13-
all-dependencies:
13+
boto:
1414
patterns:
15-
- "*"
16-
ignore:
17-
- dependency-name: "redis-om"
18-
- dependency-name: "pydantic"
19-
- dependency-name: "fhir.resources"
15+
- "boto*"
2016

2117
- package-ecosystem: "docker"
2218
directory: "/docker"

.github/workflows/linter.yml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,24 @@ on:
1010
permissions: { }
1111

1212
jobs:
13-
build:
13+
lint:
1414
name: Lint Code Base
1515
runs-on: ubuntu-latest
16-
permissions:
17-
contents: read
18-
packages: read
19-
statuses: write
2016

2117
steps:
2218
- name: Checkout Code
2319
uses: actions/checkout@v4
20+
21+
- name: Ruff check
22+
uses: chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b
2423
with:
25-
fetch-depth: 0
24+
version: 0.6.7
25+
args: "check"
26+
changed-files: "true"
2627

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"
28+
- name: Ruff format
29+
uses: chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b
30+
with:
31+
version: 0.6.7
32+
args: "format"
33+
changed-files: "true"

.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: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name = "pypi"
66
[packages]
77
argon2-cffi = "==23.1.0"
88
authlib = "==1.3.2"
9-
boto3 = "==1.35.19"
9+
boto3 = "==1.35.24"
1010
celery = "==5.4.0"
1111
django = "==5.1.1"
1212
django-environ = "==0.11.2"
@@ -31,21 +31,21 @@ jsonschema = "==4.23.0"
3131
jwcrypto = "==1.5.6"
3232
newrelic = "==9.13.0"
3333
pillow = "==10.4.0"
34-
psycopg = { extras = ["c"], version = "==3.1.19" }
34+
psycopg = { extras = ["c"], version = "==3.2.2" }
3535
pycryptodome = "==3.20.0"
36-
pydantic = "==1.10.15" # fix for fhir.resources < 7.0.2
36+
pydantic = "==1.10.18" # fix for fhir.resources < 7.0.2
3737
pyjwt = "==2.9.0"
3838
python-slugify = "==8.0.4"
3939
pywebpush = "==2.0.0"
40-
redis = { extras = ["hiredis"], version = "==5.0.5" } # constraint for redis-om
40+
redis = { extras = ["hiredis"], version = "==5.0.8" } # constraint for redis-om
4141
redis-om = "==0.3.1" # > 0.3.1 broken with pydantic < 2
4242
requests = "==2.32.3"
4343
sentry-sdk = "==2.14.0"
4444
whitenoise = "==6.7.0"
4545

4646
[dev-packages]
4747
black = "==24.8.0"
48-
boto3-stubs = { extras = ["s3", "boto3"], version = "==1.35.19" }
48+
boto3-stubs = { extras = ["s3", "boto3"], version = "==1.35.24" }
4949
coverage = "==7.6.1"
5050
debugpy = "==1.8.5"
5151
django-coverage-plugin = "==3.1.0"
@@ -63,6 +63,7 @@ requests-mock = "==1.12.1"
6363
tblib = "==3.0.0"
6464
watchdog = "==5.0.2"
6565
werkzeug = "==3.0.4"
66+
ruff = "==0.6.7"
6667

6768
[docs]
6869
furo = "==2024.8.6"

0 commit comments

Comments
 (0)