From 86d00dba0ebd73c6b1dcc86a11f30da2d5d36577 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Mon, 18 Dec 2023 10:09:33 -0700 Subject: [PATCH] Build and test with Python 3.12 (#60) * 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 --- .github/workflows/build-test-ci.yml | 12 ++++++------ .github/workflows/docs.yml | 4 ++-- .github/workflows/format.yml | 4 ++-- environment.yml | 2 +- noxfile.py | 2 +- pyproject.toml | 9 +++++++-- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-test-ci.yml b/.github/workflows/build-test-ci.yml index cea20a9..0034a76 100644 --- a/.github/workflows/build-test-ci.yml +++ b/.github/workflows/build-test-ci.yml @@ -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 @@ -42,7 +42,7 @@ 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 }} @@ -50,7 +50,7 @@ jobs: 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 }} @@ -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 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7dd079e..dc8d514 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -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 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 8d96e54..3140e76 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -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 diff --git a/environment.yml b/environment.yml index 098811c..cb8bdd7 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ name: topography channels: - conda-forge dependencies: - - python =3 + - python >=3.9 - pip - requests - numpy diff --git a/noxfile.py b/noxfile.py index f8b1593..b2e6337 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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) diff --git a/pyproject.toml b/pyproject.toml index 79b920a..d96d7ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", @@ -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"