Skip to content

Commit ca54782

Browse files
committed
Use Python 3.11 in the post-deploy pipeline steps.
1 parent 956d5d2 commit ca54782

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

azure/templates/post-deploy.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,10 @@ steps:
115115
workingDirectory: "$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)"
116116
117117
- bash: |
118-
pyenv install -s 3.10.8
119118
pyenv install -s 3.11.11
120-
pyenv global 3.10.8
119+
pyenv global 3.11.11
121120
python --version
122-
displayName: Install python 3.10 and 3.11
121+
displayName: Install python 3.11
123122
124123
- bash: |
125124
set -e
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import boto3
2+
from smart_open import open
3+
4+
5+
s3 = boto3.client("s3")
6+
7+
8+
def upload_large_multipart_file(bucket: str, key: str) -> None:
9+
with open(f"s3://{bucket}/{key}", "w", newline="", transport_params={"client": s3}) as f:
10+
f.write("----------------------------641963206721457550558305\r\n")
11+
f.write('Content-Disposition: form-data; name="File"; filename="HPV_Vaccinations_v5_TESTING_20250716T15453800.csv"\r\n')
12+
f.write("Content-Type: text/csv\r\n")
13+
f.write("\r\n")
14+
f.write("NHS_NUMBER|PERSON_FORENAME|PERSON_SURNAME|PERSON_DOB|PERSON_GENDER_CODE|PERSON_POSTCODE|DATE_AND_TIME|SITE_CODE|SITE_CODE_TYPE_URI|UNIQUE_ID|UNIQUE_ID_URI|ACTION_FLAG|PERFORMING_PROFESSIONAL_FORENAME|PERFORMING_PROFESSIONAL_SURNAME|RECORDED_DATE|PRIMARY_SOURCE|VACCINATION_PROCEDURE_CODE|VACCINATION_PROCEDURE_TERM|DOSE_SEQUENCE|VACCINE_PRODUCT_CODE|VACCINE_PRODUCT_TERM|VACCINE_MANUFACTURER|BATCH_NUMBER|EXPIRY_DATE|SITE_OF_VACCINATION_CODE|SITE_OF_VACCINATION_TERM|ROUTE_OF_VACCINATION_CODE|ROUTE_OF_VACCINATION_TERM|DOSE_AMOUNT|DOSE_UNIT_CODE|DOSE_UNIT_TERM|INDICATION_CODE|LOCATION_CODE|LOCATION_CODE_TYPE_URI\n")
15+
for i in range(1000000):
16+
f.write('"9626382228"|"Ashleigh"|"Wells"|"19970423"|"1"|"L6G 1AF"|"20250710T140606"|"RJ1"|"https://fhir.nhs.uk/Id/ods-organization-code"|"c8cd1dbc-e7e4-4c3c-ae24-7303e43e2e0f"|"https://www.ravs.england.nhs.uk/"|"NEW"|"Rita"|"Harding"|"2025-07-16T15:45:38+00:00"|"TRUE"|"956951000000104"|"RSV vaccination in pregnancy (procedure)"|"1"|"42223111000001107"|"Quadrivalent influenza vaccine (split virion, inactivated) suspension for injection 0.5ml pre-filled syringes (Sanofi Pasteur)"|"Sanofi Pasteur"|"BN92478105653"|"20250721"|"368209003"|"Right arm"|"1210999013"|"Intradermal use"|"0.3"|"2622896019"|"Inhalation - unit of product usage"|"1037351000000105"|"RJC02"|"https://fhir.nhs.uk/Id/ods-organization-code"\n')
17+
f.write("\r\n")
18+
f.write("----------------------------641963206721457550558305--\r\n")
19+
20+
21+
if __name__ == '__main__':
22+
upload_large_multipart_file("", "")

0 commit comments

Comments
 (0)