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

Add escape hatch for the "Augur version incompatibility detected" error #1635

Open
corneliusroemer opened this issue Sep 21, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@corneliusroemer
Copy link
Member

corneliusroemer commented Sep 21, 2024

Context

When working across machines with incongruent augur major versions, I get an error:

ERROR: Augur version incompatibility detected: \
  the JSON builds/wuhan/muts.json was generated by {'program': 'augur', 'version': '26.0.0'},\
  which is incompatible with the current augur version (25.3.0). \
  We suggest you rerun the pipeline using the current version of augur."

In this case I got the error when running augur clades on output from ancestral.

Description

We should allow ignoring this error through a command line option. I don't want to rerun the pipeline, and I don't need to rerun the pipeline because nothing relevant has changed for the command I'm trying to run. I know I can manually edit the version, but it'd be nice not to have to do that for each file every time.

Examples

We already do something similar for augur export:

OTHER OPTIONAL SETTINGS:
  --validation-mode {error,warn,skip}
                        Control if optional validation checks are performed and what happens if they fail. 'error' and 'warn' modes perform validation and emit messages
                        about failed validation checks. 'error' mode causes a non-zero exit status if any validation checks failed, while 'warn' does not. 'skip' mode
                        performs no validation. Note that some validation checks are non-optional and as such are not affected by this setting. (default: error)
  --skip-validation     Skip validation of input/output files, equivalent to --validation-mode=skip. Use at your own risk! (default: None)
@corneliusroemer corneliusroemer added the enhancement New feature or request label Sep 21, 2024
@victorlin
Copy link
Member

Isn't this error already from augur export? There is a test that shows --skip-validation applies to the version mismatch error.

ERROR: Augur version incompatibility detected: the JSON .*location_node-data2\.json.* was generated by \{'program': 'augur', 'version': '13.1.2'\}, which is incompatible with the current augur version \([.0-9]+\). We suggest you rerun the pipeline using the current version of augur. (re)
[2]
Skipping validation allows mismatched augur versions to be used without error.
(Note the stderr/stdout output is detailed here, including 2 empty lines)
$ ${AUGUR} export v2 \
> --tree "$TESTDIR/../data/tree.nwk" \
> --node-data "$TESTDIR/../data/div_node-data.json" "$TESTDIR/../data/location_node-data2.json" \
> --auspice-config "$TESTDIR/../data/auspice_config2.json" \
> --output dataset.json \
> --skip-validation
WARNING: You didn't provide information on who is maintaining this analysis.
\s{0} (re)
Skipping validation of produced JSON due to --validation-mode=skip or --skip-validation.
\s{0} (re)

@corneliusroemer
Copy link
Member Author

No, I got this error in augur classes, sorry this wasn't clear from my issue description. I think the error can be thrown wherever we read any intermediate augur json files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants