Skip to content

feat: Phase 4 — CLI and S3 (#139)#155

Merged
emmanuelmathot merged 1 commit intos1-rtcfrom
s1-rtc-phase4
Apr 2, 2026
Merged

feat: Phase 4 — CLI and S3 (#139)#155
emmanuelmathot merged 1 commit intos1-rtcfrom
s1-rtc-phase4

Conversation

@emmanuelmathot
Copy link
Copy Markdown
Contributor

Phase 4 — CLI and S3

Closes the Phase 4 checklist in #139.

Changes

validate-s1 CLI subcommand (cli.py)

  • Validates an S1 RTC store against the S1RtcRoot Pydantic schema
  • --verbose shows orbit directions, data arrays, coordinates, and conditions status
  • Supports both local and S3 paths

S3 output support (s1_ingest.py)

  • create_s1_store / ingest_s1tiling_acquisition / ingest_s1tiling_conditions now use open_zarr_group() and path_exists() from fs_utils, making them S3-transparent
  • consolidate_s1_store follows the S2 pattern: opens the store, passes root.store to zarr.consolidate_metadata()

E2E CLI test (test_cli_e2e.py)

  • Full pipeline: ingest-s1ingest-s1-conditionsconsolidate-s1validate-s1 → xarray readback
  • Negative test: validate-s1 on an invalid store returns non-zero
  • Help test: all 4 S1 subcommands (ingest-s1, ingest-s1-conditions, consolidate-s1, validate-s1)

CLI subcommands (complete set after Phase 3 + 4)

Subcommand Description
ingest-s1 Ingest VV + VH + border mask GeoTIFFs
ingest-s1-conditions Ingest gamma_area / LIA / incidence_angle
consolidate-s1 Post-batch Zarr metadata consolidation
validate-s1 Schema validation against S1RtcRoot

Test results

  • 54 existing S1 tests ✅
  • 3 new E2E CLI tests ✅

- Add validate-s1 CLI subcommand (Pydantic schema validation)
- S3 output support in s1_ingest.py via open_zarr_group/path_exists
- Consolidation follows S2 pattern: root.store passed to zarr.consolidate_metadata
- E2E CLI test: ingest-s1 → ingest-s1-conditions → consolidate-s1 → validate-s1 → xarray readback
Copy link
Copy Markdown
Contributor Author

@emmanuelmathot emmanuelmathot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emmanuelmathot emmanuelmathot merged commit 0bfb0e0 into s1-rtc Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant