Repository navigation
feat(preprocess): add --lola-source flag for arbitrary LOLA sources (… - #6
Merged
Merged
Conversation
…v1.8.3) Adds explicit source-path override to selene preprocess and to pipeline.preprocess_tiled.run_tiled_per_region. Bypasses the PDS-naming priority list in resolve_lola_source, which previously hardcoded ldem_80s_<resolution>m.lbl and would not pick up non-PDS-named LOLA files like PGDA's ldem_83s_10mpp_adj.tif. Override path is validated up front (must exist, be a file, and have a recognised .tif/.lbl/.img suffix); when omitted, the existing auto-detect priority list runs unchanged. Closes one of the v1.6 deferral blockers (the file-resolver gap surfaced when the 10m PGDA mosaic was tried against the existing pipeline). The polygon-coverage blocker — only 3 of 9 USGS polygons fit cleanly inside the 10m mosaic with the 100km horizon-march buffer — remains. Backward compatible: omitting --lola-source preserves the existing auto-detect behaviour. No methodology, data, or validation changes; v1.8 headline numbers (56/69 = 81.2%, median 1.69 km) are unchanged. Test count: 391 collected, 382 passed (+10 new, all synthetic).
CI runners preserve ANSI colour codes and Rich panel/line-wrapping
that local terminals strip. The previous substring assertions
('Invalid value for --lola-source', '--lola-source') could fail
when wrapped across multiple lines or split by injected escape
sequences.
Add a small _normalise_cli_output helper that strips ANSI escapes
and collapses whitespace, then match on tokens short enough to
never straddle a wrap point ('Invalid value', 'lola-source',
'tiled-per-region'). Verified locally with FORCE_COLOR=1.
No implementation change; flag itself is unaffected.
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.
…v1.8.3)
Adds explicit source-path override to selene preprocess and to pipeline.preprocess_tiled.run_tiled_per_region. Bypasses the PDS-naming priority list in resolve_lola_source, which previously hardcoded ldem_80s_m.lbl and would not pick up non-PDS-named LOLA files like PGDA's ldem_83s_10mpp_adj.tif.
Override path is validated up front (must exist, be a file, and have a recognised .tif/.lbl/.img suffix); when omitted, the existing auto-detect priority list runs unchanged.
Closes one of the v1.6 deferral blockers (the file-resolver gap surfaced when the 10m PGDA mosaic was tried against the existing pipeline). The polygon-coverage blocker — only 3 of 9 USGS polygons fit cleanly inside the 10m mosaic with the 100km horizon-march buffer — remains.
Backward compatible: omitting --lola-source preserves the existing auto-detect behaviour. No methodology, data, or validation changes; v1.8 headline numbers (56/69 = 81.2%, median 1.69 km) are unchanged.
Test count: 391 collected, 382 passed (+10 new, all synthetic).
Summary
What this PR does, in 1–3 sentences.
Motivation
Why this change is worth making (link the issue if there is one).
Checklist
ruff check .passesruff format --check .passespytestpasses locally# noqareason if not)reflected in the README or the relevant module docstring
downloaded data (or are guarded with
pytest.mark.skipif)Scope notes
to expect in follow-ups).