Skip to content

Commit 3ca2e34

Browse files
authored
Merge branch 'main' into test-integration-report
2 parents 3cff4d6 + 2b967a9 commit 3ca2e34

File tree

26 files changed

+617
-541
lines changed

26 files changed

+617
-541
lines changed

.github/workflows/stage-2-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: "Save the coverage check result"
5151
uses: actions/upload-artifact@v4
5252
with:
53-
name: coverage
53+
name: coverage.xml
5454
path: coverage.xml
5555
test-lint:
5656
name: "Linting"
@@ -85,7 +85,7 @@ jobs:
8585
- name: "Get the coverage report"
8686
uses: actions/download-artifact@v4
8787
with:
88-
name: coverage
88+
name: coverage.xml
8989
- name: "Perform static analysis"
9090
uses: ./.github/actions/perform-static-analysis
9191
with:

.github/workflows/stage-4-acceptance.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
needs: environment-set-up
112112
timeout-minutes: 10
113113
env:
114-
LOCALSTACK_INTERNAL_DYNAMODB_ENDPOINT: http://localstack:4566/
114+
LOCALSTACK_INTERNAL_ENDPOINT: http://localstack:4566/
115115
steps:
116116
- name: "Checkout code"
117117
uses: actions/checkout@v4

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

README.md

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
# Repository Template
1+
# Vaccination Eligibility Data Product
22

