geotiff: wire fast/slow CI split and add determinism gate (#1930)#2062
Merged
Conversation
PR runs use `pytest -m "not slow"` so the six compression fixtures (tagged via `_marks.fast_slow_marks_for`) drop out of the fast lane. push-to-main, a nightly cron at 03:00 UTC, and a `workflow_dispatch` manual trigger run the full corpus with no filter. Adds `test_corpus_determinism.py`: regenerates every manifest fixture into a tmp dir once per session and md5s it against the committed bytes. Also asserts no orphan `.tif` files on disk. The module runs in about 0.3s.
* `_md5()` passes `usedforsecurity=False` so FIPS-strict runners do not raise. Use is byte-identity only, no security claim. * External-overview sidecar test now parametrises over every manifest entry with `external_overview: true` so a future fixture is covered without a code change. Today's single sidecar still runs. * `_manifest_ids` / `_load_entries` cached at import as module-level tuples; parametrize and the orphan-file test share one manifest load + validation per session. * Docstring runtime claim swapped for the measured ~0.3s. * Workflow comment notes that GitHub Actions `schedule` triggers only fire from the default branch, so cron on a feature branch is a no-op.
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
.github/workflows/test.yml. PRs runpytest -m "not slow", which drops the six compression fixtures. push-to-main runs the full set, and a new nightly cron at 03:00 UTC plus aworkflow_dispatchbutton run the full corpus too.test_corpus_determinism.pyunderxrspatial/geotiff/tests/golden_corpus/. It regenerates every manifest fixture into a session-scoped tmp dir, md5s each one against the committed bytes, and asserts no orphan.tiffiles are sitting on disk. That covers two failure modes in one gate: a generator-side regression, and a manually-edited or stale committed fixture.slowmark, so the PR fast lane catches the regression too. Runtime is ~0.3s for 30 fixtures.Refs #1930.
Test plan
pytest -m "not slow" xrspatial/geotiff/tests/test_golden_corpus_eager_numpy_1930.py xrspatial/geotiff/tests/golden_corpus/ -q-- 103 passed, 6 deselected (the compression cells), 3 skipped.pytest xrspatial/geotiff/tests/golden_corpus/test_corpus_determinism.py -v-- 31 passed, 1 skipped (the schema-only example).python -c "import yaml; yaml.safe_load(open('.github/workflows/test.yml'))".