Skip to content

rio-cogeo / GDAL validate_cloud_optimized_geotiff as required CI gate (#2286 prod-ready wave C) #2302

@brendancol

Description

@brendancol

Follow-up to #2286 / #2292.

The compliance suite in xrspatial/geotiff/tests/test_cog_writer_compliance.py runs an optional rio-cogeo / GDAL validate_cloud_optimized_geotiff check that pytest.skips cleanly when neither package is installed. An optional interop validator that silently skips is not a production guarantee. This issue stands up a CI job that installs rio-cogeo + GDAL and runs that validation strictly.

Required changes

CI workflow

In .github/workflows/ (whichever file runs pytest), add a new job (or extend an existing one) that:

  • Installs rio-cogeo and the GDAL Python bindings on Linux.
  • Sets an env var like XRSPATIAL_REQUIRE_COG_VALIDATOR=1.
  • Runs the COG compliance subset: pytest xrspatial/geotiff/tests/test_cog_writer_compliance.py xrspatial/geotiff/tests/test_cog_parity_2286.py -x.

Keep the existing matrix jobs as-is — this is an additional job, not a replacement.

Test file

xrspatial/geotiff/tests/test_cog_writer_compliance.py:

  • The current optional validator block should:
    • Skip (current behavior) when XRSPATIAL_REQUIRE_COG_VALIDATOR is not set and rio-cogeo / GDAL is missing.
    • Fail (not skip) when XRSPATIAL_REQUIRE_COG_VALIDATOR=1 is set and the dependency is missing — so a misconfigured CI job is loud, not silent.
    • Run the validator and fail on its findings (current behavior, when the dependency is available).

Docs

In docs/source/reference/geotiff.rst, add a one-paragraph note under the stable contract that the writer is validated against rio-cogeo / validate_cloud_optimized_geotiff in CI.

Out of scope

  • Promoting tiers (separate issue).
  • Adding validator coverage for HTTP COG (separate issue if needed).
  • Adding the gate to Windows / macOS — Linux-only is fine for the first cut since GDAL bindings are simplest there.

Acceptance

  • New (or extended) CI job runs and is required for PRs.
  • Compliance suite fails — does not skip — when XRSPATIAL_REQUIRE_COG_VALIDATOR=1 and the dependency is missing.
  • Compliance suite passes on the new job with the dependency present.
  • Docs reference page mentions the CI validator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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