Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wind speed and wind speed informed variables use cffdrs #3123

Merged
merged 31 commits into from
Sep 25, 2023

Conversation

conbrad
Copy link
Collaborator

@conbrad conbrad commented Sep 18, 2023

  • wind speed and windspeed informed values always use cffdrs now, instead of optionally using wf1 values if they exist
  • this means downstream indices are not rounded like they are from wf1 -- tests are rewritten to test equality of outputs with math.isclose with a 0.001 absolute tolerance: https://docs.python.org/3/library/math.html?highlight=isclose#math.isclose
  • test updates also enables us to move away from pytest-bdd which is not being actively updated and has a parser bug
  • deletes all the json request/response fixtures as they're encoded in each test now, with the updated non-rounded values from cffdrs

Test Links:

Landing Page
MoreCast 2.0
Percentile Calculator
MoreCast
C-Haines
FireBat
FireBat bookmark
Auto Spatial Advisory (ASA)
HFI Calculator

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Merging #3123 (7ef70b6) into main (71be9dc) will decrease coverage by 0.02%.
The diff coverage is 92.30%.

@@            Coverage Diff             @@
##             main    #3123      +/-   ##
==========================================
- Coverage   84.72%   84.71%   -0.02%     
==========================================
  Files         300      301       +1     
  Lines       10110    10123      +13     
  Branches      588      588              
==========================================
+ Hits         8566     8576      +10     
- Misses       1381     1384       +3     
  Partials      163      163              
Files Coverage Δ
api/app/routers/fba_calc.py 90.12% <100.00%> (-1.19%) ⬇️
api/app/schemas/fba_calc.py 100.00% <100.00%> (ø)
api/app/fire_behaviour/wind_speed.py 88.23% <88.23%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@conbrad conbrad changed the title Have wind speed and wind speed informed variables use cffdrs Wind speed and wind speed informed variables use cffdrs Sep 22, 2023
@conbrad conbrad requested a review from brettedw September 22, 2023 20:22
@@ -52,6 +52,8 @@ def mock_wfwx_stations():
station_2 = WFWXWeatherStation(latitude=1, longitude=1, elevation=1,
wfwx_id='ba28973a-0a79-04ea-e053-1d09228e8c65', code=2,
name='blah', zone_code='T1')
loop = asyncio.new_event_loop()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The test that exercises this started complaining there was no event loop (only on CI!) when constructing the Future below, so it's explicitly created now.

Copy link
Collaborator

@brettedw brettedw left a comment

Choose a reason for hiding this comment

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

Makes sense to me, nice work on all the test updates!

@sonarcloud
Copy link

sonarcloud bot commented Sep 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@conbrad conbrad temporarily deployed to production September 25, 2023 17:53 Inactive
@conbrad conbrad merged commit c0e3e49 into main Sep 25, 2023
30 checks passed
@conbrad conbrad deleted the task/consistent-critical-hours branch September 25, 2023 18:44
vanislekahuna pushed a commit to vanislekahuna/wps that referenced this pull request Sep 19, 2024
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.

2 participants