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

[WIP] add support for sourmash sketch fromfile functionality. #1884

Merged
merged 8 commits into from
Mar 14, 2022

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Mar 13, 2022

This PR updates command_sketch.py and command_compute.py to support new sourmash sketch fromfile functionality, currently being developed in the ctb/2022-sourmash-sketchfrom repo and also in #1885.

This is an ongoing PR that separates the support code changes from the fromfile command itself.

This PR:

  • updates the ComputeParameters class to support __repr__ and __eq__.
  • adds ComputeParameters.to_param_str method.
  • refactors _signatures_for_sketch_factory to properly handle no default_moltype and produce one ComputeParameters object per ksize, along with general cleanup and refactoring.

Ref #1671

@codecov
Copy link

codecov bot commented Mar 13, 2022

Codecov Report

Merging #1884 (07637c5) into latest (dbda4ef) will increase coverage by 7.93%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           latest    #1884      +/-   ##
==========================================
+ Coverage   82.62%   90.55%   +7.93%     
==========================================
  Files         121       91      -30     
  Lines       13109     8946    -4163     
  Branches     1756     1772      +16     
==========================================
- Hits        10831     8101    -2730     
+ Misses       2015      580    -1435     
- Partials      263      265       +2     
Flag Coverage Δ
python 90.55% <91.66%> (-0.01%) ⬇️
rust ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/sourmash/index/__init__.py 96.45% <ø> (ø)
src/sourmash/command_compute.py 92.69% <86.66%> (-0.67%) ⬇️
src/sourmash/command_sketch.py 88.58% <100.00%> (+0.58%) ⬆️
src/core/src/encodings.rs
src/core/src/lib.rs
src/core/src/ffi/utils.rs
src/core/src/ffi/mod.rs
src/core/src/index/linear.rs
src/core/src/sketch/hyperloglog/estimators.rs
src/core/src/ffi/index/revindex.rs
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbda4ef...07637c5. Read the comment docs.

@ctb ctb mentioned this pull request Mar 13, 2022
12 tasks
@ctb
Copy link
Contributor Author

ctb commented Mar 14, 2022

@bluegenes @mr-eyes if you have space to review this, it's merge-able at any time. I am (trying to) cleanly separate out the internal changes needed for robust support of #1885, but since each bolus of changes is independently good, might be nice to merge in the work every so often.

Copy link
Contributor

@bluegenes bluegenes left a comment

Choose a reason for hiding this comment

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

i think this lgtm

@ctb
Copy link
Contributor Author

ctb commented Mar 14, 2022

thx - will wait for tests to finish and then merge! nice to keep the PRs from getting too big 😆

@ctb ctb merged commit 8f4c94c into latest Mar 14, 2022
@ctb ctb deleted the add/sketchfrom_support branch March 14, 2022 17:01
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.

2 participants