Skip to content

CI: run geotiff golden_corpus tests with rasterio installed from conda-forge #2289

@brendancol

Description

@brendancol

Reason or Problem

The current test.yml workflow installs xrspatial via pip and does not pull in rasterio. Every golden_corpus test under xrspatial/geotiff/tests/ that starts with pytest.importorskip('rasterio') is silently skipped on CI. The oracle in golden_corpus/_oracle.py checks xrspatial output against what rasterio reads from the same file, so right now the parity assertions never actually run on a hosted runner.

Rasterio is awkward to install via pip on all three OS targets because the wheels depend on GDAL. Easier to run a separate CI job that gets rasterio (and its GDAL stack) from conda-forge and runs the geotiff golden_corpus tests there.

Proposal

Add .github/workflows/test-geotiff-corpus.yml. Triggers match test.yml, but:

  • Provision a conda env from conda-forge using mamba-org/setup-micromamba (or conda-incubator/setup-miniconda).
  • Install rasterio, gdal, and the project's test extras into that env.
  • Run pytest xrspatial/geotiff/tests/ -m "not slow" on PRs and the full set on push-to-main / nightly cron.

Value: the parity oracle stops being a no-op on CI. Drift from rasterio's reads gets caught on every PR instead of only when somebody happens to run the suite locally.

Drawbacks

A second workflow adds a few minutes per PR. Conda-forge installs are slower than pip wheels; micromamba keeps the difference small.

Alternatives

Add rasterio to the existing test.yml matrix. Skipped because GDAL under pip is fragile across the OS matrix, and one bad install would take down the whole job instead of an isolated one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions