Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into issue-1552
Browse files Browse the repository at this point in the history
  • Loading branch information
sainak committed Sep 21, 2023
2 parents 444c557 + e45f08e commit f522b72
Show file tree
Hide file tree
Showing 11 changed files with 268 additions and 602 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
file: docker/prod.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
APP_VERSION=${{ github.sha }}
cache-from: type=gha,scope=cached-stage
cache-to: type=gha,scope=cached-stage,mode=max

Expand All @@ -88,7 +90,7 @@ jobs:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: staging
version: ${{ github.sha }}

build-production:
needs: test
Expand Down Expand Up @@ -136,6 +138,8 @@ jobs:
file: docker/prod.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
APP_VERSION=${{ github.sha }}
cache-from: type=gha,scope=cached-stage
cache-to: type=gha,scope=cached-stage,mode=max

Expand All @@ -146,7 +150,7 @@ jobs:
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
version: ${{ github.sha }}

deploy-staging-egov:
needs: build-staging
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Lint Code Base
on:
pull_request:
branches: [master]
merge_group:

jobs:
build:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test-merge-queue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Test Pull Request

on:
merge_group:

jobs:
test:
uses: ./.github/workflows/test-base.yml
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ django-maintenance-mode = "==0.18.0"
django-model-utils = "==4.3.*"
django-multiselectfield = "==0.1.12"
django-queryset-csv = "==1.1.0"
django-ratelimit = "==4.0.0"
django-ratelimit = "==4.1.0"
django-redis = "==5.*"
django-rest-passwordreset = "==1.3.0"
django-simple-history = "==3.3.0"
Expand Down
809 changes: 218 additions & 591 deletions Pipfile.lock

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions aws/backend.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@
{
"name": "FIDELIUS_URL",
"value": "https://fidelius.ohc.network"
},
{
"name": "SENTRY_TRACES_SAMPLE_RATE",
"value": "1.0"
},
{
"name": "SENTRY_PROFILES_SAMPLE_RATE",
"value": "1.0"
}
],
"repositoryCredentials": {
Expand Down
16 changes: 16 additions & 0 deletions aws/celery.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@
{
"name": "FIDELIUS_URL",
"value": "https://fidelius.ohc.network"
},
{
"name": "SENTRY_TRACES_SAMPLE_RATE",
"value": "1.0"
},
{
"name": "SENTRY_PROFILES_SAMPLE_RATE",
"value": "1.0"
}
],
"repositoryCredentials": {
Expand Down Expand Up @@ -358,6 +366,14 @@
{
"name": "FIDELIUS_URL",
"value": "https://fidelius.ohc.network"
},
{
"name": "SENTRY_TRACES_SAMPLE_RATE",
"value": "1.0"
},
{
"name": "SENTRY_PROFILES_SAMPLE_RATE",
"value": "1.0"
}
],
"repositoryCredentials": {
Expand Down
1 change: 1 addition & 0 deletions care/facility/api/viewsets/prescription.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def get_queryset(self):
class ConsultationPrescriptionFilter(filters.FilterSet):
is_prn = filters.BooleanFilter()
prescription_type = CareChoiceFilter(choice_dict=inverse_prescription_type)
discontinued = filters.BooleanFilter()


class ConsultationPrescriptionViewSet(
Expand Down
2 changes: 1 addition & 1 deletion care/templates/reports/patient_discharge_summary_pdf.html
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@ <h4 class="font-medium text-gray-500">

<div class="m-4 mb-12">
<div class="text-sm leading-5 font-bold text-gray-500">
Verified By
Treating Physician
</div>
<div class="mt-1 text-sm leading-5 text-gray-900">
{% if consultation.verified_by %}
Expand Down
11 changes: 5 additions & 6 deletions config/settings/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,14 @@
if SENTRY_DSN := env("SENTRY_DSN", default=""):
sentry_sdk.init(
dsn=SENTRY_DSN,
release=env("APP_VERSION", default="unknown"),
environment=env("SENTRY_ENVIRONMENT", default="deployment-unknown"),
traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=1.0),
traces_sample_rate=env.float("SENTRY_TRACES_SAMPLE_RATE", default=0),
profiles_sample_rate=env.float("SENTRY_PROFILES_SAMPLE_RATE", default=0),
integrations=[
LoggingIntegration(
level=env.int("DJANGO_SENTRY_LOG_LEVEL", logging.INFO),
event_level=logging.ERROR, # Capture info and above as breadcrumbs # Send errors as events
),
LoggingIntegration(event_level=logging.WARNING),
DjangoIntegration(),
CeleryIntegration(),
CeleryIntegration(monitor_beat_tasks=True),
RedisIntegration(),
],
)
Expand Down
4 changes: 3 additions & 1 deletion docker/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@ RUN python -m venv /venv
RUN pip install pipenv

COPY Pipfile Pipfile.lock ./
RUN pipenv install --system --deploy
RUN pipenv sync --system --categories "packages"


# ---
FROM base as runtime

ARG BUILD_ENVIRONMENT=production
ARG APP_HOME=/app
ARG APP_VERSION="unknown"

ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV BUILD_ENV ${BUILD_ENVIRONMENT}
ENV APP_VERSION ${APP_VERSION}

ENV PATH /venv/bin:$PATH

Expand Down

0 comments on commit f522b72

Please sign in to comment.