Closed iwensu0313 closed 3 months ago
Tests appear to have all passed, but pre-commit check failing. Need to investigate - converted to draft
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
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 https://github.com/ioos/ioos_qc/pull/107/commits/485d63535eb1f281f4b0473a364dea723c068ab8. I definitely support sticking w/ code standards :)
Summary
Copied changes from https://github.com/ioos/ioos_qc/pull/104. Added a test to replicate missing values and no
zspan
set scenario https://github.com/ioos/ioos_qc/issues/65#issuecomment-1033141944. 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 #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.