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

merge: Omit generated source columns by default #1632

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

tsibley
Copy link
Member

@tsibley tsibley commented Sep 16, 2024

Removes default naming template and requires users to explicitly provide their own template to include source columns. This makes the output from an augur merge invocation more self-documenting without columns "magically" appearing. In the expected context of usage within a workflow, the burden of the extra option is negligible. See also discussion on a prior PR.¹

¹ #1625 (comment)

Checklist

  • Automated checks pass
  • Check if you need to add a changelog message
  • Check if you need to add tests
  • Check if you need to update docs

Removes default naming template and requires users to explicitly provide
their own template to include source columns.  This makes the output
from an `augur merge` invocation more self-documenting without columns
"magically" appearing.  In the expected context of usage within a
workflow, the burden of the extra option is negligible.  See also
discussion on a prior PR.¹

¹ <#1625 (comment)>
Copy link

codecov bot commented Sep 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.06%. Comparing base (db54927) to head (67e756a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1632   +/-   ##
=======================================
  Coverage   71.06%   71.06%           
=======================================
  Files          79       79           
  Lines        8268     8268           
  Branches     2010     2010           
=======================================
  Hits         5876     5876           
  Misses       2101     2101           
  Partials      291      291           

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

@tsibley
Copy link
Member Author

tsibley commented Sep 16, 2024

Once this is merged, I'd like to cut a new (major) Augur release and get it published everywhere so I can then merge nextstrain/measles#52.

@victorlin victorlin added the breaking Makes a backwards incompatible change and should wait for major release label Sep 16, 2024
Comment on lines +95 to 96
output_group.add_argument('--no-source-columns', dest="source_columns", action="store_const", const=None, help=f"Suppress generated columns (described above) identifying the source of each row's data. This is the default behaviour, but it may be made explicit or used to override a previous --source-columns." + SKIP_AUTO_DEFAULT_IN_HELP)
output_group.add_argument('--quiet', action="store_true", default=False, help="Suppress informational and warning messages normally written to stderr. (default: disabled)" + SKIP_AUTO_DEFAULT_IN_HELP)
Copy link
Member

Choose a reason for hiding this comment

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

Why keep --no-source-columns around when it is already the default behavior? It seems unnecessary, with the equivalent being options such as --not-quiet or --no-output-metadata.

Copy link
Member Author

@tsibley tsibley Sep 16, 2024

Choose a reason for hiding this comment

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

It's a bit arbitrary/preference, but in general --x / --no-x is a nice (and very common) pattern to allow disabling previously-set options. This allows more flexibility in command invocation construction (e.g. a fixed list of options including --x can be changed by tacking on --no-x instead of finding and removing --x). It also provides a way for invocations to opt-into usages which aren't broken by changes to the defaults. We haven't generally done this as a matter of course in Augur, but I don't think it'd be a bad idea to start and it was easy to keep this pattern here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the explanation, makes sense!

@victorlin
Copy link
Member

Once this is merged, I'd like to cut a new (major) Augur release and get it published everywhere

If you end up doing this while I'm gone on lab retreat, could you also merge other breaking changes #1613 and #1629? Those have been approved and I just haven't gotten around to doing the actual release. The only thing is there will be changelog merge conflicts.

Copy link
Member

@victorlin victorlin left a comment

Choose a reason for hiding this comment

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

Looks good, I'll defer to you for #1632 (comment) so consider that non-blocking.

@tsibley tsibley merged commit 934588a into master Sep 17, 2024
28 checks passed
@tsibley tsibley deleted the trs/merge/no-source-columns-by-default branch September 17, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Makes a backwards incompatible change and should wait for major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants