SDK: seasonal FBFM40 support (2024/2025 versions + represented year) - #203
Merged
Conversation
The LandfireFbfm40Version enum now includes 2024 and 2025 for the seasonal FBFM40 work; create_fuel_model_grid_from_landfire_fbfm40 already maps the version argument onto the enum, so both are accepted and validated. Expose Grid.represented_year, which reads the server-set calendar year off the grid's source. For an annual product this is the landscape vintage; for a seasonal product it is the projected season year read from the LANDFIRE Product Service catalog.
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.
Extends
create_fuel_model_grid_from_landfire_fbfm40for the seasonal FBFM40 work merged API-side (FastFuels-API-v2 #534/#539).Changes
LandfireFbfm40Versionenum now includes2024and2025. The creator already maps itsversionargument onto the enum (LandfireFbfm40Version(version)), so both new versions are accepted and validated; an unknown version still raisesValueError.Grid.represented_yearaccessor that reads the server-setyearoff the grid'ssource. For an annual product this is the landscape vintage (theversion); for a seasonal product it is the projected season year the API reads from the LANDFIRE Product Service catalog. ReturnsNonewhen the source reports no year.Notes
sourceis a free-formGridSourcein the generated client, so the year is read from its additional properties — no generated code was edited.seasonargument) is out of scope here; it is tracked separately (Update v2 client library (regenerate for API changes since 2026-08-04) #195). The live API confirms2025is only available for seasonal requests, while2024is a new annual version — the added live test uses2024and assertsrepresented_year == 2024.Tests
represented_yearreads the source year / returnsNone; the creator serializes2024and2025onto the request body; an unknown version raisesValueError.FASTFUELS_API_KEY): the fullTestCreateFuelModelGridFromLandfireFbfm40class passes (5 passed), including the represented-year assertion.blackandflake8clean (also enforced by pre-commit).Closes #200