Skip to content

Commit e2b3eca

Browse files
Merge remote-tracking branch 'origin' into feature/GPCAPIM-397-set-up-int-test-provider-requests
2 parents 7f7c693 + 483e095 commit e2b3eca

26 files changed

Lines changed: 212 additions & 197 deletions

File tree

.github/workflows/alpha-integration-env.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Login to Amazon ECR
4747
id: ecr-login
48-
uses: aws-actions/amazon-ecr-login@376925c9d111252e87ae59691e5a442dd100ef6a
48+
uses: aws-actions/amazon-ecr-login@19d944daaa35f0fa1d3f7f8af1d3f2e5de25c5b7
4949

5050
- name: Compute deployment metadata
5151
id: meta

.github/workflows/preview-env.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858

5959
- name: Login to Amazon ECR
6060
id: ecr-login
61-
uses: aws-actions/amazon-ecr-login@376925c9d111252e87ae59691e5a442dd100ef6a
61+
uses: aws-actions/amazon-ecr-login@19d944daaa35f0fa1d3f7f8af1d3f2e5de25c5b7
6262

6363
- name: Compute branch metadata
6464
id: meta

.github/workflows/test-bruno-collection.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
python-version: ${{ env.python_version }}
2828

2929
- name: Setup Node
30-
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
30+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
3131
with:
3232
node-version: '20'
3333

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,5 @@
107107
"python.analysis.extraPaths": [
108108
"./gateway-api/stubs"
109109
],
110+
"python-envs.defaultEnvManager": "ms-python.python:pyenv",
110111
}

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,6 @@ The dev container sits on the same network, `gateway-local`, as [the `gateway-ap
116116

117117
- A container runtime such as [Docker](https://docs.docker.com/engine/install/) (Linux/WSL) or [Colima](https://github.com/abiosoft/colima) (macOS)
118118

119-
### External Dependencies
120-
121-
This project depends on the [clinical-data-common](https://github.com/NHSDigital/clinical-data-common) library for shared utilities. It is declared as a Git dependency in `gateway-api/pyproject.toml` and installed automatically by Poetry.
122-
123119
## Usage
124120

125121
The project uses `make` targets to build, deploy, and manage the application. Run these from the repository root:
@@ -157,11 +153,11 @@ Environment variables control whether stubs are used in place of the real PDS, S
157153
| Variable | Description |
158154
| --- | --- |
159155
| `PDS_URL` | The URL for the PDS FHIR API; set as `stub` to use development stub. |
160-
| `PDS_API_TOKEN`| Leave unset in development environment. |
161-
| `PDS_API_SECRET`| Leave unset in development environment. |
162-
| `PDS_API_KID`| Leave unset in development environment. |
156+
| `PDS_API_TOKEN` | Leave unset in development environment. |
157+
| `PDS_API_SECRET` | Leave unset in development environment. |
158+
| `PDS_API_KID` | Leave unset in development environment. |
163159
| `SDS_URL` | The URL for the SDS FHIR API; set as `stub` to use development stub. |
164-
| `SDS_API_TOKEN`| Leave unset in development environment. |
160+
| `SDS_API_TOKEN` | Leave unset in development environment. |
165161
| `PROVIDER_URL` | The URL for the GP Provider; set as `stub` to use development stub. |
166162
| `CDG_DEBUG` | `true`, return additional debug information when the call to the GP provider returns an error. |
167163

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: localInt
2+
variables:
3+
- name: base_url
4+
value: http://localhost:5000
5+
- name: nhs_number
6+
value: "9692140466"
7+
- name: from_ods
8+
value: A20047

gateway-api/README.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -114,31 +114,17 @@ gateway-api/
114114
Specified under `[tool.poetry.dependencies]` in `pyproject.toml`:
115115

116116
| Package | Description |
117-
|---|---|
117+
| --- | --- |
118118
| `flask` | Web framework powering the Gateway API |
119119
| `requests` | HTTP client for calling PDS, SDS, and GP provider APIs |
120120
| `types-flask` | Type stubs for Flask (used by mypy) |
121-
| `clinical-data-common` | Shared NHSE library for common utilities ([GitHub repo](https://github.com/NHSDigital/clinical-data-common)) |
122-
123-
The `clinical-data-common` dependency is pinned to a Git tag in `pyproject.toml`:
124-
125-
```toml
126-
[tool.poetry.dependencies]
127-
clinical-data-common = { git = "https://github.com/NHSDigital/clinical-data-common.git", tag = "v0.1.0" }
128-
```
129-
130-
To update it to a newer tag or version:
131-
132-
```bash
133-
poetry update clinical-data-common
134-
```
135121

136122
### Dev Dependencies
137123

138124
Specified under `[dependency-groups] dev` in `pyproject.toml`:
139125

140126
| Package | Description |
141-
|---|---|
127+
| --- | --- |
142128
| `mypy` | Static type checker (strict mode enabled) |
143129
| `pytest` | Test runner |
144130
| `pytest-bdd` | BDD-style acceptance tests with Gherkin feature files |

gateway-api/poetry.lock

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

gateway-api/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ readme = "README.md"
99
requires-python = ">=3.14,<4.0.0"
1010

1111
[tool.poetry.dependencies]
12-
clinical-data-common = { git = "https://github.com/NHSDigital/clinical-data-common.git", tag = "v0.1.0" }
1312
flask = "^3.1.3"
1413
types-flask = "^1.1.6"
1514
requests = "^2.33.0"

gateway-api/src/gateway_api/app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def configure_app(app: Flask) -> None:
3737
"FLASK_PORT": get_env_var("FLASK_PORT", int),
3838
"PDS_URL": get_env_var("PDS_URL", str),
3939
"SDS_URL": get_env_var("SDS_URL", str),
40+
"SDS_API_TOKEN": get_env_var("SDS_API_TOKEN", str),
4041
}
4142
app.config.update(config)
4243

@@ -108,7 +109,9 @@ def get_structured_record() -> Response:
108109
try:
109110
get_structured_record_request = GetStructuredRecordRequest(request)
110111
controller = Controller(
111-
pds_base_url=app.config["PDS_URL"], sds_base_url=app.config["SDS_URL"]
112+
pds_base_url=app.config["PDS_URL"],
113+
sds_base_url=app.config["SDS_URL"],
114+
sds_api_key=app.config["SDS_API_TOKEN"],
112115
)
113116
provider_response = controller.run(request=get_structured_record_request)
114117
response.add_provider_response(provider_response)

0 commit comments

Comments
 (0)