Skip to content

Commit ae1c61f

Browse files
[ERSSUP-76481]-[JW]-[Upgrade to python 3.10]-[DMW]
1 parent cf664ba commit ae1c61f

File tree

11 files changed

+145
-195
lines changed

11 files changed

+145
-195
lines changed

.github/workflows/continous-integration-workflow.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
with:
1313
fetch-depth: 0 # This causes all history to be fetched, which is required for calculate-version to function
1414

15-
- name: Install Python 3.8
15+
- name: Install Python 3.10
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: 3.8
18+
python-version: '3.10'
1919

2020
- name: Upgrade python packaging tools
2121
run: python -m pip install --upgrade pip setuptools wheel

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The contents of this repository are protected by Crown Copyright (C).
3535
### Environment setup
3636
Currently, automation for setting up the right environment is only available for machines based on RedHatEnterpriseLinux (RHEL).
3737
Running the following will ensure your environment is ready for development.
38-
It will install [pyenv](https://github.com/pyenv/pyenv), Python 3.8.12 and its dependencies (yum), create a virtual environment (named apigee), and ensure poetry is installed under it.
38+
It will install [pyenv](https://github.com/pyenv/pyenv), Python 3.10.8 and its dependencies (yum), create a virtual environment (named apigee), and ensure poetry is installed under it.
3939
```
4040
$ make setup-environment
4141
```

azure/azure-build-pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ resources:
1717
- repository: common
1818
type: github
1919
name: NHSDigital/api-management-utils
20-
ref: refs/heads/edge
20+
ref: refs/heads/master
2121
endpoint: NHSDigital
2222

2323
variables:
@@ -27,3 +27,4 @@ extends:
2727
parameters:
2828
service_name: ${{ variables.service_name }}
2929
short_service_name: ${{ variables.short_service_name }}
30+
python_version: ${{ variables.python_version }}

azure/azure-pr-pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resources:
88
- repository: common
99
type: github
1010
name: NHSDigital/api-management-utils
11-
ref: refs/heads/edge
11+
ref: refs/heads/master
1212
endpoint: NHSDigital
1313
pipelines:
1414
- pipeline: build_pipeline
@@ -33,6 +33,7 @@ extends:
3333
short_service_name: ${{ variables.short_service_name }}
3434
service_base_path: ${{ variables.service_base_path }}
3535
manual_approval_env: manual-approval-ptl
36+
python_version: ${{ variables.python_version }}
3637
apigee_deployments:
3738
- environment: manual-approval
3839
stage_name: manual_approval_alpha_pr

azure/azure-release-pipeline.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ resources:
88
- repository: common
99
type: github
1010
name: NHSDigital/api-management-utils
11-
ref: refs/heads/edge
11+
ref: refs/heads/master
1212
endpoint: NHSDigital
1313
pipelines:
1414
- pipeline: build_pipeline
@@ -33,6 +33,7 @@ extends:
3333
enable_status_monitoring: true
3434
manual_approval_env: manual-approval-ptl
3535
prod_producer_approval: true
36+
python_version: ${{ variables.python_version }}
3637
apigee_deployments:
3738
- environment: manual-approval
3839
stage_name: ers_manual_approval_alpha

azure/project.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ variables:
55
product_display_name: e-Referrals-Service
66
product_description: The NHS e-RS vision is to enable local innovation and adoption of paperless referrals. To support this vision NHS Digital have created a set of APIs which provide a well-defined, simple to use data interface to the NHS e-Referral Service (e-RS). See https://digital.nhs.uk/developer/api-catalogue/e-referral-service-fhir
77
spec_file: e-referrals-service-api.json
8+
python_version: 3.10

poetry.lock

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ keywords = ["healthcare", "uk", "nhs"] #TODO add additional keywords
2020

2121

2222
[tool.poetry.dependencies]
23-
python = "^3.8"
23+
python = "^3.10"
2424
pyyaml = "^6.0"
2525
docopt = "^0.6.2"
2626
jsonpath-rw = "^1.4.0"

scripts/macos_setup_environment.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,34 +40,34 @@ echo "Installing python dependencies"
4040
brew update
4141
if brew install openssl readline sqlite3 zlib xz ; then
4242
echo "Python dependencies were installed successfully."
43-
else
43+
else
4444
echo "Python dependencies were NOT installed correctly."
4545
exit 2
4646
fi
4747

48-
# Installing python 3.8.12 with pyenv
49-
echo "Installing python 3.8.12 with pyenv ..."
50-
if pyenv versions | grep -Fq "3.8.12" ; then
51-
echo "Pyenv has already got Python 3.8.12 installed."
48+
# Installing python 3.10.8 with pyenv
49+
echo "Installing python 3.10.8 with pyenv ..."
50+
if pyenv versions | grep -Fq "3.10.8" ; then
51+
echo "Pyenv has already got Python 3.10.8 installed."
5252
else
53-
if pyenv install 3.8.12 ; then
54-
echo "Pyenv installed Python 3.8.12 successfully."
53+
if pyenv install 3.10.8 ; then
54+
echo "Pyenv installed Python 3.10.8 successfully."
5555
else
56-
echo "Pyenv did NOT install Python 3.8.12 successfully."
56+
echo "Pyenv did NOT install Python 3.10.8 successfully."
5757
exit 3
5858
fi
5959
fi
6060

6161

62-
# Creating Apigee environment with Python 3.8.12
63-
echo "Creating Apigee environment with Python 3.8.12 ..."
62+
# Creating Apigee environment with Python 3.10.8
63+
echo "Creating Apigee environment with Python 3.10.8 ..."
6464
if pyenv versions | grep -q ".*apigee" ; then
6565
echo "A Python virtualenv named 'apigee' already exists."
6666
else
67-
if pyenv virtualenv 3.8.12 apigee ; then
68-
echo "A Python 3.8.12 virtualenv named 'apigee' was created."
67+
if pyenv virtualenv 3.10.8 apigee ; then
68+
echo "A Python 3.10.8 virtualenv named 'apigee' was created."
6969
else
70-
echo "A Python 3.8.12 virtualenv named 'apigee' was NOT created."
70+
echo "A Python 3.10.8 virtualenv named 'apigee' was NOT created."
7171
exit 4
7272
fi
7373
fi
@@ -86,7 +86,7 @@ fi
8686
# Checking python version
8787
echo "Checking python version ..."
8888
version=$(python -V 2>&1)
89-
if [[ $version = 'Python 3.8.12' ]] ; then
89+
if [[ $version = 'Python 3.10.8' ]] ; then
9090
echo "Python version is correct."
9191
else
9292
echo "Python version is NOT correct."
@@ -126,4 +126,4 @@ Please \033[1mopen another terminal\033[0m to update your \$PATH and run:\n \
126126
\033[1m$ pyenv version\033[0m, which should output 'apigee'\n \
127127
\033[1m$ make install\033[0m to finish environment setup.\n \
128128
If something went wrong during the setup scripts, you can execute\n \
129-
\033[1m$ make clean-environment\033[0m (N.B. This will remove the ~/.pyenv directory)\n\n"
129+
\033[1m$ make clean-environment\033[0m (N.B. This will remove the ~/.pyenv directory)\n\n"

scripts/ubuntu_setup_environment.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,29 +63,29 @@ else
6363
fi
6464

6565

66-
#Installing python 3.8.12 with pyenv
67-
echo "Installing python 3.8.12 with pyenv ..."
68-
if pyenv versions | grep -Fq "3.8.12" ; then
69-
echo "Pyenv has already got Python 3.8.12 installed."
66+
#Installing python 3.10.8 with pyenv
67+
echo "Installing python 3.10.8 with pyenv ..."
68+
if pyenv versions | grep -Fq "3.10.8" ; then
69+
echo "Pyenv has already got Python 3.10.8 installed."
7070
else
71-
if pyenv install 3.8.12 ; then
72-
echo "Pyenv installed Python 3.8.12 successfully."
71+
if pyenv install 3.10.8 ; then
72+
echo "Pyenv installed Python 3.10.8 successfully."
7373
else
74-
echo "Pyenv did NOT install Python 3.8.12 successfully."
74+
echo "Pyenv did NOT install Python 3.10.8 successfully."
7575
exit 1
7676
fi
7777
fi
7878

7979

80-
#Creating Apigee environment with Python 3.8.12
81-
echo "Creating Apigee environment with Python 3.8.12 ..."
80+
#Creating Apigee environment with Python 3.10.8
81+
echo "Creating Apigee environment with Python 3.10.8 ..."
8282
if pyenv versions | grep -q ".*apigee" ; then
8383
echo "A Python virtualenv named 'apigee' already exists."
8484
else
85-
if pyenv virtualenv 3.8.12 apigee ; then
86-
echo "A Python 3.8.12 virtualenv named 'apigee' was created."
85+
if pyenv virtualenv 3.10.8 apigee ; then
86+
echo "A Python 3.10.8 virtualenv named 'apigee' was created."
8787
else
88-
echo "A Python 3.8.12 virtualenv named 'apigee' was NOT created."
88+
echo "A Python 3.10.8 virtualenv named 'apigee' was NOT created."
8989
exit 1
9090
fi
9191
fi
@@ -104,7 +104,7 @@ fi
104104
#Checking python version
105105
echo "Checking python version ..."
106106
version=$(python -V 2>&1)
107-
if [[ $version = 'Python 3.8.12' ]] ; then
107+
if [[ $version = 'Python 3.10.8' ]] ; then
108108
echo "Python version is correct."
109109
else
110110
echo "Python version is NOT correct."

0 commit comments

Comments
 (0)