Skip to content

fix(percentile): fail the run when a month mosaic fails - #28

Merged
jravani merged 1 commit into
enerplanetfrom
fix/percentile-fail-on-month-error
Oct 6, 2026
Merged

jravani merged 1 commit into
enerplanetfrom
fix/percentile-fail-on-month-error

Conversation

@jravani

@jravani jravani commented Oct 6, 2026

Copy link
Copy Markdown
Member

Summary

construct_and_save_mosaics() in all three percentile indexers (COSMO-REA6, ERA5-Land, MERRA-2) logged a failed month and carried on, and _build_month_mosaic() returned "no spatial maps" and "no readable source files" as ordinary status strings. The process exited 0 however many months failed.

  • Both worker failure cases now raise.
  • Every month is still attempted; construct_and_save_mosaics() then raises RuntimeError naming the failed months, so the process exits non-zero.

Closes #26.

Testing

  • New test_failed_months_fail_the_run (all three providers) fails before the change with DID NOT RAISE RuntimeError and passes after.
  • ruff check src/, mypy src: clean
  • pytest -q: 229 passed
  • A full MERRA-2 1980-2025 build with this change exits 0 with all 12 months OK and the same 36 output files.

construct_and_save_mosaics() in all three percentile indexers logged a
failed month and carried on, and _build_month_mosaic() returned "no
spatial maps" and "no readable source files" as ordinary status
strings. The process exited 0 however many months failed: a MERRA-2
run whose mosaic workers all crashed wrote none of its 36 files and
still reported success.

Both worker failure cases now raise. Every month is still attempted,
then construct_and_save_mosaics() raises RuntimeError naming the
failed months, so the process exits non-zero.

Closes #26.
@jravani jravani added this to the v2.2.0 milestone Oct 6, 2026
@jravani
jravani merged commit 0e36c25 into enerplanet Oct 6, 2026
1 check passed
@jravani
jravani deleted the fix/percentile-fail-on-month-error branch October 6, 2026 21:28
@jravani jravani mentioned this pull request Oct 6, 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.

Percentile indexer exits 0 when month mosaics fail

1 participant