Skip to content

Improve testing for FBFM40's seasonal LFPS integration. - #550

Merged
lindsaywiard merged 2 commits into
mainfrom
544-add-live-coverage-testing-for-fbfm40-seasonal-fuels
Aug 27, 2026
Merged

Improve testing for FBFM40's seasonal LFPS integration.#550
lindsaywiard merged 2 commits into
mainfrom
544-add-live-coverage-testing-for-fbfm40-seasonal-fuels

Conversation

@lindsaywiard

Copy link
Copy Markdown
Collaborator

While implementing latest-year LFPS support for LANDFIRE fuel models, I was thinking about confirming the API's coverage check (validate_lfps_coverage) actually reaches LFPS successfully for an API request that requires LFPS. Working on that, I realized the seasonal FBFM40 was missing this. Its LFPS coverage check is a live call to LFPS's product catalog, made synchronously by the API itself before a grid is created, the same way 3DEP's coverage check works. 3DEP tests live against a domain with known coverage (test_documented_examples_are_accepted in test_3dep.py), so I thought seasonal should be tested the same way.

During the latest-year fuel model implementation in Griddle, I also noticed we had no way to know if our configured seasonal version stops being served by LFPS. We will need to update the code base when LANDFIRE move to a new base vintage, so this test can act as a reminder to check.

Changes

  • services/api/tests/fixtures.py

    • Add a factory to load a domain fixture file into Firestore-ready test data
    • Lets us reuse the domain fixture files already saved in shared_data
  • services/api/tests/conftest.py

    • Add lfps_covered_domain, loading threedep_ept_seam.json via that factory
    • We've verified this domain has coverage across all seasonal fuels windows
    • This fixture will also be useful for testing the latest-year (annual) LFPS path because it is in the SW region, which is released first for a new annual version
  • services/api/api/resources/grids/fbfm40/examples.py

    • Split the documented examples into staged-data and LFPS-sourced groups
    • The LFPS-sourced examples can be tested against the covered SW region domain
    • Change the seasonal example's season from SP to ES because ES is updated first
  • services/api/tests/resources/grids/fbfm40/test_router.py:

    • add a live-coverage test that posts the LFPS-sourced example against lfps_covered_domain
    • confirms the LFPS coverage check succeeds
  • services/griddle/tests/integration/test_landfire_lfps.py

    • add a test that fails once our configured seasonal version is no longer live in LFPS's catalog
    • will notify us when we need to update the version for the seasonal fuels

@lindsaywiard lindsaywiard linked an issue Aug 26, 2026 that may be closed by this pull request
@lindsaywiard
lindsaywiard merged commit 96ae85c into main Aug 27, 2026
1 check passed
@lindsaywiard
lindsaywiard deleted the 544-add-live-coverage-testing-for-fbfm40-seasonal-fuels branch August 27, 2026 16:09
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.

Add live-coverage testing for FBFM40 seasonal fuels

2 participants