Skip to content

SFMS: Filter SFMS interpolation stations by site type#5230

Merged
conbrad merged 4 commits intomainfrom
task/sfms-station-filters
Mar 18, 2026
Merged

SFMS: Filter SFMS interpolation stations by site type#5230
conbrad merged 4 commits intomainfrom
task/sfms-station-filters

Conversation

@conbrad
Copy link
Collaborator

@conbrad conbrad commented Mar 17, 2026

Excludes stations with site types not suitable for spatial interpolation (HUB_STN, WXSTN_GOES, WXSTN_MB, WXSTN_TEL, WXSTN_CELL, WXSTN_UHF, EXTERNAL are the valid types as well as ACTIVE status).

The filter is applied in sfms_daily_actuals_mapper in Python rather than via the RSQL query on /dailies/rsql, because the existing codebase already documents that
the API does not reliably honour RSQL filters on nested stationData properties (the same issue affects stationStatus filtering).

Closes #5206

Test Links:

Landing Page
MoreCast
Percentile Calculator
C-Haines
FireCalc
FireCalc bookmark
Auto Spatial Advisory (ASA)
HFI Calculator
SFMS Insights
Fire Watch

@conbrad conbrad requested review from brettedw and dgboss March 17, 2026 18:37
@brettedw
Copy link
Collaborator

Part of the acceptance criteria is also to only use 'Active' stations for SFMS. Check out wps_wf1/util.py

@brettedw
Copy link
Collaborator

Could you also potentially run some tests locally and see if we're now getting the same stations as current SFMS?

@conbrad
Copy link
Collaborator Author

conbrad commented Mar 17, 2026

Part of the acceptance criteria is also to only use 'Active' stations for SFMS. Check out wps_wf1/util.py

Thought we already had that in is_station_valid, fixed here: 0836af1

@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.20%. Comparing base (f45d73d) to head (4d55532).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5230   +/-   ##
=======================================
  Coverage   69.20%   69.20%           
=======================================
  Files         393      393           
  Lines       16262    16265    +3     
  Branches     1822     1822           
=======================================
+ Hits        11254    11257    +3     
  Misses       4471     4471           
  Partials      537      537           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dgboss
Copy link
Collaborator

dgboss commented Mar 17, 2026

What do you think about adding a comment stating that the site_type_ids we check against are the same ones used to define the APP_WF1_WEATHER.STATION_BC_ACTIVE_REPORTING_VW table that is the station source for legacy SFMS?

Copy link
Collaborator

@dgboss dgboss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@sonarqubecloud
Copy link

@conbrad conbrad merged commit 1b525b1 into main Mar 18, 2026
33 of 34 checks passed
@conbrad conbrad deleted the task/sfms-station-filters branch March 18, 2026 16:57
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.

SFMS: Filter stations

3 participants