From 6396f4703e77697fb6c3d48236f7130d8b650bba Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 17:12:19 +0000 Subject: [PATCH 1/9] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.20.0 → v3.21.0](https://github.com/asottile/pyupgrade/compare/v3.20.0...v3.21.0) - [github.com/astral-sh/ruff-pre-commit: v0.13.3 → v0.14.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.13.3...v0.14.3) - [github.com/python-jsonschema/check-jsonschema: 0.34.0 → 0.34.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.34.0...0.34.1) - [github.com/woodruffw/zizmor-pre-commit: v1.14.2 → v1.16.2](https://github.com/woodruffw/zizmor-pre-commit/compare/v1.14.2...v1.16.2) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 868c24a5..b0e77869 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ default_language_version: repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.20.0 + rev: v3.21.0 hooks: - id: pyupgrade args: [ '--py39-plus' ] @@ -49,7 +49,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.13.3 + rev: v0.14.3 hooks: - id: ruff-check args: [ '--fix', '--show-fixes' ] @@ -92,12 +92,12 @@ repos: - id: numpydoc-validation exclude: "^docs/|^tests/" - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.34.0 + rev: 0.34.1 hooks: - id: check-github-workflows - id: check-readthedocs - repo: https://github.com/woodruffw/zizmor-pre-commit - rev: v1.14.2 + rev: v1.16.2 hooks: - id: zizmor args: [ '--config=.zizmor.yml' ] From 0e3a471fc70e85085e77f39d5716a2b0ef65352d Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 5 Nov 2025 15:07:31 -0500 Subject: [PATCH 2/9] updatew cookiecutter, drop tox.ini Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> --- .cruft.json | 4 +- .github/labeler.yml | 2 +- .github/workflows/bump-version.yml | 7 ++- .github/workflows/main.yml | 30 +++++------ .github/workflows/publish-pypi.yml | 7 ++- .github/workflows/tag-testpypi.yml | 7 ++- .pre-commit-config.yaml | 2 +- pyproject.toml | 6 +-- tox.ini | 83 ------------------------------ tox.toml | 69 +++++++++++++++++++++++++ 10 files changed, 105 insertions(+), 112 deletions(-) delete mode 100644 tox.ini create mode 100644 tox.toml diff --git a/.cruft.json b/.cruft.json index 1d67f89a..5c16d791 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/Ouranosinc/cookiecutter-pypackage", - "commit": "66708e5e15f00caaaaf1748bf0a7e041bc5c6243", + "commit": "273d570f627b0ac0fb07c2457f0072e492bff6d7", "context": { "cookiecutter": { "full_name": "David Huard", @@ -22,7 +22,7 @@ "generated_with_cruft": "y", "__gh_slug": "https://github.com/CSHS-CWRA/RavenPy", "_template": "https://github.com/Ouranosinc/cookiecutter-pypackage", - "_commit": "66708e5e15f00caaaaf1748bf0a7e041bc5c6243" + "_commit": "273d570f627b0ac0fb07c2457f0072e492bff6d7" } }, "directory": null, diff --git a/.github/labeler.yml b/.github/labeler.yml index 8dab647e..e09128e7 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -18,7 +18,7 @@ - '.yamllint.yml' - '.github/workflows/*' - 'docs/Makefile' - - 'tox.ini' + - 'tox.toml' - 'CI/**/*' - 'Makefile' # label 'docs' all documentation-related steps and files diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index a0fb70c6..f2c7c3b6 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -32,7 +32,7 @@ on: - environment-dev.yml - pyproject.toml - tests/**.py - - tox.ini + - tox.toml - src/ravenpy/__init__.py workflow_dispatch: @@ -45,6 +45,9 @@ jobs: permissions: actions: read contents: write + strategy: + matrix: + python-version: [ "3.13" ] steps: - name: Harden Runner uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 @@ -65,7 +68,7 @@ jobs: - name: Set up Python3 uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: "3.x" + python-version: ${{ matrix.python-version }} - name: Config Commit Bot run: | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d55e9b1d..fcd524b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,9 @@ jobs: lint: name: Code linting runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.13" ] steps: - name: Harden Runner uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 @@ -37,7 +40,7 @@ jobs: - name: Set up Python${{ matrix.python-version }} uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: "3.x" + python-version: ${{ matrix.python-version }} cache: pip - name: Install CI libraries run: | @@ -47,7 +50,7 @@ jobs: with: path: | .tox - key: ${{ hashFiles('pyproject.toml', 'tox.ini') }}-lint + key: ${{ hashFiles('pyproject.toml', 'tox.toml') }}-lint - name: Run linting suite run: | python -m tox -e lint @@ -61,11 +64,9 @@ jobs: matrix: os: [ 'ubuntu-latest', "macos-latest" ] python-version: [ "3.11", "3.12", "3.13" ] - tox-env: [ 'false' ] include: - os: 'ubuntu-latest' python-version: '3.10' - tox-env: 'py3.10-coverage-upstream' steps: - name: Harden Runner uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 @@ -120,22 +121,19 @@ jobs: ~/.cache/raven-testdata key: ${{ hashFiles('src/ravenpy/testing/registry.txt') }}-${{ env.RAVEN_TESTDATA_BRANCH }}-${{ matrix.os }} - - name: Test with tox and report coverage + - name: Test with tox run: | - if [ "${{ matrix.tox-env }}" != "false" ]; then - python3 -m tox -e ${{ matrix.tox-env }}-prefetch - elif [ "${{ matrix.python-version }}" != "3.13" ]; then - python3 -m tox -e py${{ matrix.python-version }}-prefetch-coverage - else - python3 -m tox -e py${{ matrix.python-version }}-prefetch - fi + python3 -m tox env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_FLAG_NAME: run-Python${{ matrix.python-version }}-${{ matrix.os }} - COVERALLS_PARALLEL: true - COVERALLS_SERVICE_NAME: github + TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}} UPSTREAM_BRANCH: ${{ matrix.upstream-branch }} + - name: Report Coverage + uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6 + with: + flag-name: run-${{ matrix.python-version }}-${{ matrix.os }}-pypi + parallel: true + conda: name: Test with Python${{ matrix.python-version }} (Anaconda, ${{ matrix.os }}) needs: lint diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 3f25cc7c..779d4de5 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -16,6 +16,9 @@ jobs: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.13" ] steps: - name: Harden Runner uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 @@ -35,10 +38,10 @@ jobs: with: persist-credentials: false - - name: Set up Python3 + - name: Set up Python${{ matrix.python-version }} uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: "3.x" + python-version: ${{ matrix.python-version }} - name: Install CI libraries run: | diff --git a/.github/workflows/tag-testpypi.yml b/.github/workflows/tag-testpypi.yml index bc918213..39f787c0 100644 --- a/.github/workflows/tag-testpypi.yml +++ b/.github/workflows/tag-testpypi.yml @@ -44,6 +44,9 @@ jobs: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.13" ] steps: - name: Harden Runner uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 @@ -63,10 +66,10 @@ jobs: with: persist-credentials: false - - name: Set up Python3 + - name: Set up Python${{ matrix.python-version }} uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 with: - python-version: "3.x" + python-version: ${{ matrix.python-version }} - name: Install CI libraries run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b0e77869..c2549505 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -58,7 +58,7 @@ repos: rev: 7.3.0 hooks: - id: flake8 - additional_dependencies: [ 'flake8-rst-docstrings==0.3.1' ] + additional_dependencies: [ 'flake8-rst-docstrings==0.4.0' ] args: [ '--config=.flake8' ] - repo: https://github.com/jendrikseipp/vulture rev: v2.14 diff --git a/pyproject.toml b/pyproject.toml index 121af31a..d140a514 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ dev = [ "coverage >=7.5.0", "filelock >=3.14.0", "flake8 >=7.3.0", - "flake8-rst-docstrings >=0.3.1", + "flake8-rst-docstrings >=0.4.0", "flit >=3.11.0,<4.0", "holoviews", "hvplot", @@ -83,7 +83,7 @@ dev = [ "pytest >=8.3.2", "pytest-cov >=5.0.0", "pytest-xdist >=3.2.0", - "ruff >=0.13.3", + "ruff >=0.14.3", "tox >=4.30.3", "vulture >=2.14", "watchdog >=4.0.0" @@ -277,7 +277,7 @@ include = [ "setup.cfg", "tests/*.py", "tests/test.cfg", - "tox.ini" + "tox.toml" ] exclude = [ "**/*.py[co]", diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 7c1a84f4..00000000 --- a/tox.ini +++ /dev/null @@ -1,83 +0,0 @@ -[tox] -min_version = 4.30.3 -envlist = - lint - py{3.10,3.11,3.12,3.13} - docs -requires = - flit >= 3.11.0,<4.0 - pip >= 25.2 - setuptools >= 71.0 -opts = - --verbose - -[gh] -python = - 3.10 = py3.10-coverage-upstream-prefetch - 3.11 = py3.11-coverage-prefetch - 3.12 = py3.12-coverage-prefetch - 3.13 = py3.13-prefetch # coveralls not supported on 3.13 - -[testenv:lint] -skip_install = True -deps = - flake8 >=7.3.0 - flake8-rst-docstrings >=0.3.1 - ruff >=0.13.3 - numpydoc >=1.9.0 -commands = - make lint -allowlist_externals = - make - -[testenv:docs] -extras = - docs -commands = - make autodoc-custom-index - make --directory=docs clean html -allowlist_externals = - make - -[testenv] -setenv = - PYTEST_ADDOPTS = --numprocesses=logical --durations=10 --cov=ravenpy - PYTHONPATH = {toxinidir} - UPSTREAM_BRANCH = main - TOX = {envname} -passenv = - CI - COVERALLS_* - GDAL_VERSION - GITHUB_* - LD_LIBRARY_PATH - RAVEN_* - UPSTREAM_BRANCH -extras = - dev - gis - raven-hydro -download = true -install_command = - python -m pip install --no-user {opts} {packages} -deps = - coverage: coveralls>=4.0.1 - ; numpy must be present in python env before GDAL is installed - numpy >=1.25.0 - gdal == {env:GDAL_VERSION} -commands_pre = - python -m pip list - python -m pip check -commands = - ; Rebuild GDAL in order to gain access to GDAL system-level objects - python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir --no-build-isolation gdal[numpy]=={env:GDAL_VERSION}.* - ; Install raven-hydro from the upstream branch - upstream: python -m pip install --upgrade --force-reinstall --no-deps --no-cache-dir git+https://github.com/Ouranosinc/raven-hydro.git@{env:UPSTREAM_BRANCH} - ; Prefetch testing data - prefetch: python -c "import ravenpy.testing.utils as rtu; rtu.populate_testing_data(branch=\"{env:RAVEN_TESTDATA_BRANCH}\")" - ; Run tests - pytest {posargs} - coverage: - coveralls -allowlist_externals = - make - env diff --git a/tox.toml b/tox.toml new file mode 100644 index 00000000..f6eacecd --- /dev/null +++ b/tox.toml @@ -0,0 +1,69 @@ +envlist = [ + "lint", + "py3.{10,11,12,13}", + "docs" +] +requires = [ + "flit >= 3.11.0,<4.0", + "pip >= 25.2", + "setuptools >= 71.0", + "tox >= 4.30.3" +] +skip_missing_interpreters = true + +[dependency_groups] +lint = [ + "flake8 >= 7.3.0", + "flake8-rst-docstrings >= 0.4.0", + "ruff >= 0.14.3", + "numpydoc >= 1.9.0" +] + +[env.docs] +extras = ["docs"] +commands = [ + ["make", "autodoc"], + ["make", "--directory=docs", "clean", "html"] +] +commands_post = [] +allowlist_externals = ["make"] + +[env.lint] +skip_install = true +dependency_groups = ["lint"] +commands = [["make", "lint"]] +commands_post = [] +allowlist_externals = ["make"] + +[env.upstream] +commands_pre = [ + ["python", "-m", "pip", "list"], + ["python", "-m", "pip", "check"], + ["python", "-m", "pip", "install", "--upgrade", "--force-reinstall", "--no-deps", "--no-cache-dir", "git+https://github.com/Ouranosinc/raven-hydro.git@{env:UPSTREAM_BRANCH}"] +] + +[env_run_base] +setenv = {PYTEST_ADDOPTS = "--numprocesses=logical --durations=10 --cov=ravenpy", PYTHONPATH = "{toxinidir}", UPSTREAM_BRANCH = "main", TOX = "{envname}"} +passenv = ["CI", "COVERALLS_*", "GDAL_VERSION", "GITHUB_*", "LD_LIBRARY_PATH", "RAVEN_*", "UPSTREAM_BRANCH"] +extras = ["dev", "gis", "raven-hydro"] +download = true +install_command = ["python", "-m", "pip", "install", "--no-user", "{opts}", "{packages}"] +deps = ["numpy >= 1.25.0", "gdal == {env:GDAL_VERSION}"] +commands_pre = [ + ["python", "-m", "pip", "list"], + ["python", "-m", "pip", "check"] +] +commands = [ + ["python", "-m", "pip", "install", "--upgrade", "--force-reinstall", "--no-deps", "--no-cache-dir", "--no-build-isolation", "gdal[numpy]=={env:GDAL_VERSION}.*"], + ["python", "-c", "import ravenpy.testing.utils as rtu; rtu.populate_testing_data(branch=\"{env:RAVEN_TESTDATA_BRANCH}\")"] +] +commands_post = [ + ["pytest", "{posargs}"], + ["coverage", "report"] +] + +[gh.python] +"3.10" = ["upstream"] +"3.11" = ["py3.11"] +"3.12" = ["py3.12"] +"3.13" = ["py3.13"] From 1fe73634c9e06d8465a99f33fb3038dc8a70e0a8 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 5 Nov 2025 15:10:37 -0500 Subject: [PATCH 3/9] drop deps in lint Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> --- tox.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.toml b/tox.toml index f6eacecd..7f4204c0 100644 --- a/tox.toml +++ b/tox.toml @@ -31,6 +31,7 @@ allowlist_externals = ["make"] [env.lint] skip_install = true dependency_groups = ["lint"] +deps = [] commands = [["make", "lint"]] commands_post = [] allowlist_externals = ["make"] From 57b47f766d07e572933f03e9a553aa0c7f00ad03 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 5 Nov 2025 15:12:35 -0500 Subject: [PATCH 4/9] do not use dependency-groups Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> --- tox.toml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tox.toml b/tox.toml index 7f4204c0..ecde8566 100644 --- a/tox.toml +++ b/tox.toml @@ -11,14 +11,6 @@ requires = [ ] skip_missing_interpreters = true -[dependency_groups] -lint = [ - "flake8 >= 7.3.0", - "flake8-rst-docstrings >= 0.4.0", - "ruff >= 0.14.3", - "numpydoc >= 1.9.0" -] - [env.docs] extras = ["docs"] commands = [ @@ -30,8 +22,12 @@ allowlist_externals = ["make"] [env.lint] skip_install = true -dependency_groups = ["lint"] -deps = [] +deps = [ + "flake8 >= 7.3.0", + "flake8-rst-docstrings >= 0.4.0", + "ruff >= 0.14.3", + "numpydoc >= 1.9.0" +] commands = [["make", "lint"]] commands_post = [] allowlist_externals = ["make"] From 8e3bd5098a4c0ab274f535dc874ba6c0aeb9c66c Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 5 Nov 2025 15:29:11 -0500 Subject: [PATCH 5/9] --no-user, rebuild h5py in tox Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> --- tox.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.toml b/tox.toml index ecde8566..d604919e 100644 --- a/tox.toml +++ b/tox.toml @@ -36,7 +36,7 @@ allowlist_externals = ["make"] commands_pre = [ ["python", "-m", "pip", "list"], ["python", "-m", "pip", "check"], - ["python", "-m", "pip", "install", "--upgrade", "--force-reinstall", "--no-deps", "--no-cache-dir", "git+https://github.com/Ouranosinc/raven-hydro.git@{env:UPSTREAM_BRANCH}"] + ["python", "-m", "pip", "install", "--no-user", "--upgrade", "--force-reinstall", "--no-deps", "--no-cache-dir", "git+https://github.com/Ouranosinc/raven-hydro.git@{env:UPSTREAM_BRANCH}"] ] [env_run_base] @@ -51,7 +51,8 @@ commands_pre = [ ["python", "-m", "pip", "check"] ] commands = [ - ["python", "-m", "pip", "install", "--upgrade", "--force-reinstall", "--no-deps", "--no-cache-dir", "--no-build-isolation", "gdal[numpy]=={env:GDAL_VERSION}.*"], + ["python", "-m", "pip", "install", "--no-user", "--upgrade", "--force-reinstall", "--no-deps", "--no-binary", "h5py", "h5py>=3.12.1"], + ["python", "-m", "pip", "install", "--no-user", "--upgrade", "--force-reinstall", "--no-deps", "--no-cache-dir", "--no-build-isolation", "gdal[numpy]=={env:GDAL_VERSION}.*"], ["python", "-c", "import ravenpy.testing.utils as rtu; rtu.populate_testing_data(branch=\"{env:RAVEN_TESTDATA_BRANCH}\")"] ] commands_post = [ From ec0d8a482416662543a5d96ac918c33df0576b6b Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 5 Nov 2025 16:00:09 -0500 Subject: [PATCH 6/9] add HDF5 to installed system libs Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> --- .github/workflows/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fcd524b9..6cb07bba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -83,17 +83,17 @@ jobs: python-version: ${{ matrix.python-version }} cache: pip - - name: Install GDAL + Set GDAL_VERSION (Ubuntu) + - name: Install GDAL/HDF5 + Set GDAL_VERSION (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install libgdal-dev + sudo apt-get install libgdal-dev libhdf5-dev echo "GDAL_VERSION=$(gdal-config --version)" >> $GITHUB_ENV - - name: Install GDAL (macOS) + - name: Install GDAL/HDF5 (macOS) if: matrix.os == 'macos-latest' uses: tecolicom/actions-use-homebrew-tools@b9c066b79607fa3d71e0be05d7003bb75fd9ff34 # v1.3 with: - tools: gdal + tools: gdal,hdf5 cache: "yes" - name: Set GDAL_VERSION (macOS) if: matrix.os == 'macos-latest' @@ -125,7 +125,7 @@ jobs: run: | python3 -m tox env: - TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}} + TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }} UPSTREAM_BRANCH: ${{ matrix.upstream-branch }} - name: Report Coverage From 88daa8d806db8380b75035eab360d6c93f0e465b Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 5 Nov 2025 16:12:12 -0500 Subject: [PATCH 7/9] correct typo Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6cb07bba..eef3ef00 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,7 +93,7 @@ jobs: if: matrix.os == 'macos-latest' uses: tecolicom/actions-use-homebrew-tools@b9c066b79607fa3d71e0be05d7003bb75fd9ff34 # v1.3 with: - tools: gdal,hdf5 + tools: gdal hdf5 cache: "yes" - name: Set GDAL_VERSION (macOS) if: matrix.os == 'macos-latest' From f5a668a582648127758d7e275f50c88a578f5d61 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 5 Nov 2025 16:22:49 -0500 Subject: [PATCH 8/9] add requests for testing, mark test as xfail on GitHub Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> --- pyproject.toml | 1 + tests/test_geoserver.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index d140a514..cc314590 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,6 +83,7 @@ dev = [ "pytest >=8.3.2", "pytest-cov >=5.0.0", "pytest-xdist >=3.2.0", + "requests >=2.32.2", "ruff >=0.14.3", "tox >=4.30.3", "vulture >=2.14", diff --git a/tests/test_geoserver.py b/tests/test_geoserver.py index 1c6fd253..374e407c 100644 --- a/tests/test_geoserver.py +++ b/tests/test_geoserver.py @@ -5,6 +5,7 @@ import numpy as np import pytest +from requests.exceptions import HTTPError @pytest.mark.online @@ -152,7 +153,9 @@ def test_get_feature_attributes_wfs(self): assert gdf.STATE_NAME.unique() == "Nevada" +# FIXME: Something strange is going on with GitHub Actions and PAVICS Geoserver access. Investigate. @pytest.mark.online +@pytest.mark.xfail(HTTPError, reason="Geoserver WCS seems to be inaccessible from GitHub.", strict=False) class TestWCS: io = pytest.importorskip("ravenpy.utilities.io") geoserver = pytest.importorskip("ravenpy.utilities.geoserver") From ab76cb5775721d989345570484198ed175383261 Mon Sep 17 00:00:00 2001 From: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 5 Nov 2025 16:36:51 -0500 Subject: [PATCH 9/9] report coverage with lcov file Signed-off-by: Trevor James Smith <10819524+Zeitsperre@users.noreply.github.com> --- tox.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.toml b/tox.toml index d604919e..f63e935a 100644 --- a/tox.toml +++ b/tox.toml @@ -40,7 +40,7 @@ commands_pre = [ ] [env_run_base] -setenv = {PYTEST_ADDOPTS = "--numprocesses=logical --durations=10 --cov=ravenpy", PYTHONPATH = "{toxinidir}", UPSTREAM_BRANCH = "main", TOX = "{envname}"} +setenv = {PYTEST_ADDOPTS = "--numprocesses=logical --durations=10 --cov=ravenpy --cov-report=lcov", PYTHONPATH = "{toxinidir}", TOX = "{envname}", UPSTREAM_BRANCH = "main"} passenv = ["CI", "COVERALLS_*", "GDAL_VERSION", "GITHUB_*", "LD_LIBRARY_PATH", "RAVEN_*", "UPSTREAM_BRANCH"] extras = ["dev", "gis", "raven-hydro"] download = true