3-
[![CI/CD Pull Request](https://github.com/nhs-england-tools/repository-template/actions/workflows/cicd-1-pull-request.yaml/badge.svg)](https://github.com/nhs-england-tools/repository-template/actions/workflows/cicd-1-pull-request.yaml)
4-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=repository-template&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=repository-template)
3+
[![CI/CD Pull Request](https://github.com/NHSDigital/eligibility-signposting-api/actions/workflows/cicd-1-pull-request.yaml/badge.svg)](https://github.com/NHSDigital/eligibility-signposting-api/actions/workflows/cicd-1-pull-request.yaml)
4+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=NHSDigital_eligibility-signposting-api&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=repository-template)
55

6-
Start with an overview or a brief description of what the project is about and what it does. For example -
6+
The Eligibility Signposting API and Eligibility Data Product are designed to be the single source of the truth for providing trustworthy assessments of an individual’s eligibility based upon clinically assured data sources, for one or more vaccinations. It will also provide details about whether the individual can book/get a vaccine and how they can get vaccinated where relevant.
77

8-
Welcome to our repository template designed to streamline your project setup! This robust template provides a reliable starting point for your new projects, covering an essential tech stack and encouraging best practices in documenting.
8+
Initially this will support inclusion of eligibility for Respiratory Syncytial Virus (RSV) vaccination for older adults within the NHS App (Vaccinations in the App).
99

10-
This repository template aims to foster a user-friendly development environment by ensuring that every included file is concise and adequately self-documented. By adhering to this standard, we can promote increased clarity and maintainability throughout your project's lifecycle. Bundled within this template are resources that pave the way for seamless repository creation. Currently supported technologies are:
11-
12-
- Terraform
13-
- Docker
14-
15-
Make use of this repository template to expedite your project setup and enhance your productivity right from the get-go. Enjoy the advantage of having a well-structured, self-documented project that reduces overhead and increases focus on what truly matters - coding!
10+
The software will only be used for signposting an individual to an appropriate service. Ultimately the eligibility for a particular vaccination will be decided by a healthcare professional at the point of care prior to giving the vaccination.
1611

1712
## Table of Contents
1813

19-
- [Repository Template](#repository-template)
14+
- [Vaccination Eligibility Data Product](#vaccination-eligibility-data-product)
2015
- [Table of Contents](#table-of-contents)
2116
- [Setup](#setup)
2217
- [Prerequisites](#prerequisites)
@@ -32,20 +27,20 @@ Make use of this repository template to expedite your project setup and enhance
3227

3328
## Setup
3429

35-
By including preferably a one-liner or if necessary a set of clear CLI instructions we improve user experience. This should be a frictionless installation process that works on various operating systems (macOS, Linux, Windows WSL) and handles all the dependencies.
36-
37-
Clone the repository
30+
First, ensure [Pprerequisites](#prerequisites) are met. Then clone the repository, and install dependencies.
3831

3932
```shell
40-
git clone https://github.com/nhs-england-tools/repository-template.git
41-
cd nhs-england-tools/repository-template
33+
git clone https://github.com/NHSDigital/eligibility-signposting-api.git
34+
cd eligibility-signposting-api
35+
make dependencies install-python
4236
```
4337

4438
### Prerequisites
4539

4640
The following software packages, or their equivalents, are expected to be installed and configured:
4741

48-
- [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [Podman](https://podman.io/),
42+
- [Python](http://python.org) version 3.13. (It may be easiest to use [pyenv](https://github.com/pyenv/pyenv) to manage Python versions.)
43+
- [Docker](https://www.docker.com/) container runtime or a compatible tool, e.g. [colima](https://github.com/abiosoft/colima) or [Podman](https://podman.io/),
4944
- [asdf](https://asdf-vm.com/) version manager,
5045
- [GNU make](https://www.gnu.org/software/make/) 3.82 or later,
5146

@@ -69,22 +64,46 @@ The following software packages, or their equivalents, are expected to be instal
6964
7065
### Configuration
7166
72-
Installation and configuration of the toolchain dependencies
67+
#### Environment variables
7368
74-
```shell
75-
make install
76-
```
69+
| Variable | Default | Description |
70+
|-------------------------|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
71+
| `DYNAMODB_ENDPOINT` | `http://localhost:4566` | Endpoint for the app to access DynamoDB |
72+
| `AWS_REGION` | `eu-west-1` | AWS Region |
73+
| `AWS_ACCESS_KEY` | `dummy_key` | AWS Access Key |
74+
| `AWS_SECRET_ACCESS_KEY` | `dummy_secret` | AWS Secret Access Key |
75+
| `LOG_LEVEL` | `WARNING` | Logging level. Must be one of `DEBUG`, `INFO`, `WARNING`, `ERROR` or `CRITICAL` as per [Logging Levels](https://docs.python.org/3/library/logging.html#logging-levels) |
7776
7877
## Usage
7978
8079
After a successful installation, provide an informative example of how this project can be used. Additional code snippets, screenshots and demos work well in this space. You may also link to the other documentation resources, e.g. the [User Guide](./docs/user-guide.md) to demonstrate more use cases and to show more features.
8180
8281
### Testing
8382
83+
Run all tests and linting:
84+
85+
```shell
86+
make precommit
87+
```
88+
8489
There are `make` tasks for you to configure to run your tests. Run `make test` to see how they work. You should be able to use the same entry points for local development as in your CI pipeline.
8590

91+
## Conflict with yanai
92+
93+
If you have previously built [yanai](https://nhsd-confluence.digital.nhs.uk/pages/viewpage.action?pageId=48826732), which is the platform we use to supply data to this project, that uses an old version of localstack that does not support our Python version. We have pinned the correct version here and yanai have their version pinned as well so it should work fine, but sometimes issues can arise - if so then removing the docker image can solve that, before then rebuilding.
94+
95+
```shell
96+
docker rmi localstack/localstack
97+
```
98+
8699
## Design
87100

101+
We'll be separating our [presentation](https://martinfowler.com/eaaDev/SeparatedPresentation.html) layer (where API logic lives, in [`views/`](src/eligibility_signposting_api/views)), [business services](https://martinfowler.com/eaaCatalog/serviceLayer.html) layer (where business logic lives, in [`services/`](src/eligibility_signposting_api/services)) and [repository](https://martinfowler.com/eaaCatalog/repository.html) layer (where database logic lives, [`repos/`](src/eligibility_signposting_api/repos)). We will be using [wireup](https://pypi.org/project/wireup/) for [dependency injection](https://pinboard.in/u:brunns/t:dependency-injection), so services get their dependencies given to them ("injection"), and wireup takes care of that. (We'll usually use the [`@service` annotation](https://maldoinc.github.io/wireup/latest/services/), but [factory functions](https://maldoinc.github.io/wireup/latest/factory_functions/) will be used where necessary, typically for creating resources from 3rd party libraries.) We'll be using [Pydantic](https://pypi.org/project/pydantic/) for both response models and database models.
102+
103+
[app.py](src/eligibility_signposting_api/app.py) is the best place to start exploring the code.
104+
105+
Local tests will use [localstack](https://www.localstack.cloud/), started & stopped using [pytest-docker](https://pypi.org/project/pytest-docker/). We'll make extensive use of [pytest fixtures](https://docs.pytest.org/en/6.2.x/fixture.html), [builders](https://pypi.org/project/factory-boy/) and [matchers](https://pypi.org/project/pyhamcrest/) to keep our tests clean.
106+
88107
### Diagrams
89108

90109
The [C4 model](https://c4model.com/) is a simple and intuitive way to create software architecture diagrams that are clear, consistent, scalable and most importantly collaborative. This should result in documenting all the system interfaces, external dependencies and integration points.
@@ -119,7 +138,7 @@ Describe or link templates on how to raise an issue, feature request or make a c
119138

120139
## Contacts
121140

122-
Provide a way to contact the owners of this project. It can be a team, an individual or information on the means of getting in touch via active communication channels, e.g. opening a GitHub discussion, raising an issue, etc.
141+
Please contact the team on [Slack](https://nhsdigitalcorporate.enterprise.slack.com/archives/C08ATG7TBDW)
123142

124143
## Licence
125144

package-lock.json

Lines changed: 31 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"license": "MIT",
1212
"homepage": "https://github.com/NHSDigital/eligibility-signposting-api",
1313
"devDependencies": {
14-
"@openapitools/openapi-generator-cli": "^2.18.1",
14+
"@openapitools/openapi-generator-cli": "^2.18.4",
1515
"apigeetool": "^0.16.5",
1616
"license-checker": "^25.0.1",
1717
"minimist": "^1.2.2"

0 commit comments

Comments
 (0)