Skip to content

SDK: seasonal FBFM40 support (2024/2025 versions + represented year) - #203

Merged
amarcozzi merged 1 commit into
mainfrom
200-seasonal-fbfm40
Aug 26, 2026
Merged

SDK: seasonal FBFM40 support (2024/2025 versions + represented year)#203
amarcozzi merged 1 commit into
mainfrom
200-seasonal-fbfm40

Conversation

@amarcozzi

Copy link
Copy Markdown
Contributor

Extends create_fuel_model_grid_from_landfire_fbfm40 for the seasonal FBFM40 work merged API-side (FastFuels-API-v2 #534/#539).

Changes

  • Versions 2024/2025: the regenerated LandfireFbfm40Version enum now includes 2024 and 2025. The creator already maps its version argument onto the enum (LandfireFbfm40Version(version)), so both new versions are accepted and validated; an unknown version still raises ValueError.
  • Represented year: added a Grid.represented_year accessor that reads the server-set year off the grid's source. For an annual product this is the landscape vintage (the version); for a seasonal product it is the projected season year the API reads from the LANDFIRE Product Service catalog. Returns None when the source reports no year.

Notes

  • source is a free-form GridSource in the generated client, so the year is read from its additional properties — no generated code was edited.
  • The seasonal path itself (a season argument) 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 confirms 2025 is only available for seasonal requests, while 2024 is a new annual version — the added live test uses 2024 and asserts represented_year == 2024.

Tests

  • Offline unit tests: represented_year reads the source year / returns None; the creator serializes 2024 and 2025 onto the request body; an unknown version raises ValueError.
  • Live API tests (run against the live API with FASTFUELS_API_KEY): the full TestCreateFuelModelGridFromLandfireFbfm40 class passes (5 passed), including the represented-year assertion.
  • black and flake8 clean (also enforced by pre-commit).

Closes #200

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.
@amarcozzi
amarcozzi merged commit 700b03d into main Aug 26, 2026
2 of 3 checks passed
@amarcozzi
amarcozzi deleted the 200-seasonal-fbfm40 branch August 26, 2026 18:04
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.

SDK: seasonal FBFM40 support (2024/2025 versions + represented year)

1 participant