Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production Release v24.40.0 #2504

Merged
merged 48 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
2bb7357
Add feature flags (#2429)
vigneshhari Sep 19, 2024
d36b5d9
added timeout to middleware requests (#2434)
DraKen0009 Sep 19, 2024
0683faa
update unique_bed_name_per_location to ignore deleted beds (#2432)
sainak Sep 19, 2024
28e2ac0
fix string representation of prescription and mar (#2412)
sainak Sep 19, 2024
d5a2278
Convert enum choices to integer choices in Daily Rounds (#2462)
DraKen0009 Sep 19, 2024
30395b6
lint all files (#2468)
sainak Sep 19, 2024
9699206
Major dependencies update (#2449)
sainak Sep 19, 2024
857fe7e
fixing rhytmic_detail missing issue in event logs (#2467)
DraKen0009 Sep 19, 2024
2788679
Update JSON schema validations of Daily Round fields (#2386)
rithviknishad Sep 21, 2024
8513421
Switch investigation default from `dict` to `list` and remove depreca…
rithviknishad Sep 21, 2024
664739e
use random uuid suffix in cover image key with size validation (#2472)
sainak Sep 21, 2024
51b5c00
convert image validator aspect ratio to list (#2475)
sainak Sep 21, 2024
cedd28c
Fix UnorderedObjectListWarning in patient search api (#2478)
sainak Sep 22, 2024
09ee8a3
Avoid printing typst version in tests (#2477)
sainak Sep 22, 2024
22a91f9
Fix warnings from drf where min/max values of DecimalField were not i…
sainak Sep 22, 2024
0ee6d8a
Fixes default admin url (#2474)
shivankacker Sep 22, 2024
d3a0162
added a request time logging middleware (#2361)
DraKen0009 Sep 22, 2024
d4f9208
Switch to ruff for lint and format (#1559)
sainak Sep 22, 2024
d9f0287
Added Facility Hubs (#2135)
shivankacker Sep 22, 2024
4261fa5
fix:Hide asset users from users list page (#2107) (#2113)
ayushchauhan12 Sep 22, 2024
ab99a1b
Fix linting
vigneshhari Sep 22, 2024
5bb466b
Bump the all-dependencies group across 1 directory with 4 updates (#2…
dependabot[bot] Sep 22, 2024
6aa885d
Bump pydantic from 1.10.15 to 1.10.18 (#2484)
dependabot[bot] Sep 22, 2024
15debe1
Prescriptions and MAR: Disallow users to perform edits on discharged …
rithviknishad Sep 22, 2024
ebc03d9
Reply feature for Doctor notes (#2160)
UdaySagar-Git Sep 22, 2024
00ce264
Bump cryptography from 43.0.0 to 43.0.1 (#2422)
dependabot[bot] Sep 22, 2024
12afd7a
disable default jwks for production deployments (#2414)
sainak Sep 22, 2024
c94ff6f
update docker actions (#2485)
sainak Sep 23, 2024
ad354af
Removed redundant room types in FacilityCapacity (#2417)
khavinshankar Sep 23, 2024
d6f9b51
Soft delete assets from deleted facilities/hospitals (#1996)
hrit2773 Sep 23, 2024
e6a55d7
Add user profile pictures (#2253)
UdaySagar-Git Sep 23, 2024
b3ad350
archived spo2 field to archived_spo2 (#2397)
DraKen0009 Sep 23, 2024
e029196
merge migrations (#2486)
sainak Sep 23, 2024
c7637ea
Adds functionality for `last_consultation_admitted_bed_type_list` in …
shivankacker Sep 23, 2024
97e715d
HCX Plug (#2399)
khavinshankar Sep 23, 2024
084033a
fix aws deploys (#2488)
sainak Sep 23, 2024
9038b93
fix facility capacity exports (#2489)
sainak Sep 23, 2024
9816822
disable aspect ratio validation for images (#2487)
sainak Sep 23, 2024
58ad8ab
Set default permission class to IsAuthenticated & made required chang…
dhruv-goyal-10 Sep 23, 2024
1bc9f89
Allow installing plugs from env (#2473)
sainak Sep 23, 2024
d3ad91d
CORS allow cloudflare pages preview deployments (#2490)
rithviknishad Sep 23, 2024
7478b9a
Bump the boto group with 2 updates (#2493)
dependabot[bot] Sep 24, 2024
663bf30
Fix all linting issues in care (#2483)
vigneshhari Sep 24, 2024
31f7b77
Merge pull request #2497 from ohcnetwork/develop
sainak Sep 25, 2024
11b62ee
fix ulid class (#2498)
sainak Sep 25, 2024
ed4a7e1
fix events create (#2501)
sainak Sep 26, 2024
b9a169b
Add leeway for validating taken at in future (#2502)
sainak Sep 26, 2024
d6e4aa0
Merge pull request #2503 from ohcnetwork/develop
khavinshankar Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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.

38 changes: 19 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
${{ runner.os }}-buildx-build-

- name: Build and push image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: docker/prod.Dockerfile
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
uses: actions/checkout@v4

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

- name: Fill Backend Api definition
id: task-def-api
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ${{ env.ECS_TASK_DEFINITION_BACKEND }}
container-name: ${{ env.CONTAINER_NAME_BACKEND }}
image: ${{env.IMAGE_VALUE}}

- name: Deploy Backend Api
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def-api.outputs.task-definition }}
service: ${{ env.ECS_SERVICE_BACKEND }}
cluster: ${{ env.ECS_CLUSTER }}
wait-for-service-stability: true

- name: Fill Celery Cron definition
id: task-def-celery-cron
uses: aws-actions/amazon-ecs-render-task-definition@v1
Expand All @@ -187,13 +171,29 @@ jobs:
image: ${{env.IMAGE_VALUE}}

- name: Deploy Backend Celery
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: ${{ steps.task-def-celery-worker.outputs.task-definition }}
service: ${{ env.ECS_SERVICE_CELERY }}
cluster: ${{ env.ECS_CLUSTER }}
wait-for-service-stability: true

- name: Fill Backend Api definition
id: task-def-api
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ${{ env.ECS_TASK_DEFINITION_BACKEND }}
container-name: ${{ env.CONTAINER_NAME_BACKEND }}
image: ${{env.IMAGE_VALUE}}

- name: Deploy Backend Api
uses: aws-actions/amazon-ecs-deploy-task-definition@v2
with:
task-definition: ${{ steps.task-def-api.outputs.task-definition }}
service: ${{ env.ECS_SERVICE_BACKEND }}
cluster: ${{ env.ECS_CLUSTER }}
wait-for-service-stability: true

deploy-staging-gcp:
needs: build
if: github.ref == 'refs/heads/staging'
Expand Down
6 changes: 3 additions & 3 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 All @@ -54,7 +54,7 @@ jobs:
- uses: actions/checkout@v4

- name: Download sphinx documentation
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: sphinx-docs
path: ./build
Expand Down
30 changes: 6 additions & 24 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,14 @@ on:
- staging
merge_group:

permissions: { }

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

steps:
- name: Checkout Code
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0

- 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"
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
with:
extra_args: --color=always --from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}
4 changes: 3 additions & 1 deletion .github/workflows/reusable-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ jobs:
${{ runner.os }}-buildx-

- name: Bake docker images
uses: docker/bake-action@v4
uses: docker/bake-action@v5
with:
load: true
set: |
*.cache-from=type=local,src=/tmp/.buildx-cache
*.cache-to=type=local,dest=/tmp/.buildx-cache-new
files: docker-compose.yaml,docker-compose.local.yaml
env:
DOCKER_BUILD_NO_SUMMARY: true

- name: Start services
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,5 @@ secrets.sh

# Redis
*.rdb

jwks.b64.txt
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: 31 additions & 36 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +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.25"
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-queryset-csv = "==1.1.0"
django-ratelimit = "==4.1.0"
django-redis = "==5.4.0"
Expand All @@ -26,51 +25,47 @@ 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"
boto3-stubs = { extras = ["s3", "boto3"], version = "==1.35.25" }
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"
flake8 = "==7.1.1"
django-silk = "==5.2.0"
djangorestframework-stubs = "==3.15.1"
factory-boy = "==3.3.1"
freezegun = "==1.5.1"
ipython = "==8.25.0"
isort = "==5.13.2"
mypy = "==1.10.0"
pre-commit = "==3.7.1"
ipython = "==8.27.0"
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
Loading