From 52ad5405affbfe81779888164a715beb56f84cc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emiliano=20Su=C3=B1=C3=A9?= Date: Wed, 11 Sep 2024 10:06:44 -0700 Subject: [PATCH 1/2] Updated dependencies, updated lifecycle badge. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emiliano Suñé --- README.md | 2 +- dav-controller/requirements-dev.txt | 6 +++--- dav-controller/requirements.txt | 2 +- docker/dav-controller/Dockerfile | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1651ba5..bfb64d7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![img](https://img.shields.io/badge/Lifecycle-Maturing-007EC6)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md) +[![Lifecycle:Retired](https://img.shields.io/badge/Lifecycle-Retired-d45500)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) # LCRB Digital Age Verification Service ([lcrb-dav](https://hackmd.io/@esune/SywrtDQvp)) diff --git a/dav-controller/requirements-dev.txt b/dav-controller/requirements-dev.txt index 39ba2aa..9e11ccc 100644 --- a/dav-controller/requirements-dev.txt +++ b/dav-controller/requirements-dev.txt @@ -1,9 +1,9 @@ black==24.4.2 -flake8==7.0.0 +flake8==7.1.1 mock==5.1.0 mongomock==4.1.2 pytest-asyncio==0.23.7 pytest-cov==5.0.0 -pytest==8.2.2 +pytest==8.3.2 requests-mock==1.12.1 -setuptools==70.0.0 +setuptools==70.3.0 diff --git a/dav-controller/requirements.txt b/dav-controller/requirements.txt index 58458f4..eb253af 100644 --- a/dav-controller/requirements.txt +++ b/dav-controller/requirements.txt @@ -1,6 +1,6 @@ fastapi==0.96.0 jinja2==3.1.4 -pymongo==4.3.3 +pymongo==4.8.0 python-multipart==0.0.9 # required by fastapi to serve/upload files qrcode[pil]==7.4.2 structlog==24.2.0 diff --git a/docker/dav-controller/Dockerfile b/docker/dav-controller/Dockerfile index fe858e4..64a7c24 100644 --- a/docker/dav-controller/Dockerfile +++ b/docker/dav-controller/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11 as main +FROM python:3.12-bullseye AS main WORKDIR /app From 2084183cd117b65d3d663baf009c4e735ca15c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emiliano=20Su=C3=B1=C3=A9?= Date: Wed, 11 Sep 2024 10:52:13 -0700 Subject: [PATCH 2/2] Fix CRUD model validation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emiliano Suñé --- dav-controller/api/core/models.py | 2 ++ dav-controller/api/routers/age_verification.py | 1 + 2 files changed, 3 insertions(+) diff --git a/dav-controller/api/core/models.py b/dav-controller/api/core/models.py index a48ac1e..ab085b1 100644 --- a/dav-controller/api/core/models.py +++ b/dav-controller/api/core/models.py @@ -59,12 +59,14 @@ class RevealedAttribute(TypedDict, total=False): class AgeVerificationModelCreate(BaseModel): notify_endpoint: str | None metadata: dict | None + retain_attributes: bool | None class Config: schema_extra = { "example": { "notify_endpoint": "https://my-url/webhook#api-key", "metadata": {"other_system_id": 123}, + "retain_attributes": False, } } diff --git a/dav-controller/api/routers/age_verification.py b/dav-controller/api/routers/age_verification.py index 4420e51..31ca69c 100644 --- a/dav-controller/api/routers/age_verification.py +++ b/dav-controller/api/routers/age_verification.py @@ -152,6 +152,7 @@ async def new_dav_request( url=url_to_message, notify_endpoint=request.notify_endpoint, metadata=request.metadata, + retain_attributes=request.retain_attributes, )