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

filter: Add --max-length option #1429

Merged
merged 7 commits into from Mar 7, 2024
Merged

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Mar 5, 2024

Description of proposed changes

Reorganize things related to --min-length and add a --max-length option.

Related issue(s)

Checklist

  • Checks pass
  • If making user-facing changes, add a message in CHANGES.md summarizing the changes in this PR

This is the same as filter-min-length-output-strains.t but using
--output-metadata. The contents of --output-metadata are already tested
in other tests such as filter-query-example.t.
Repurpose the --min-length test to also include --non-nucleotide.
The purpose of this file is to test --min-length and not other features.
Rename with "min" to pair it with a "max" filter, coming in a following
commit.
This complements --min-length.
@victorlin victorlin self-assigned this Mar 5, 2024
@victorlin victorlin marked this pull request as ready for review March 5, 2024 19:56
@victorlin victorlin requested a review from a team March 5, 2024 19:56
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 76.92308% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 68.66%. Comparing base (bd6be41) to head (7c7353b).

Files Patch % Lines
augur/filter/include_exclude_rules.py 75.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1429      +/-   ##
==========================================
+ Coverage   68.65%   68.66%   +0.01%     
==========================================
  Files          69       69              
  Lines        7544     7554      +10     
  Branches     1849     1851       +2     
==========================================
+ Hits         5179     5187       +8     
- Misses       2088     2089       +1     
- Partials      277      278       +1     

☔ 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.

Thank you for adding the new option @victorlin!

I was wondering if filter_by_min_length and filter_by_max_length should share some logic, but the separate functions make sense after seeing your previous work to separate the min_date/max_date functions 👍

@victorlin
Copy link
Member Author

previous work to separate the min_date/max_date functions

I assume you mean 8d1d84a - yeah I think it's cleaner to have 1:1 mapping between command-line options and underlying filter functions. The shared logic would only be a few lines anyways.

@victorlin victorlin merged commit 7197b9f into master Mar 7, 2024
20 checks passed
@victorlin victorlin deleted the victorlin/filter-max-length branch March 7, 2024 18:31
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.

[filter]: Add flag for --max-length
2 participants