docs(data): pipeline overview, band contract, and smoke tests#33
Merged
docs(data): pipeline overview, band contract, and smoke tests#33
Conversation
Codifies Data Pipeline & GIS Lead responsibilities: real GEE tile downloads, analysis-specific band mapping, SCL cloud masking at inference time, and the synthetic-fallback guardrail.
Single page covering each file in the data package, the analysis-type band contract, the SCL cloud-masking rules, and the synthetic-fallback metadata convention. Helps new contributors avoid hardcoding band lists.
Verifies the analysis-type → band contract holds: - Sentinel-2 13-band canonical order - Per-analysis band counts (4/4/3 for deforestation/ice/flood) - SCL append-without-duplicate invariant - Band index resolution and rejection of unknown bands - Enabled vs disabled analysis types from config.yaml
Goldokpa
approved these changes
May 5, 2026
Member
Goldokpa
left a comment
There was a problem hiding this comment.
README is a good summary of the band-mapping contract — that's what new contributors actually need to align on before touching the preprocessor. The smoke tests in test_band_mapping.py give us a real safety net on the band lookups; we've been flying without those.
Note for the team: this PR adds a role doc back to team_docs/. We previously closed #17 and #25 on the rule that team_docs stays local-only. If we're reversing that decision, let's make it explicit in CONTRIBUTING.md so we don't keep re-litigating it. Approving and merging on the strength of the docs + tests.
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
src/climatevision/data/README.md— first single-page overview of thedata module: per-file purpose (
gee_downloader,band_mapping,preprocessing,transforms,sampling,quality,validation), theper-analysis band contract (4/4/3 channels for deforestation/ice/flood),
the SCL cloud-masking rules, and the synthetic-fallback metadata
convention (
is_synthetic: true).tests/test_band_mapping.py— 12 smoke tests guarding theanalysis-type → band contract: per-analysis band counts, SCL
append-without-duplicate invariant, band-index resolution, and
enabled vs disabled types from
config.yaml.team_docs/Adeolu_Mary_Oshadare_Role.pdf— Data Pipeline & GIS Leadrole specification (related to the team docs effort).
Why
The data module had no overview document — new contributors had to read
seven files to understand the pipeline. The README is now the single
landing page.
The band contract has only been enforced by convention so far. The smoke
tests catch silent regressions where, e.g., the flooding analysis
unexpectedly receives 4-channel inputs instead of 3 — the kind of break
that surfaces as cryptic shape mismatches at inference time. Closes
part of the analysis-aware data work tracked in PM_ROLE_UPDATES_FOR_GAPS.md.
Test plan
pytest tests/test_band_mapping.py -vpasses (12 tests)python -c "from climatevision.data.band_mapping import get_bands_for_analysis; print(get_bands_for_analysis('flooding'))"returns['B03', 'B08', 'B11']