Add seasonal FBFM40 support (season argument) - #213
Merged
Conversation
Expose a season argument on create_fuel_model_grid_from_landfire_fbfm40 so callers can request LANDFIRE Seasonal Fuels (ES/SP/SU/FA) from the LANDFIRE Product Service instead of the staged annual release. The seasonal path requires a seasonal vintage (e.g. 2025); the annual path is unchanged when season is omitted. The API validates the version/season coupling and surfaces UnprocessableEntity on a mismatch or when LFPS does not cover the domain. Tests: offline coverage that season and version are forwarded and that an unknown season raises; a live test that a seasonal request against a covered domain returns a pending grid whose represented_year is the projected season year (2025 + SP -> 2026). The live test reads represented_year off the pending grid rather than waiting, since grid completion submits a real on-demand LFPS job; it skips when LFPS is not serving the domain/season.
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
Closes #209. Adds a
seasonargument tocreate_fuel_model_grid_from_landfire_fbfm40, exposing LANDFIRE Seasonal Fuels through the SDK. The regenerated v2 client already carries theseasonfield and the2025seasonal vintage — this wires them into the public function.Behavior
seasonaccepts"ES"(early spring),"SP"(spring),"SU"(summer),"FA"(fall).seasonis set, the grid is fetched on demand from the LANDFIRE Product Service (LFPS) for that season, andversionmust be a seasonal vintage (e.g."2025"). When omitted, the annual path is unchanged andversionmust be an annual vintage.UnprocessableEntityException— the SDK does not duplicate that validation.Grid.represented_yearreflects the projected season year (e.g.2025 + SP → 2026), populated on the pending grid at creation.Tests
seasonandversionare forwarded to the request body; an unknown season raisesValueError.represented_yearis2026. The test readsrepresented_yearoff the pending grid rather than callingwait(), because grid completion submits a real, up-to-20-minute on-demand LFPS job. Seasonal Fuels is a moving pilot boundary served live, so the test skips (rather than fails) when LFPS is not serving that domain/season.All eight FBFM40 tests pass against the live API; the annual path is unaffected.