Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/Ouranosinc/cookiecutter-pypackage",
"commit": "66708e5e15f00caaaaf1748bf0a7e041bc5c6243",
"commit": "273d570f627b0ac0fb07c2457f0072e492bff6d7",
"context": {
"cookiecutter": {
"full_name": "David Huard",
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- '.yamllint.yml'
- '.github/workflows/*'
- 'docs/Makefile'
- 'tox.ini'
- 'tox.toml'
- 'CI/**/*'
- 'Makefile'
# label 'docs' all documentation-related steps and files
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
- environment-dev.yml
- pyproject.toml
- tests/**.py
- tox.ini
- tox.toml
- src/ravenpy/__init__.py
workflow_dispatch:

Expand All @@ -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
Expand All @@ -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: |
Expand Down
38 changes: 18 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand All @@ -82,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'
Expand Down Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/tag-testpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: |
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]
Expand Down Expand Up @@ -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' ]
Expand All @@ -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
Expand Down Expand Up @@ -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' ]
Expand Down
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -83,7 +83,8 @@ dev = [
"pytest >=8.3.2",
"pytest-cov >=5.0.0",
"pytest-xdist >=3.2.0",
"ruff >=0.13.3",
"requests >=2.32.2",
"ruff >=0.14.3",
"tox >=4.30.3",
"vulture >=2.14",
"watchdog >=4.0.0"
Expand Down Expand Up @@ -277,7 +278,7 @@ include = [
"setup.cfg",
"tests/*.py",
"tests/test.cfg",
"tox.ini"
"tox.toml"
]
exclude = [
"**/*.py[co]",
Expand Down
3 changes: 3 additions & 0 deletions tests/test_geoserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import numpy as np
import pytest
from requests.exceptions import HTTPError


@pytest.mark.online
Expand Down Expand Up @@ -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")
Expand Down
83 changes: 0 additions & 83 deletions tox.ini

This file was deleted.

Loading