sourmash-bio / sourmash

Quickly search, compare, and analyze genomic and metagenomic data sets.
http://sourmash.readthedocs.io/en/latest/
Other
476 stars 79 forks source link

MRG: enforce a single scaled on a `CollectionSet` #3397

Closed ctb closed 6 days ago

ctb commented 1 week ago

Addresses https://github.com/sourmash-bio/sourmash/issues/3386

https://github.com/sourmash-bio/sourmash/pull/3387 changed select to update Record.scaled to the desired scaled value. This PR changes CollectionSet to require that all scaled values be the same, which can now be achieved by running select ;).

It also adds a new method Collection::min_max_scaled() which makes it easy to retrieve scaled for a Collection.

codecov[bot] commented 1 week ago

Codecov Report

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

Project coverage is 86.46%. Comparing base (97e7808) to head (2ce356d). Report is 1 commits behind head on latest.

Files with missing lines Patch % Lines
src/core/src/collection.rs 50.00% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## latest #3397 +/- ## ========================================== - Coverage 86.47% 86.46% -0.01% ========================================== Files 137 137 Lines 16095 16100 +5 Branches 2219 2219 ========================================== + Hits 13918 13921 +3 - Misses 1870 1872 +2 Partials 307 307 ``` | [Flag](https://app.codecov.io/gh/sourmash-bio/sourmash/pull/3397/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sourmash-bio) | Coverage Δ | | |---|---|---| | [hypothesis-py](https://app.codecov.io/gh/sourmash-bio/sourmash/pull/3397/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sourmash-bio) | `25.43% <ø> (ø)` | | | [python](https://app.codecov.io/gh/sourmash-bio/sourmash/pull/3397/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sourmash-bio) | `92.40% <ø> (ø)` | | | [rust](https://app.codecov.io/gh/sourmash-bio/sourmash/pull/3397/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sourmash-bio) | `62.29% <50.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sourmash-bio#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ctb commented 6 days ago

Ready for review @luizirber @bluegenes !