Skip to content

Commit 626f543

Browse files
authored
Merge pull request #137 from csiro-coasts/dependency-version-bump
Dependency version bump
2 parents 93f420e + 7686a15 commit 626f543

30 files changed

+1499
-450
lines changed

.github/actions/environment/action.yaml

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,20 @@ inputs:
88
description: Name of the emsarray Python package artifact
99
required: false
1010
default: "Python package"
11-
install-latest:
12-
description: Install latest dependency versions instead of locked versions
11+
dependencies:
12+
description: Install pinned, latest, or minimum dependency versions.
13+
required: false
14+
default: 'pinned'
15+
extras:
16+
description: Which set of emsarray 'extras' to install.
17+
required: false
18+
default: 'testing'
19+
strict:
20+
description: |
21+
Whether to install transitive dependencies automatically. When installing
22+
from a set of pinned dependencies the assumption is that all dependencies
23+
are pinned, so there should be no missing transitive dependencies.
1324
required: false
14-
# All inputs are forced to strings
1525
default: 'false'
1626

1727
runs:
@@ -23,7 +33,7 @@ runs:
2333
with:
2434
cache: 'pip'
2535
cache-dependency-path: |
26-
continuous-integration/requirements.txt
36+
continuous-integration/requirements-${{ inputs.python-version }}.txt
2737
continuous-integration/environment.yaml
2838
setup.cfg
2939
@@ -52,18 +62,40 @@ runs:
5262
run: |
5363
conda install -c conda-forge wheel
5464
55-
- name: Install locked Python packages
56-
if: ${{ inputs.install-latest == 'false' }}
65+
- name: Install pinned dependencies
66+
if: ${{ inputs.dependencies == 'pinned' }}
5767
shell: bash -l {0}
5868
run: |
69+
wheels=( dist/emsarray-*.whl )
70+
args=()
71+
if [[ "${{ inputs.strict }}" == "true" ]] ; then args+=('--no-deps') ; fi
72+
73+
pip install \
74+
"${args[@]}" \
75+
-r continuous-integration/requirements-${{ inputs.python-version }}.txt \
76+
"${wheels[0]}[${{ inputs.extras }}]"
77+
pip check
78+
79+
- name: Install minimum supported version dependencies
80+
if: ${{ inputs.dependencies == 'minimum' }}
81+
shell: bash -l {0}
82+
run: |
83+
wheels=( dist/emsarray-*.whl )
84+
args=()
85+
if [[ "${{ inputs.strict }}" == "true" ]] ; then args+=('--no-deps') ; fi
86+
87+
pip install \
88+
"${args[@]}" \
89+
-r continuous-integration/requirements-minimum.txt \
90+
"${wheels[0]}"
91+
pip check
5992
pip install \
60-
-r continuous-integration/requirements.txt \
61-
dist/emsarray-*.whl
93+
-r continuous-integration/requirements-minimum.txt \
94+
"${wheels[0]}[${{ inputs.extras }}]"
6295
63-
- name: Install latest Python packages
64-
if: ${{ inputs.install-latest != 'false'}}
96+
- name: Install latest dependencies
97+
if: ${{ inputs.dependencies == 'latest' }}
6598
shell: bash -l {0}
6699
run: |
67100
wheels=( dist/emsarray-*.whl )
68-
echo "${wheels[@]}"
69-
pip install "${wheels[0]}[testing]"
101+
pip install "${wheels[0]}[${{ inputs.extras }}]"

.github/workflows/ci.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
workflow_dispatch:
1313

1414
env:
15-
python-version: "3.11"
15+
python-version: "3.12"
1616

1717
jobs:
1818
build:
@@ -55,29 +55,33 @@ jobs:
5555
./scripts/build-local-conda-package.sh
5656
5757
test:
58-
name: python ${{ matrix.python-version }}, ${{ matrix.experimental && 'latest' || 'pinned' }} dependencies
58+
name: python ${{ matrix.python-version }}, ${{ matrix.dependencies }} dependencies
5959
runs-on: ubuntu-latest
6060
timeout-minutes: 10
6161
needs: ["build"]
6262

6363
# Allow failures for the latest versions
64-
continue-on-error: ${{ matrix.experimental }}
64+
continue-on-error: ${{ matrix.dependencies == 'latest' }}
6565
strategy:
6666
fail-fast: false
6767
matrix:
68-
python-version: ["3.9", "3.10", "3.11"]
69-
experimental: [false]
68+
python-version: ["3.10", "3.11", "3.12"]
69+
dependencies: ["pinned"]
7070
include:
71-
- python-version: "3.11"
72-
experimental: true
71+
- python-version: "3.12"
72+
dependencies: "latest"
73+
- python-version: "3.10"
74+
dependencies: "minimum"
75+
7376

7477
steps:
7578
- uses: actions/checkout@v3
7679
- uses: ./.github/actions/environment
7780
with:
7881
python-version: ${{ matrix.python-version }}
7982
package-artifact-name: ${{ needs.build.outputs.artifact-name }}
80-
install-latest: ${{ matrix.experimental }}
83+
dependencies: ${{ matrix.dependencies }}
84+
strict: "true"
8185

8286
- name: Run tests
8387
shell: bash -l {0}
@@ -95,13 +99,13 @@ jobs:
9599
if: always()
96100
with:
97101
report_paths: 'junit-py*.xml'
98-
check_name: "JUnit Test Report - python ${{ matrix.python-version }}, ${{ matrix.experimental && 'latest' || 'pinned' }} dependencies"
102+
check_name: "JUnit Test Report - python ${{ matrix.python-version }}, ${{ matrix.dependencies }} dependencies"
99103

100104
- name: MPL image comparison report
101105
uses: actions/upload-artifact@v3
102106
if: ${{ failure() }}
103107
with:
104-
name: "MPL image comparison report - python ${{ matrix.python-version }}, ${{ matrix.experimental && 'latest' || 'pinned' }} dependencies"
108+
name: "MPL image comparison report - python ${{ matrix.python-version }}, ${{ matrix.dependencies }} dependencies"
105109
path: './mpl-results'
106110
# No guarantee that the test failures were due to image comparisons
107111
if-no-files-found: 'ignore'
@@ -151,6 +155,7 @@ jobs:
151155
- uses: ./.github/actions/environment
152156
with:
153157
python-version: ${{ env.python-version }}
158+
extras: docs
154159
package-artifact-name: ${{ needs.build.outputs.artifact-name }}
155160

156161
- run: |

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ To get set up for development, make a virtual environment and install the depend
6161
$ python3 -m venv
6262
$ source venv/bin/activate
6363
$ pip install --upgrade pip>=21.3
64-
$ pip install -e . -r continuous-integration/requirements.txt
64+
$ pip install -e .[testing]
6565
```
6666

6767
## Tests

continuous-integration/docs.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ channels:
22
- conda-forge
33

44
dependencies:
5-
- geos ~=3.10.2
6-
- python =3.10
5+
- geos ~=3.12.2
6+
- python =3.12
77
- wheel
88
- pip:
9-
- -r ./requirements.txt
10-
- -e ..
9+
- -r ./requirements-3.12.txt
10+
- -e ..[docs]

continuous-integration/environment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ channels:
22
- conda-forge
33

44
dependencies:
5-
- geos ~=3.10.2
5+
- geos ~=3.12.2
66
- udunits2 >=2.2.25

0 commit comments

Comments
 (0)