Add current year LFPS support to griddle for LANDFIRE fuel models - #542
Conversation
e8f0f83 to
dd89863
Compare
amarcozzi
left a comment
There was a problem hiding this comment.
I found a bug here:
All three PR #542 handlers define:
progress: Callable[...] | None = None
For version="2025", they pass that value directly to fetch_lfps, which immediately executes:
progress("Submitting LANDFIRE Product Service job...", 10)
If omitted, this becomes None(...) and raises before job submission.
Focused test against PR head 2e6bb55:
CONFIRMED: TypeError: 'NoneType' object is not callable
submit_job called: False
Existing tests miss it because they always provide a MagicMock callback. The preferred fix is to substitute a no-op callback and add
omitted-callback tests for FBFM13, FBFM40, and FCCS.
|
I think that bug is all fixed up now :) |
|
Can we just pass it and utilize a callable as normal instead of the new object/None? |
|
Yep, makes sense! Like this? |
|
It's not a big deal, but it just really feels like an anti-pattern to me. I don't understand why we need a default_progress and don't just give it the same callable as what every other function in griddle. so kind of like: Delete this: And just do: |
|
Yeah, that is cleaner. I was just stuck in how it was already set up. How's this? |
|
Looks great thank you! Sorry to be a stickler about something minor. Approved and ready to merge. |
|
No worries! I'm happy to indulge |
Summary
Griddle can now fetch the current year's FCCS, FBFM13, and FBFM40 release via LANDFIRE Product Service (LFPS) instead of a staged COG, for any version listed in a product's
lfps_availableconfig (currently 2025).Changes
lib\landfire\config.py: Addedlfps_available: ["2025"]tofbfm13andfccsinLANDFIRE_VERSIONS(fbfm40already had it).griddle\handlers\landfire.py:fetch_fbfm13andfetch_fccsnow route to LFPS when the requested version is inlfps_available, mirroring the branchfetch_fbfm40already had for seasonal requests.fetch_fbfm40's routing is generalized so anlfps_availableversion routes through LFPS even without aseason.griddle\dispatch.py:progressis now threaded through tofetch_fbfm13/fetch_fccs.Tests
lfps_availableversionlfps_availableconfig surfaces instead of going unnoticed.