-
Notifications
You must be signed in to change notification settings - Fork 27
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
Climatology Test: Handing masked depths without zspan #107
Conversation
Test to capture test scenario provided here ioos#65
Tests appear to have all passed, but pre-commit check failing. Need to investigate - converted to draft |
Don't worry too much about pre-commits. Those are only code standards and sometimes we can fix those with: pre-commit.ci autofix |
Sounds good! I figured out how to fix this one. One of the pre-commit checks auto fixed the issue but the other one I had to fix manually in this commit 485d635. I definitely support sticking w/ code standards :) |
Summary
Copied changes from #104. Added a test to replicate missing values and no
zspan
set scenario #65 (comment). Proposed fix is to set MISSING flag at the end ofcheck()
so it doesn't get overridden by the GOOD flag.Details
QartodClimatologyMissingTest
totest_qartod.py
to capture scenario described in Climatology test doesn't work with null values if zspan isn't provided #65. The scenario is when a user passes an array with a missing data point (which gets masked byioos_qc
) and does not setzspan
(depth range). The result is that the missing value gets flagged w/ 1 (GOOD) instead of 9 (MISSING).qartod.py
- the change is moving where we set the MISSING flag to the bottom of thecheck()
function so that it doesn't get overridden when we set the GOOD flags.At the start of
check()
we currently set UNKNOWN and MISSING flagsHowever, in this line near the end of the
check()
function, the slice keeps good data points AND all masked values. And assigns them theQartodFlags.GOOD
flag which is a value of1
.We do not want MISSING flags (9) to be overridden with a GOOD flag (1), so assigning the MISSING flags at the end can prevent this.