Skip to content

Commit

Permalink
Merge pull request #202 from MetOffice/python-3.12-support
Browse files Browse the repository at this point in the history
Python 3.12 support
  • Loading branch information
Sylviabohnenstengel authored Nov 7, 2023
2 parents 665f95e + 43328e1 commit a8b07b0
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/conda-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git switch -c "conda-lock-files"
tox -e py39-lock,py310-lock,py311-lock
git switch -c "conda-lock-$(sha256sum ${{ runner.temp }}/lock_file_hashes | head -c 8)"
tox -e py39-lock,py310-lock,py311-lock,py312-lock
- name: Create pull requests
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
path: .tox

- name: Build documentation
run: tox -e py310-linux-docs
run: tox -e py311-linux-docs

- uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
env:
PY_COLORS: "1"
TOX_PARALLEL_NO_SPINNER: "1"
run: tox -e py39-linux-tests,py310-linux-tests,py311-linux-tests
run: tox -e py39-linux-tests,py310-linux-tests,py311-linux-tests,py312-linux-tests
- uses: actions/upload-artifact@v3
with:
name: coverage-data
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
key: tox|docs|${{ runner.os }}-${{ runner.arch}}|${{ hashFiles('requirements/locks/*') }}
path: .tox
- name: Build documentation
run: tox -e py310-linux-docs
run: tox -e py311-linux-docs
- uses: actions/upload-artifact@v3
with:
name: html-docs
Expand Down
8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ envlist =
py311-linux-tests
py311-linux-docs
[testenv:py{39,310,311}-lock]
[testenv:py{39,310,311,312}-lock]
allowlist_externals = cp
conda_channels = conda-forge
conda_create_args = --override-channels
Expand All @@ -71,22 +71,24 @@ commands =
python3 -c 'from sys import version_info as v; fh = open("{env:TMPFILE}", "a"); fh.write(f"\n - python =\{v.major\}.\{v.minor\}\n")'
conda-lock --channel conda-forge --kind explicit --file {env:TMPFILE} --platform linux-64 --filename-template "{env:LOCKDIR}{envname}-\{platform\}.txt" {posargs}
[testenv:py{39,310,311}-{linux,osx,win}-tests]
[testenv:py{39,310,311,312}-{linux,osx,win}-tests]
description = Run unit and integration tests with PyTest.
conda_spec =
py39-linux: {toxinidir}{/}requirements{/}locks{/}py39-lock-linux-64.txt
py310-linux: {toxinidir}{/}requirements{/}locks{/}py310-lock-linux-64.txt
py311-linux: {toxinidir}{/}requirements{/}locks{/}py311-lock-linux-64.txt
py312-linux: {toxinidir}{/}requirements{/}locks{/}py312-lock-linux-64.txt
usedevelop = true
depends = coverage-clean
commands = pytest {posargs}
[testenv:py{38,39,310,311}-{linux,osx,win}-docs]
[testenv:py{38,39,310,311,312}-{linux,osx,win}-docs]
description = Invoke sphinx-build to build the HTML docs.
conda_spec =
py39-linux: {toxinidir}{/}requirements{/}locks{/}py39-lock-linux-64.txt
py310-linux: {toxinidir}{/}requirements{/}locks{/}py310-lock-linux-64.txt
py311-linux: {toxinidir}{/}requirements{/}locks{/}py311-lock-linux-64.txt
py312-linux: {toxinidir}{/}requirements{/}locks{/}py312-lock-linux-64.txt
usedevelop = true
commands = sphinx-build -d "docs/build/doctree" docs/source "docs/build/html" --color -W -bhtml {posargs}
Expand Down
Loading

0 comments on commit a8b07b0

Please sign in to comment.