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

export v2: Add --validation-mode={error,warn,skip} option #1135

Merged
merged 3 commits into from
Jan 27, 2023

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Jan 25, 2023

Extends the existing --skip-validation flag to be more nuanced by the addition of a "warn" mode. Our validation is improving, but not always correct. The "warn" mode allows a workflow to emit messages about validation failures, but keep going in the face of them instead of aborting the whole workflow due to a non-zero exit code.

We may want to change the default mode to "warn"—at least until our validation failures have few "false positives" or "low-consequence positives" where the output files still load ok in Auspice—but I'll leave this for separate consideration.

The --skip-validation flag is now an alias for --validation-mode=skip.

Related-to: #1044

Testing

  • Manual tests
  • CI passes

Checklist

  • Add a message in CHANGES.md summarizing the changes in this PR that are end user focused. Keep headers and formatting consistent with the rest of the file.

@tsibley tsibley requested a review from a team January 25, 2023 00:57
@tsibley
Copy link
Member Author

tsibley commented Jan 25, 2023

Cram tests are failing because of additional output lines that aren't accounted for. There's very little discipline around stdout/stderr for output in Augur, and so in lieu of a system, I directed new output lines to stdout/stderr in line with similar messages from the existing surrounding code. In light of failures though, I may reconsider that.

@tsibley tsibley force-pushed the trs/export-v2/validation-mode branch from a74c9cc to adf7681 Compare January 27, 2023 19:48
@tsibley
Copy link
Member Author

tsibley commented Jan 27, 2023

It was just a single cram test, not a whole slew of them like I assumed, so I just updated the test to account for the new output.

augur/types.py Show resolved Hide resolved
augur/export_v2.py Outdated Show resolved Hide resolved
augur/export_v2.py Show resolved Hide resolved
@tsibley tsibley force-pushed the trs/export-v2/validation-mode branch from adf7681 to bb13069 Compare January 27, 2023 23:35
tsibley added a commit that referenced this pull request Jan 27, 2023
@tsibley tsibley force-pushed the trs/better-validation-errors branch 2 times, most recently from a8ea3dd to 0f4b655 Compare January 27, 2023 23:53
Base automatically changed from trs/better-validation-errors to master January 27, 2023 23:53
Extends the existing --skip-validation flag to be more nuanced by the
addition of a "warn" mode.  Our validation is improving, but not always
correct.  The "warn" mode allows a workflow to emit messages about
validation failures, but keep going in the face of them instead of
aborting the whole workflow due to a non-zero exit code.

We may want to change the default mode to "warn"—at least until our
validation failures have few "false positives" or "low-consequence
positives" where the output files still load ok in Auspice—but I'll
leave this for separate consideration.

The --skip-validation flag is now an alias for --validation-mode=skip.

Related-to: <#1044>
@tsibley tsibley force-pushed the trs/export-v2/validation-mode branch from 8879bac to 816d285 Compare January 27, 2023 23:54
@codecov
Copy link

codecov bot commented Jan 27, 2023

Codecov Report

Base: 68.09% // Head: 68.16% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (bb13069) compared to base (7a4bc86).
Patch coverage: 77.27% of modified lines in pull request are covered.

❗ Current head bb13069 differs from pull request most recent head 816d285. Consider uploading reports for the commit 816d285 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1135      +/-   ##
==========================================
+ Coverage   68.09%   68.16%   +0.06%     
==========================================
  Files          62       62              
  Lines        6698     6740      +42     
  Branches     1641     1653      +12     
==========================================
+ Hits         4561     4594      +33     
- Misses       1831     1838       +7     
- Partials      306      308       +2     
Impacted Files Coverage Δ
augur/util_support/node_data_file.py 91.83% <63.63%> (-8.17%) ⬇️
augur/export_v2.py 68.74% <68.42%> (-0.35%) ⬇️
augur/validate.py 74.70% <75.00%> (+2.26%) ⬆️
augur/types.py 92.85% <85.71%> (-7.15%) ⬇️
augur/io/json.py 86.76% <100.00%> (+1.76%) ⬆️
augur/util_support/node_data_reader.py 100.00% <100.00%> (ø)
augur/utils.py 71.25% <100.00%> (+0.11%) ⬆️
augur/util_support/date_disambiguator.py 96.07% <0.00%> (-0.08%) ⬇️
augur/errors.py 100.00% <0.00%> (ø)
augur/dates.py 93.24% <0.00%> (+2.57%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tsibley tsibley merged commit 94671e7 into master Jan 27, 2023
@tsibley tsibley deleted the trs/export-v2/validation-mode branch January 27, 2023 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants