Skip to content

Commit 0d07762

Browse files
committed
[REFACTOR] Centralize handling of Python version
1 parent d1bfbc7 commit 0d07762

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v3
17+
- name: Read Python
18+
id: pyversion
19+
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
1720
- name: Set up Python
1821
uses: actions/setup-python@v4
1922
with:

.github/workflows/test-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
- uses: actions/checkout@v4
1313
with:
1414
fetch-depth: 0
15+
- name: Read Python version
16+
id: pyversion
17+
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV
1518
- name: Set up Python
1619
uses: actions/setup-python@v4
1720
with:

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.8.13
1+
3.11.13

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ $ pip install --requirement requirements.txt
3333
If your system Python is not compatible with the required packages, we suggest that you install Python in a Conda environment using the [Micromamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html) package manager for Conda.
3434

3535
- Begin by [installing the Micromamba package manager](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html).
36-
- Install Python 3.11 in a new environment.
36+
- Install the Python version listed in `.python-version` in a new environment.
3737
```
3838
$ micromamba env create --name ulhpc-docs-python
39-
$ micromamba install python=3.11 --channel conda-forge --name ulhpc-docs-python
39+
$ micromamba install python=$(cat .python-version) --channel conda-forge --name ulhpc-docs-python
4040
```
4141
- You now have 2 options. First options is to install the required python packages directly in the Conda environment.
4242
```

0 commit comments

Comments
 (0)