From e0f61755689eadf7697e7b2506c80619e1809d63 Mon Sep 17 00:00:00 2001 From: Ajay Mudgal Date: Wed, 19 Nov 2025 17:35:17 +0000 Subject: [PATCH 1/5] Upgrading python version from 3.12 to 3.14 --- .github/workflows/code-quality.yml | 2 +- README.md | 2 +- build/docker/lambda/Dockerfile | 2 +- build/docker/tester/Dockerfile | 2 +- pyproject.toml | 2 +- test/pyproject.toml | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 4d5925959..72a09b901 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -38,7 +38,7 @@ jobs: -Dsonar.projectKey=nhsdigital_dos-integration -Dsonar.coverage.exclusions=tests/**,**/tests/**,infrastructure,application/dos_db_handler/**,test/**,scripts/**,application/conftest.py -Dsonar.python.coverage.reportPaths=coverage.xml - -Dsonar.python.version=3.12 + -Dsonar.python.version=3.14 -Dsonar.exclusions=application/**/tests/** check-markdown-code-quality: diff --git a/README.md b/README.md index 084c40bc3..dcd638958 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ The main components you will need for _basic_ development work, are your OS vers - A VPN Client (OpenVPN or Tunnelblick are 2 NHS Digital suggested options) - Git -- Python (The project currently runs on 3.12) +- Python (The project currently runs on 3.14) - AWS CLI - Docker/Podman diff --git a/build/docker/lambda/Dockerfile b/build/docker/lambda/Dockerfile index 333ad4347..e500a83a6 100644 --- a/build/docker/lambda/Dockerfile +++ b/build/docker/lambda/Dockerfile @@ -1,4 +1,4 @@ -FROM public.ecr.aws/lambda/python:3.12-arm64 +FROM public.ecr.aws/lambda/python:3.14-arm64 # Update Pip RUN python -m pip install --upgrade pip # Copy Python requirements diff --git a/build/docker/tester/Dockerfile b/build/docker/tester/Dockerfile index 11ee89a74..115c692fd 100644 --- a/build/docker/tester/Dockerfile +++ b/build/docker/tester/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.12 +FROM python:3.14 # Update Pip RUN python -m pip install --upgrade pip # Copy Python requirements diff --git a/pyproject.toml b/pyproject.toml index 0f44a425a..446a26d8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,7 @@ line-length = 120 # Allow unused variables when underscore-prefixed. lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" -# Set target version to Python 3.12. +# Set target version to Python 3.14. target-version = "py312" [tool.ruff.lint.per-file-ignores] diff --git a/test/pyproject.toml b/test/pyproject.toml index b734dba11..59a29bda5 100644 --- a/test/pyproject.toml +++ b/test/pyproject.toml @@ -15,8 +15,8 @@ lint.ignore = [ "DTZ007", # the use of `datetime.datetime.strptime()` without %z must be followed by `.replace(tzinfo=)` or `.astimezone()` ] -# Set python version to 3.12. -target-version = "py312" +# Set python version to 3.14. +target-version = "py314" [tool.ruff.lint.per-file-ignores] "**test_*.py" = ["S101"] # Allow `assert` in tests. From f329fe06e44ba356b97444731807cc283225e82a Mon Sep 17 00:00:00 2001 From: Ajay Mudgal Date: Thu, 20 Nov 2025 12:23:58 +0000 Subject: [PATCH 2/5] Fixing code-quality worklow as python v3.14 --- README.md | 2 +- test/pyproject.toml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dcd638958..f8f653fdb 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ The main components you will need for _basic_ development work, are your OS vers - A VPN Client (OpenVPN or Tunnelblick are 2 NHS Digital suggested options) - Git -- Python (The project currently runs on 3.14) +- Python 3.14 (The project currently uses Python 3.14) - AWS CLI - Docker/Podman diff --git a/test/pyproject.toml b/test/pyproject.toml index 59a29bda5..0665f8aec 100644 --- a/test/pyproject.toml +++ b/test/pyproject.toml @@ -15,8 +15,9 @@ lint.ignore = [ "DTZ007", # the use of `datetime.datetime.strptime()` without %z must be followed by `.replace(tzinfo=)` or `.astimezone()` ] -# Set python version to 3.14. -target-version = "py314" +# Ruff currently supports up to Python 3.13; use py313 as target until py314 is released upstream. +# (Runtime may be 3.14; this setting only affects linting's syntax features.) +target-version = "py313" [tool.ruff.lint.per-file-ignores] "**test_*.py" = ["S101"] # Allow `assert` in tests. From 820d9f701899c7cfc005f0fc79713699d3bb7e0e Mon Sep 17 00:00:00 2001 From: Ajay Mudgal Date: Thu, 20 Nov 2025 14:29:31 +0000 Subject: [PATCH 3/5] Fixing Vale.Terms false positive issue --- .vale.ini | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.vale.ini b/.vale.ini index 809ef3830..b612c06e6 100644 --- a/.vale.ini +++ b/.vale.ini @@ -3,4 +3,4 @@ MinAlertLevel = warning Vocab = words [README.md] -BasedOnStyles = Vale +BasedOnStyles = -Vale.Terms diff --git a/README.md b/README.md index f8f653fdb..7b3d41dd6 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ The main components you will need for _basic_ development work, are your OS vers - A VPN Client (OpenVPN or Tunnelblick are 2 NHS Digital suggested options) - Git -- Python 3.14 (The project currently uses Python 3.14) +- Python (The project currently runs on Python 3.14) - AWS CLI - Docker/Podman @@ -482,7 +482,7 @@ To quick update the lambdas run the following command. Note this only updates th ### Remove deployment with commit tag -You can remove a dev deployment using a single command to create a tag which then runs an AWS CodeBuild project that will remove that environment +You can remove a dev deployment using a single command to create a tag which then starts an AWS CodeBuild project that will remove that environment make tag-commit-to-destroy-environment ENVIRONMENT=[environment to destroy] COMMIT=[short commit hash] e.g. make tag-commit-to-destroy-environment ENVIRONMENT=ds-363 COMMIT=2bc43dd // This destroys the ds-363 dev environment From a83ec4673d5c22362c7a7eb9cdcfeb8bcc276bd9 Mon Sep 17 00:00:00 2001 From: Ajay Mudgal Date: Thu, 20 Nov 2025 14:56:52 +0000 Subject: [PATCH 4/5] Fixing Vale.Terms false positive issue --- .github/workflows/code-quality.yml | 3 +++ .github/workflows/configs/vale/styles/Vale/Terms.yml | 5 +++++ .vale.ini | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/configs/vale/styles/Vale/Terms.yml diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 72a09b901..0f49e34fb 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -69,6 +69,9 @@ jobs: uses: errata-ai/vale-action@reviewdog with: fail_on_error: true + config: .vale.ini + styles: .github/workflows/configs/vale/styles + files: README.md check-python-code-quality: runs-on: ubuntu-latest diff --git a/.github/workflows/configs/vale/styles/Vale/Terms.yml b/.github/workflows/configs/vale/styles/Vale/Terms.yml new file mode 100644 index 000000000..b3f859af7 --- /dev/null +++ b/.github/workflows/configs/vale/styles/Vale/Terms.yml @@ -0,0 +1,5 @@ +extends: substitution +description: "Override built-in Vale.Terms rule" +message: "" +ignorecase: false +swap: {} diff --git a/.vale.ini b/.vale.ini index b612c06e6..809ef3830 100644 --- a/.vale.ini +++ b/.vale.ini @@ -3,4 +3,4 @@ MinAlertLevel = warning Vocab = words [README.md] -BasedOnStyles = -Vale.Terms +BasedOnStyles = Vale From fc808e6e47d9f165d9bfdde60c7fe953f9408c12 Mon Sep 17 00:00:00 2001 From: Ajay Mudgal Date: Thu, 20 Nov 2025 15:29:31 +0000 Subject: [PATCH 5/5] Fixing issues related to vale --- .github/workflows/code-quality.yml | 3 --- .../workflows/configs/vale/styles/Vale/Terms.yml | 5 ----- .../styles/config/vocabularies/words/accept.txt | 14 ++++++++++---- 3 files changed, 10 insertions(+), 12 deletions(-) delete mode 100644 .github/workflows/configs/vale/styles/Vale/Terms.yml diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 0f49e34fb..72a09b901 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -69,9 +69,6 @@ jobs: uses: errata-ai/vale-action@reviewdog with: fail_on_error: true - config: .vale.ini - styles: .github/workflows/configs/vale/styles - files: README.md check-python-code-quality: runs-on: ubuntu-latest diff --git a/.github/workflows/configs/vale/styles/Vale/Terms.yml b/.github/workflows/configs/vale/styles/Vale/Terms.yml deleted file mode 100644 index b3f859af7..000000000 --- a/.github/workflows/configs/vale/styles/Vale/Terms.yml +++ /dev/null @@ -1,5 +0,0 @@ -extends: substitution -description: "Override built-in Vale.Terms rule" -message: "" -ignorecase: false -swap: {} diff --git a/.github/workflows/configs/vale/styles/config/vocabularies/words/accept.txt b/.github/workflows/configs/vale/styles/config/vocabularies/words/accept.txt index 85dd11711..871896a51 100644 --- a/.github/workflows/configs/vale/styles/config/vocabularies/words/accept.txt +++ b/.github/workflows/configs/vale/styles/config/vocabularies/words/accept.txt @@ -21,7 +21,7 @@ CodePipeline Xcode Tunnelblick // Environments -dev +[Dd]ev perf perf2 nonprod @@ -32,14 +32,20 @@ mgmt MGMT // Development/Deployment Terms adhoc +rebase +pytest healthcheck -runbook -Runbook +[Rr]unbooks? +Allowlist +slack_and_infrastructure +opening_times +hotfixes +automations undeploy Undeploy +undeployed Onboarding onboarding // Miscellaneous bbbbbb gggggg -[A-Z]+s