Skip to content

geotiff: golden corpus phase 4 PR 1, fast/slow split (#1930)#2043

Merged
brendancol merged 2 commits into
mainfrom
1930-phase4-1-fast-slow
May 18, 2026
Merged

geotiff: golden corpus phase 4 PR 1, fast/slow split (#1930)#2043
brendancol merged 2 commits into
mainfrom
1930-phase4-1-fast-slow

Conversation

@brendancol
Copy link
Copy Markdown
Contributor

Summary

Phase 4 PR 1 of the golden corpus plan in #1930. Lays down the fast/slow split for the corpus matrix:

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:

pytest test_golden_corpus_eager_numpy_1930.py          -> 26 passed, 7 xfailed, 2 skipped
pytest test_golden_corpus_eager_numpy_1930.py -m "not slow" -> 17 passed, 7 xfailed (1 lossy gap), 2 skipped, 6 deselected

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 deselected
  • Oracle / manifest / nodata smoke tests unchanged

Refs #1930. Closes out phase 4 PR 1; phase 4 PR 2 (baseline-update docs) is the last remaining PR in the plan.

* 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.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 18, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant