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

Remove export v1 #1754

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Remove export v1 #1754

wants to merge 5 commits into from

Conversation

jameshadfield
Copy link
Member

Would anyone who enjoys diving into argparse specifics like to help out with this PR? My goal is to make augur export a synonym for augur export v2 - the approach as implemented here nearly achieves this but fails for augur export v2 <args> because we have now set required arguments to the augur export parser itself so we get errors like:

$ augur export v2 --tree X
augur export: error: the following arguments are required: --tree/-t

I presume a better approach is to set a default subparser?

@victorlin victorlin linked an issue Feb 12, 2025 that may be closed by this pull request
3 tasks
@victorlin
Copy link
Member

Would anyone who enjoys diving into argparse specifics like to help out with this PR? My goal is to make augur export a synonym for augur export v2 - the approach as implemented here nearly achieves this but fails for augur export v2 <args> because we have now set required arguments to the augur export parser itself so we get errors like:

$ augur export v2 --tree X
augur export: error: the following arguments are required: --tree/-t

I presume a better approach is to set a default subparser?

This is tricky. I don't think it's easy to share the same argument between two parsers (export and export v2). In your example, augur export v2 --tree X doesn't work because the --tree argument is always handled by the export parser so the export v2 parser won't get any arguments. If you tweak it to work, I imagine that augur export --tree X will stop working because the argument would then be handled by the export v2 parser.

I think it'd be easier to simply have just one parser for export, and make v2 an optional no-op argument. Something like this: ace1d81 I haven't figured out how show the note you've added in the current implementation, but maybe it's possible or we could live without it.

@joverlee521
Copy link
Contributor

Why not just keep augur export v2 as-is in case we ever add augur export v3?

@tsibley
Copy link
Member

tsibley commented Feb 12, 2025

What @joverlee521 said. Everything is using augur export v2, so we can just remove augur export v1 and leave augur export and everything else as-is.

@victorlin victorlin mentioned this pull request Feb 12, 2025
3 tasks
@jameshadfield jameshadfield marked this pull request as ready for review February 12, 2025 20:32
@jameshadfield
Copy link
Member Author

jameshadfield commented Feb 12, 2025

I think splitting augur export into augur export {v1,v2} wasn't the right move in hindsight and would like to remedy that. (For clarity: I'm not suggesting nor implementing removal of augur export v2.) However given the 2 messages expressing disagreement with this view (and one emoji) I am going to reduce the scope of this PR in order to remove the deprecated v1 subcommand. 👀 on the PR welcome!

@@ -26,8 +26,7 @@ We recognize the existing usage of this function, so it has been moved to

## `augur export v1`

*Deprecated in version 22.2.0 (July 2023). Planned for [removal](https://github.com/nextstrain/augur/issues/1266)
January 2024 or after.*
*Deprecated in version 22.2.0 (July 2023). Removed in version TKTK (TKTK 2025)*
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[todo]

@victorlin
Copy link
Member

@jameshadfield I started this a while back but never got around to creating a PR. Feel free to cherry-pick any commits: db54927...ec16b56

@tsibley
Copy link
Member

tsibley commented Feb 12, 2025

I think splitting augur export into augur export {v1,v2} wasn't the right move in hindsight and would like to remedy that.

Let's discuss this somewhere? I'm curious to hear more.

I am going to reduce the scope of this PR in order to remove the deprecated v1 subcommand.

👍

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.22%. Comparing base (6ea375a) to head (61661a8).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1754      +/-   ##
==========================================
+ Coverage   73.12%   75.22%   +2.09%     
==========================================
  Files          79       78       -1     
  Lines        8353     8047     -306     
  Branches     1704     1625      -79     
==========================================
- Hits         6108     6053      -55     
+ Misses       1958     1707     -251     
  Partials      287      287              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@joverlee521 joverlee521 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I will note that we will need to address the removal of augur export v1 in seasonal flu before/when this gets released.

Also saying this out loud to confirm: We are keeping augur validate export-v1 and the v1 JSON schemas to continue to support existing v1 datasets.

docs/redirects.yaml Outdated Show resolved Hide resolved
jameshadfield and others added 3 commits February 13, 2025 14:17
now that we have removed the ability to create v1 datasets

Co-authored-by: Victor Lin <[email protected]>
To reflect the removal of `augur export v1`

Co-authored-by: Victor Lin <[email protected]>
Includes updating & adding the redirects so that v1 URLs go to the
(v1→v2) migration guide as well as removal of all relevant references
to "augur export v1"
@jameshadfield
Copy link
Member Author

[@victorlin] Feel free to cherry-pick any commits: db54927...ec16b56

[@joverlee521] We are keeping augur validate export-v1 and the v1 JSON schemas to continue to support existing v1 datasets.

No - this was an oversight on my behalf. Victor's patch series removed this and I've now done the same in this PR. For completeness we've now:

  • Removed augur export v1
  • Removed augur validate export-v1 (I guess I should add this to the changelog)
  • Removed / updated relevant schemas. Victor's patch series also removed the parsing of old (v1-style) auspice-config JSONs within augur export v2 but I've preserved this as I think there's still quite a few such JSONs in use.
  • Updated docs & redirects as appropriate

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, we still link to the v1 schemas in nextstrain.org and auspice (GH search). We should update those links to point to a specific tag instead of the default/master branch.

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

Successfully merging this pull request may close these issues.

Remove export v1
4 participants