Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into sainak/fix/jwks-de…
Browse files Browse the repository at this point in the history
…faults
  • Loading branch information
sainak committed Sep 22, 2024
2 parents a4f8e9d + 00ce264 commit 0000a66
Show file tree
Hide file tree
Showing 170 changed files with 13,747 additions and 10,990 deletions.
14 changes: 0 additions & 14 deletions .flake8

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/combine-dependencies.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
cache: 'pipenv'

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

- name: Install dependencies
run: pipenv sync --categories "docs"
Expand Down
31 changes: 13 additions & 18 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,24 @@ on:
permissions: { }

jobs:
build:
lint:
name: Lint Code Base
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Ruff check
uses: chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b
with:
fetch-depth: 0
version: 0.6.7
args: "check"
changed-files: "true"

- name: Lint Code Base
uses: super-linter/super-linter/slim@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
VALIDATE_PYTHON_BLACK: true
VALIDATE_PYTHON_FLAKE8: true
VALIDATE_PYTHON_ISORT: true
LINTER_RULES_PATH: /
PYTHON_BLACK_CONFIG_FILE: "pyproject.toml"
PYTHON_FLAKE8_CONFIG_FILE: ".flake8"
PYTHON_ISORT_CONFIG_FILE: "pyproject.toml"
- name: Ruff format
uses: chartboost/ruff-action@491342200cdd1cf4d5132a30ddc546b3b5bc531b
with:
version: 0.6.7
args: "format"
changed-files: "true"
22 changes: 5 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,9 @@ repos:
- id: check-yaml
- id: check-toml

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.7
hooks:
- id: isort
additional_dependencies: ["isort[pyproject]"]

- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
args: ["--config=pyproject.toml"]

- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
hooks:
- id: flake8
args: ["--config=.flake8"]
additional_dependencies: [flake8-isort]
- id: ruff
args: [ --fix ]
- id: ruff-format
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"boto3typed.boto3-ide",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.isort"
"charliermarsh.ruff"
]
}
11 changes: 4 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
"editor.formatOnSave": false
},
"[python]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"editor.formatOnSave": true
"editor.defaultFormatter": "charliermarsh.ruff"
},
"files.associations": {
"*.envrc": "shellscript",
Expand All @@ -19,10 +21,5 @@
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"githubPullRequests.ignoredPullRequestBranches": ["develop", "staging"],
"python.formatting.blackPath": "${workspaceFolder}/.venv/bin/black",
"python.formatting.provider": "black",
"python.languageServer": "Pylance",
"python.linting.flake8Args": ["--config=.flake8"],
"python.linting.flake8Path": "${workspaceFolder}/.venv/bin/flake8",
"isort.args": ["--profile", "black"]
"python.languageServer": "Pylance"
}
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,20 @@ reset_db:
docker compose exec backend bash -c "python manage.py reset_db --noinput"
docker compose exec backend bash -c "python manage.py migrate"

ruff-all:
ruff check .

ruff-fix-all:
ruff check --fix .

ruff:
ruff check --fix $(shell git diff --name-only --staged | grep -E '\.py$$|\/pyproject.toml$$')

ruff-all-docker:
docker exec care bash -c "ruff check ."

ruff-docker:
docker exec care bash -c "ruff check --fix $(shell git diff --name-only --staged | grep -E '\.py$$|\/pyproject.toml$$')"

%:
docker compose exec backend bash -c "python manage.py $*"
67 changes: 32 additions & 35 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ name = "pypi"

[packages]
argon2-cffi = "==23.1.0"
authlib = "==1.3.1"
boto3 = "==1.35.0"
authlib = "==1.3.2"
boto3 = "==1.35.24"
celery = "==5.4.0"
django = "==4.2.15"
django = "==5.1.1"
django-environ = "==0.11.2"
django-cors-headers = "==4.3.1"
django-filter = "==24.2"
django-cors-headers = "==4.4.0"
django-filter = "==24.3"
django-maintenance-mode = "==0.21.1"
django-model-utils = "==4.5.1"
django-multiselectfield = "==0.1.12"
django-queryset-csv = "==1.1.0"
django-ratelimit = "==4.1.0"
django-redis = "==5.4.0"
Expand All @@ -27,51 +25,50 @@ dry-rest-permissions = "==0.1.10"
drf-nested-routers = "==0.94.1"
drf-spectacular = "==0.27.2"
"fhir.resources" = "==6.5.0"
gunicorn = "==22.0.0"
gunicorn = "==23.0.0"
healthy-django = "==0.1.0"
jsonschema = "==4.22.0"
jsonschema = "==4.23.0"
jwcrypto = "==1.5.6"
newrelic = "==9.13.0"
pillow = "==10.3.0"
psycopg = { extras = ["c"], version = "==3.1.19" }
pillow = "==10.4.0"
psycopg = { extras = ["c"], version = "==3.2.2" }
pycryptodome = "==3.20.0"
pydantic = "==1.10.15" # fix for fhir.resources < 7.0.2
pyjwt = "==2.8.0"
pydantic = "==1.10.18" # fix for fhir.resources < 7.0.2
pyjwt = "==2.9.0"
python-slugify = "==8.0.4"
pywebpush = "==2.0.0"
redis = { extras = ["hiredis"], version = "==5.0.5" } # constraint for redis-om
redis-om = "==0.3.1"
redis = { extras = ["hiredis"], version = "==5.0.8" } # constraint for redis-om
redis-om = "==0.3.1" # > 0.3.1 broken with pydantic < 2
requests = "==2.32.3"
sentry-sdk = "==2.13.0"
whitenoise = "==6.6.0"
sentry-sdk = "==2.14.0"
whitenoise = "==6.7.0"

[dev-packages]
black = "==24.4.2"
boto3-stubs = { extras = ["s3", "boto3"], version = "==1.35.0" }
coverage = "==7.5.3"
debugpy = "==1.8.1"
black = "==24.8.0"
boto3-stubs = { extras = ["s3", "boto3"], version = "==1.35.24" }
coverage = "==7.6.1"
debugpy = "==1.8.5"
django-coverage-plugin = "==3.1.0"
django-debug-toolbar = "==4.4.2"
django-extensions = "==3.2.3"
django-silk = "==5.1.0"
django-stubs = "==5.0.2"
djangorestframework-stubs = "==3.15.0"
factory-boy = "==3.3.0"
django-silk = "==5.2.0"
djangorestframework-stubs = "==3.15.1"
factory-boy = "==3.3.1"
flake8 = "==7.1.1"
freezegun = "==1.5.1"
ipython = "==8.25.0"
ipython = "==8.27.0"
isort = "==5.13.2"
mypy = "==1.10.0"
pre-commit = "==3.7.1"
mypy = "==1.11.2"
pre-commit = "==3.8.0"
requests-mock = "==1.12.1"
tblib = "==3.0.0"
watchdog = "==4.0.1"
werkzeug = "==3.0.3"
watchdog = "==5.0.2"
werkzeug = "==3.0.4"
ruff = "==0.6.7"

[docs]
furo = "==2024.5.6"
sphinx = "==7.3.7"
myst-parser = "==3.0.1"
furo = "==2024.8.6"
sphinx = "==8.0.2"
myst-parser = "==4.0.0"

[requires]
python_version = "3.11"
python_version = "3.12"
Loading

0 comments on commit 0000a66

Please sign in to comment.