data-to-insight / csc-validator-be-903

Python-side code for the Quality LAC Data Beta frontend
https://903.datatoinsight.org
MIT License
8 stars 4 forks source link

SW04STG1 #742

Closed WillLP-code closed 6 months ago

WillLP-code commented 10 months ago

closes #672

This is another slightly weird one. I cannibalised the code from 632 to do it, but have changed it to allow any and all date values to be ZZs in line with the wording of the rule, but I'm not sure if that's how the guidance is meant to be interpreted.

I do wonder if this is possible without a for loop. I tried to do it from scratch but realised if 632 was in, it may be the best way of doing it.

codecov-commenter commented 10 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (15179c5) 95.27% compared to head (abe0bf5) 95.29%. Report is 47 commits behind head on main.

Files Patch % Lines
lac_validator/rules/rule_utils.py 95.65% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #742 +/- ## ========================================== + Coverage 95.27% 95.29% +0.02% ========================================== Files 313 314 +1 Lines 7717 7764 +47 ========================================== + Hits 7352 7399 +47 Misses 365 365 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

SLornieCYC commented 10 months ago

Would it make sense now to move the valid_date function out of the individual rules and share that as common code between all of them? Rather than having separate and slightly different instances directly coded in each rule?