From ee6af55929933a4b4bd04acc9e4249d973109d09 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Fri, 22 Mar 2024 13:27:12 -0600 Subject: [PATCH 1/5] Test with Python 3.12; set minimum to Python 3.10 --- .github/workflows/build-test-ci.yml | 6 +++--- environment.yml | 2 +- noxfile.py | 2 +- pyproject.toml | 5 ++++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test-ci.yml b/.github/workflows/build-test-ci.yml index b13a478..1bd98e5 100644 --- a/.github/workflows/build-test-ci.yml +++ b/.github/workflows/build-test-ci.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 @@ -46,10 +46,10 @@ jobs: nox -s test --python ${{ matrix.python-version }} - name: Test BMI - if: ${{ matrix.python-version == '3.9' }} + if: ${{ matrix.python-version == '3.12' }} run: | 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/environment.yml b/environment.yml index b245f00..f2ca7fd 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ name: geotiff channels: - conda-forge dependencies: - - python >=3.9 + - python >=3.10 - pip - pyyaml - rioxarray diff --git a/noxfile.py b/noxfile.py index f8c16ab..880e60a 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.10", "3.11", "3.12"] @nox.session(python=PYTHON_VERSIONS) diff --git a/pyproject.toml b/pyproject.toml index 5187942..53caf9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,9 @@ keywords = [ license = {text = "MIT License"} classifiers = [ "Programming Language :: Python :: 3", + "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", @@ -24,7 +27,7 @@ classifiers = [ "Intended Audience :: Education", "Topic :: Scientific/Engineering", ] -requires-python = ">=3.7" +requires-python = ">=3.10" dependencies = [ "numpy", "pyyaml", From d1affcf343d17a2eacb9622983b9e0ee0a4aa8f4 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Fri, 22 Mar 2024 13:31:36 -0600 Subject: [PATCH 2/5] Move coverage and zest.releaser config to pyproject.toml --- pyproject.toml | 7 +++++++ setup.cfg | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 53caf9e..f5bc802 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -108,3 +108,10 @@ include_trailing_comma = true force_grid_wrap = 0 combine_as_imports = true line_length = 88 + +[tool.coverage.run] +relative_files = true + +[tool.zest-releaser] +tag-format = "v{version}" +python-file-with-version = "bmi_geotiff/_version.py" diff --git a/setup.cfg b/setup.cfg index 35c9fc2..f3d7d5c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,3 @@ -[coverage:run] -relative_files = True - [flake8] exclude = docs ignore = @@ -8,7 +5,3 @@ ignore = E501 W503 max-line-length = 88 - -[zest.releaser] -tag-format = v{version} -python-file-with-version = bmi_geotiff/_version.py From d3ccb2be669e8d6919d094d98cdbdfde803b1de4 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Fri, 22 Mar 2024 13:35:18 -0600 Subject: [PATCH 3/5] Update Actions versions --- .github/workflows/build-test-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-ci.yml b/.github/workflows/build-test-ci.yml index 1bd98e5..352d8d1 100644 --- a/.github/workflows/build-test-ci.yml +++ b/.github/workflows/build-test-ci.yml @@ -22,9 +22,9 @@ jobs: python-version: ["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 From 3251919c93c53aa0de784756ae169b6e29a0da66 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Fri, 22 Mar 2024 15:29:34 -0600 Subject: [PATCH 4/5] Fix pytest config to avoid warning --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f5bc802..0bef313 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ dependencies = [ dynamic = ["readme", "version"] [project.urls] -Homepage = "https://github.com/csdms/bmi-geotiff" +Homepage = "https://csdms.colorado.edu" Documentation = "https://bmi-geotiff.readthedocs.io/" Repository = "https://github.com/csdms/bmi-geotiff" Changelog = "https://github.com/csdms/bmi-geotiff/blob/main/CHANGES.md" @@ -91,7 +91,7 @@ norecursedirs = [".*", "*.egg*", "build", "dist"] addopts = """ --ignore setup.py --tb native - --strict + --strict-markers --durations 16 --doctest-modules -vvv From 6ef62757be965ac804d15e40c3ccfdff5e085ab8 Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Fri, 22 Mar 2024 15:30:18 -0600 Subject: [PATCH 5/5] Pip install bmi-tester; use path for config file The latest version of *bmi-tester* (v0.5.9) isn't available yet on conda-forge. --- noxfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/noxfile.py b/noxfile.py index 880e60a..737f7d9 100644 --- a/noxfile.py +++ b/noxfile.py @@ -36,15 +36,15 @@ def test(session: nox.Session) -> None: @nox.session(name="test-bmi", python=PYTHON_VERSIONS, venv_backend="conda") def test_bmi(session: nox.Session) -> None: """Test the Basic Model Interface.""" - session.conda_install("bmi-tester", "pymt>=1.3") + session.install("bmi-tester>=0.5.9") session.install(".") session.run( "bmi-test", f"{PACKAGE}:BmiGeoTiff", "--config-file", - "./examples/config.yaml", + f"{ROOT}/examples/config.yaml", "--root-dir", - "./examples", + "examples", "-vvv", )