Skip to content

Commit

Permalink
Build and test with Python 3.12 (#60)
Browse files Browse the repository at this point in the history
* Move zest.releaser config to pyproject.toml

* Move coverage config to pyproject.toml

* Use ruff instead of flake8

* Bump versions for checkout and setup-miniconda actions

* Set minimum Python version

* Add classifiers and bump minimum Python version

* Add Python 3.12 to tests
  • Loading branch information
mdpiper authored Dec 18, 2023
1 parent 917cb8f commit 86d00db
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
Expand All @@ -42,15 +42,15 @@ jobs:
- name: Test latest Python version
env:
OPENTOPOGRAPHY_API_KEY: ${{ secrets.OPENTOPOGRAPHY_API_KEY }}
if: ${{ matrix.python-version == '3.11' }}
if: ${{ matrix.python-version == '3.12' }}
run: |
nox -s test --python ${{ matrix.python-version }}
- name: Test older Python versions
env:
OPENTOPOGRAPHY_API_KEY: ${{ secrets.OPENTOPOGRAPHY_API_KEY }}
NO_FETCH: 1
if: ${{ matrix.python-version != '3.11' }}
if: ${{ matrix.python-version != '3.12' }}
run: |
nox -s test --python ${{ matrix.python-version }}
Expand All @@ -60,5 +60,5 @@ jobs:
nox -s test-bmi --python ${{ matrix.python-version }}
- name: Coveralls
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: AndreMiras/coveralls-python-action@develop
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
python-version: 3.11
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
python-version: 3.11
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: topography
channels:
- conda-forge
dependencies:
- python =3
- python >=3.9
- pip
- requests
- numpy
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
HERE = pathlib.Path(__file__)
ROOT = HERE.parent
PATHS = [PACKAGE, "docs", "examples", "tests", HERE.name]
PYTHON_VERSIONS = ["3.9", "3.10", "3.11"]
PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12"]


@nox.session(python=PYTHON_VERSIONS)
Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,22 @@ keywords = [
"elevation",
"dem",
"data",
"csdms",
]
license = {text = "MIT License"}
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
]
requires-python = ">=3.7"
requires-python = ">=3.9"
dependencies = [
"requests",
"numpy",
Expand All @@ -45,7 +50,7 @@ dependencies = [
dynamic = ["readme", "version"]

[project.urls]
Homepage = "https://github.com/csdms/bmi-topography"
Homepage = "https://csdms.colorado.edu"
Documentation = "https://bmi-topography.readthedocs.io/"
Repository = "https://github.com/csdms/bmi-topography"
Changelog = "https://github.com/csdms/bmi-topography/blob/main/CHANGES.md"
Expand Down

0 comments on commit 86d00db

Please sign in to comment.