geotiff: golden corpus phase 4 PR 1, fast/slow split (#1930)#2043
Merged
Conversation
* Register the ``slow`` pytest marker in setup.cfg. * Add ``xrspatial/geotiff/tests/golden_corpus/_marks.py`` with ``fast_slow_marks_for(entry)`` -- a small helper each backend test module can splat into its ``_build_param`` ``marks=`` list. A fixture is fast iff ``"fast"`` appears in its manifest ``tags``; everything else picks up ``pytest.mark.slow`` automatically. * Wire the helper into the merged eager-numpy module (``test_golden_corpus_eager_numpy_1930.py``). The other phase-3 backend modules pick it up as they merge; each PR's review pass can add the one-line splat. * Document the convention in ``xrspatial/geotiff/tests/golden_corpus/README.md``. Current calibration: 17 fast cells, 6 slow (the compression fixtures in the manifest do not carry a ``"fast"`` tag). ``pytest -m "not slow"`` deselects the 6 compression cells; the default ``pytest`` runs everything. If the team wants the compression cells in the fast lane that is a one-line manifest edit per fixture, not a code change.
2 tasks
Address phase 4 PR 1 review: * The docstring on ``_marks.py`` and the corpus ``README.md`` claimed "every shipped fixture carries ``fast``", but the six ``compression_*`` fixtures do not -- they land in the slow lane today. Update both notes to match reality and document the manifest-edit recipe to move them to fast if desired. * Change ``fast_slow_marks_for`` to return ``list[pytest.MarkDecorator]`` directly instead of yielding from a generator. Callers always consume via ``list(...)`` anyway; the generator indirection only added one frame of confusion.
This was referenced May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 4 PR 1 of the golden corpus plan in #1930. Lays down the fast/slow split for the corpus matrix:
slowpytest marker insetup.cfgso the rest of the test suite can opt in.xrspatial/geotiff/tests/golden_corpus/_marks.pywithfast_slow_marks_for(entry). A fixture is fast iff"fast"appears in its manifesttags; everything else picks uppytest.mark.slowautomatically. The helper is a generator so backend test modules can splat it intopytest.param(..., marks=...)without an empty-mark guard.test_golden_corpus_eager_numpy_1930.py). The other five phase-3 backend modules (dask+numpy geotiff: golden corpus phase 3 PR 2, dask+numpy backend (#1930) #2038, GPU geotiff: golden corpus phase 3 PR 3, GPU backend (#1930) #2039, dask+GPU geotiff: golden corpus phase 3 PR 4, dask+GPU backend (#1930) #2040, HTTP/COG geotiff: golden corpus phase 3 PR 5, HTTP/COG backend (#1930) #2041, VRT geotiff: golden corpus phase 3 PR 6, VRT backend (#1930) #2042) pick this up as each merges; the one-line splat fits into each PR's review pass.xrspatial/geotiff/tests/golden_corpus/README.md.Current calibration
17 fast cells, 6 slow. The six slow cells are the
compression_*fixtures, which do not carry a"fast"tag in the manifest today. Sample run:If the team wants the compression fixtures in the fast lane that is a one-line manifest edit per fixture, not a code change.
Test plan
pytest xrspatial/geotiff/tests/test_golden_corpus_eager_numpy_1930.py: 26 passed, 7 xfailed, 2 skipped (no change in default behavior)pytest xrspatial/geotiff/tests/test_golden_corpus_eager_numpy_1930.py -m "not slow": 17 passed, 6 deselectedRefs #1930. Closes out phase 4 PR 1; phase 4 PR 2 (baseline-update docs) is the last remaining PR in the plan.