Skip to content

Commit 00e9061

Browse files
committed
tidy
1 parent cb297af commit 00e9061

13 files changed

+214
-450
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ See https://nhsd-confluence.digital.nhs.uk/display/APM/Glossary.
2525
| `recordprocessor` | **Imms Batch** – Handles batch record processing. |
2626
| `redis_sync` | **Imms Redis** – Handles sync s3 to REDIS. |
2727
| `id_sync` | **Imms Redis** – Handles sync SQS to IEDS. |
28-
| `id_sync` | **Imms Redis** – Not a lambda but Shared Code for lambdas |
28+
| `shared` | **Imms Redis** – Not a lambda but Shared Code for lambdas |
2929
---
3030

3131
### Pipelines
@@ -74,22 +74,22 @@ See https://nhsd-confluence.digital.nhs.uk/display/APM/Glossary.
7474
- `pyenv` manages multiple Python versions at the system level, allowing you to install and switch between different Python versions for different projects.
7575
- `direnv` automates the loading of environment variables and can auto-activate virtual environments (.venv) when entering a project directory, making workflows smoother.
7676
- `.venv` (created via python -m venv or poetry) is Python’s built-in tool for isolating dependencies per project, ensuring that packages don’t interfere with global Python packages.
77-
- `Poetry` is an all-in-one dependency and virtual environment manager that automatically creates a virtual environment (.venv), manages package installations, and locks dependencies (poetry.lock) for reproducibility, making it superior to using pip manually and it is used in all the lambda projects.
77+
- `Poetry` is an all-in-one dependency and virtual environment manager that automatically creates a virtual environment (.venv), manages package installations, and locks dependencies (poetry.lock) for reproducibility, making it superior to using pip manually and it is used in all the lambda projects.
7878

79-
## Project structure
80-
To support a modular and maintainable architecture, each Lambda function in this project is structured as a self-contained folder with its own dependencies, configuration, and environment.
79+
## Project structure
80+
To support a modular and maintainable architecture, each Lambda function in this project is structured as a self-contained folder with its own dependencies, configuration, and environment.
8181

82-
We use Poetry to manage dependencies and virtual environments, with the virtualenvs.in-project setting enabled to ensure each Lambda has an isolated `.venv` created within its folder.
82+
We use Poetry to manage dependencies and virtual environments, with the virtualenvs.in-project setting enabled to ensure each Lambda has an isolated `.venv` created within its folder.
8383

84-
Additionally, direnv is used alongside `.envrc` and `.env` files to automatically activate the appropriate virtual environment and load environment-specific variables when entering a folder.
84+
Additionally, direnv is used alongside `.envrc` and `.env` files to automatically activate the appropriate virtual environment and load environment-specific variables when entering a folder.
8585

8686
Each Lambda folder includes its own `.env` file for Lambda-specific settings, while the project root contains a separate `.env` and `.venv` for managing shared tooling, scripts, or infrastructure-related configurations. This setup promotes clear separation of concerns, reproducibility across environments, and simplifies local development, testing, and packaging for deployment.
8787

8888
## Environment setup
8989
These dependencies are required for running and debugging the Lambda functions and end-to-end (E2E) tests.
9090

91-
### Install dependencies
92-
Steps:
91+
### Install dependencies
92+
Steps:
9393
1. Install [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) if running on Windows and install [Docker](https://docs.docker.com/engine/install/).
9494
2. Install the following tools inside WSL. These will be used by the lambda and infrastructure code:
9595
- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
@@ -119,7 +119,7 @@ Once connected, you should see the path as something similar to: `/mnt/d/Source/
119119
echo 'eval "$(direnv hook bash)"' >> ~/.bashrc
120120
```
121121
122-
7. Install poetry
122+
7. Install poetry
123123
```
124124
pip install poetry
125125
```
@@ -129,7 +129,7 @@ The steps below must be performed in each Lambda function folder and e2e folder
129129
130130
For detailed instructions on running individual Lambdas, refer to the README.md files located inside each respective Lambda folder.
131131
132-
Steps:
132+
Steps:
133133
1. Set the python version in the folder with the code used by lambda for example `./backend` (see [lambdas](#lambdas)) folder.
134134
```
135135
pyenv local 3.11.13 # Set version in backend (this creates a .python-version file)
@@ -158,7 +158,7 @@ Steps:
158158
dotenv
159159
```
160160
161-
5. Restart bash and run `direnv allow`. You should see something similar like:
161+
5. Restart bash and run `direnv allow`. You should see something similar like:
162162
```
163163
direnv: loading /mnt/d/Source/immunisation-fhir-api/.envrc
164164
direnv: export +AWS_PROFILE +IMMUNIZATION_ENV +VIRTUAL_ENV ~PATH
@@ -167,15 +167,15 @@ Steps:
167167
168168
### Setting up the root level environment
169169
The root-level virtual environment is primarily used for linting, as we create separate virtual environments for each folder that contains Lambda functions.
170-
Steps:
171-
1. Follow instructions above to [install dependencies](#install-dependencies) & [set up a virtual environment](#setting-up-a-virtual-environment-with-poetry).
170+
Steps:
171+
1. Follow instructions above to [install dependencies](#install-dependencies) & [set up a virtual environment](#setting-up-a-virtual-environment-with-poetry).
172172
**Note: While this project uses Python 3.10 (e.g. for Lambdas), the NHSDigital/api-management-utils repository — which orchestrates setup and linting — defaults to Python 3.8.
173173
The linting command is executed from within that repo but calls the Makefile in this project, so be aware of potential Python version mismatches when running or debugging locally or in the pipeline.**
174174
2. Run `make lint`. This will:
175175
- Check the linting of the API specification yaml.
176176
- Run Flake8 on all Python files in the repository, excluding files inside .venv and .terraform directories.
177177
178-
## IDE setup
178+
## IDE setup
179179
The current team uses VS Code mainly. So this setup is targeted towards VS code. If you use another IDE please add the documentation to set up workspaces here.
180180
181181
### VS Code
@@ -209,7 +209,7 @@ The root (`immunisation-fhir-api`) should point to `/mnt/d/Source/immunisation-f
209209
210210
211211
## Verified commits
212-
Please note that this project requires that all commits are verified using a GPG key.
212+
Please note that this project requires that all commits are verified using a GPG key.
213213
To set up a GPG key please follow the instructions specified here:
214214
https://docs.github.com/en/authentication/managing-commit-signature-verification
215215

lambdas/id_sync/src/os_vars.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# os_vars.py - Improved approach (✅ Better)
21
import os
32
from typing import Optional
43

lambdas/id_sync/tests/test_data/disease_mapping.json

Lines changed: 0 additions & 129 deletions
This file was deleted.

lambdas/id_sync/tests/test_data/expected_disease_to_vacc.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

lambdas/id_sync/tests/test_data/expected_perms.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

lambdas/id_sync/tests/test_data/expected_vacc_to_diseases.json

Lines changed: 0 additions & 96 deletions
This file was deleted.

0 commit comments

Comments
 (0)