From 4c5291571dc3317d464ae6662848e235bb04d35e Mon Sep 17 00:00:00 2001 From: Jaroslaw Michalski Date: Thu, 30 Mar 2023 10:08:41 +0100 Subject: [PATCH 1/3] revert domain used in redirection --- app/utils/operations/response.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/utils/operations/response.py b/app/utils/operations/response.py index 6222776..2ed202c 100644 --- a/app/utils/operations/response.py +++ b/app/utils/operations/response.py @@ -39,13 +39,7 @@ def __init__(self, request, container, path): host: str = request.base_request.headers.get("X-Forwarded-Host", API_URL) host = host.removeprefix("https://").removeprefix("api.") - # TODO: remove this IF statement when routing rule for rr-apiv2cache frontend - # domain name has been change - self.location = ( - f"https://api.{host}/downloads/{container}/{path}" - if not host.startswith("sandbox") - else f"https://api-{host}/downloads/{container}/{path}" - ) + self.location = f"https://api.{host}/downloads/{container}/{path}" permalink = f"https://{API_URL}/apiv2cache/{request.path}" From 6d543eaf8b9ded29b22590df9b3dde7974bae6d1 Mon Sep 17 00:00:00 2001 From: olaadejnr Date: Tue, 25 Apr 2023 13:30:27 +0100 Subject: [PATCH 2/3] updated tests call to main branch --- .github/workflows/sandbox.yml | 18 ++++++++++++++++++ .vs/VSWorkspaceState.json | 1 - 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sandbox.yml b/.github/workflows/sandbox.yml index 1fcea71..1d2dbef 100644 --- a/.github/workflows/sandbox.yml +++ b/.github/workflows/sandbox.yml @@ -37,4 +37,22 @@ jobs: app-name: 'c19dashsbuksfe01apiv2server' publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} images: 'c19dashacrprod.azurecr.io/apiv2server:${{ github.run_id }}-sandbox' + + + test: + runs-on: ubuntu-latest + name: Automated Regression Tests of COVID19 Dashboard Website + needs: deploy + steps: + # ## calls the AIQ-Automation-Covid-Dashboard workflow to run the automated tests + - name: Calls AIQ-Automation-Covid-Dashboard workflow to run the automated tests + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }} " \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/UKHSA-Internal/AIQ-Automation-Covid-Dashboard/actions/workflows/CovidDashboard_CI.yml/dispatches \ + -d '{"ref":"main","inputs": { "DExecution_Env":"Sandbox", "DScenarioNameTest":"SmokeTests_Scenario" }}' + \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json index b6d808c..0f6cd73 100644 --- a/.vs/VSWorkspaceState.json +++ b/.vs/VSWorkspaceState.json @@ -6,6 +6,5 @@ "\\app", "\\app\\database" ], - "SelectedNode": "\\app\\database\\postgres.py", "PreviewInSolutionExplorer": false } \ No newline at end of file From 8b86241c44ef6b19d6546720b8e51d1f45453cfd Mon Sep 17 00:00:00 2001 From: Jaroslaw Michalski Date: Mon, 22 May 2023 12:17:45 +0100 Subject: [PATCH 3/3] add more metrics Added: cumPeopleVaccinatedAutumn22ByVaccinationDate50plus, cumVaccinationAutumn22UptakeByVaccinationDatePercentage50plus, newPeopleVaccinatedSpring23ByVaccinationDate75plus, cumPeopleVaccinatedSpring23ByVaccinationDate75plus, cumVaccinationSpring23UptakeByVaccinationDatePercentage75plus --- app/utils/assets.py | 5 +++++ app/utils/constants.py | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/app/utils/assets.py b/app/utils/assets.py index 597f3c8..d83d26c 100644 --- a/app/utils/assets.py +++ b/app/utils/assets.py @@ -149,9 +149,14 @@ class MetricData: "newPeopleVaccinatedAutumn22ByVaccinationDate", "cumPeopleVaccinatedAutumn22ByVaccinationDate", "cumVaccinationAutumn22UptakeByVaccinationDatePercentage", + "newPeopleVaccinatedSpring22ByVaccinationDate", "cumPeopleVaccinatedSpring22ByVaccinationDate", "cumVaccinationSpring22UptakeByVaccinationDatePercentage", + + "newPeopleVaccinatedSpring23ByVaccinationDate", + "cumPeopleVaccinatedSpring23ByVaccinationDate", + "cumVaccinationSpring23UptakeByVaccinationDatePercentage", ] } diff --git a/app/utils/constants.py b/app/utils/constants.py index cb4b153..775f7f2 100644 --- a/app/utils/constants.py +++ b/app/utils/constants.py @@ -425,6 +425,12 @@ class DBQueries(NamedTuple): "cumVaccinationCompleteCoverageByVaccinationDatePercentage": float, "newPeopleVaccinatedCompleteByVaccinationDate": int, + "cumPeopleVaccinatedAutumn22ByVaccinationDate50plus": int, + "cumVaccinationAutumn22UptakeByVaccinationDatePercentage50plus": float, + "newPeopleVaccinatedSpring23ByVaccinationDate75plus": int, + "cumPeopleVaccinatedSpring23ByVaccinationDate75plus": int, + "cumVaccinationSpring23UptakeByVaccinationDatePercentage75plus": float, + "vaccinationsAgeDemographics": list, "cumPeopleVaccinatedThirdDoseByPublishDate": int, @@ -781,6 +787,12 @@ class DBQueries(NamedTuple): "cumVaccinationCompleteCoverageByVaccinationDatePercentage": float, "newPeopleVaccinatedCompleteByVaccinationDate": int, + "cumPeopleVaccinatedAutumn22ByVaccinationDate50plus": int, + "cumVaccinationAutumn22UptakeByVaccinationDatePercentage50plus": float, + "newPeopleVaccinatedSpring23ByVaccinationDate75plus": int, + "cumPeopleVaccinatedSpring23ByVaccinationDate75plus": int, + "cumVaccinationSpring23UptakeByVaccinationDatePercentage75plus": float, + "vaccinationsAgeDemographics": list, "cumPeopleVaccinatedThirdDoseByPublishDate": int,