-
Notifications
You must be signed in to change notification settings - Fork 80
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
MRG: patch-fix sig extract
to no longer create empty zips
#3214
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## latest #3214 +/- ##
==========================================
- Coverage 86.71% 86.70% -0.02%
==========================================
Files 136 136
Lines 15849 15829 -20
Branches 2716 2716
==========================================
- Hits 13744 13724 -20
Misses 1795 1795
Partials 310 310
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Ready for review @sourmash-bio/devs ! @ccbaumler might be yours to review :) Note, the failed tests do not seem important (looks like rounding error on the coverage one, in particular?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Love the simple solution.
$ sourmash sig extract --dna ~/database-releases/genbank-20240614/temp/genbank-20240614-viral.zip -o test.zip
== This is sourmash version 4.8.10.dev0. ==
== Please cite Brown and Irber (2016), doi:10.21105/joss.00027. ==
loaded 0 total that matched ksize & molecule type
no matching signatures to save!
$ sourmash sig summarize test.zip
== This is sourmash version 4.8.10.dev0. ==
== Please cite Brown and Irber (2016), doi:10.21105/joss.00027. ==
** loading from 'test.zip'
path filetype: ZipFileLinearIndex
location: /home/baumlerc/sourmash/test.zip
is database? yes
has manifest? no
num signatures: 0
** examining manifest...
total hashes: 0
summary of sketches:
$ sourmash sig describe test.zip
== This is sourmash version 4.8.10.dev0. ==
== Please cite Brown and Irber (2016), doi:10.21105/joss.00027. ==
loaded 0 signatures total, from 1 files
$ sourmash sig cat -k 21 test.zip
== This is sourmash version 4.8.10.dev0. ==
== Please cite Brown and Irber (2016), doi:10.21105/joss.00027. ==
loaded 0 signatures total, from 1 files
loaded 0 signatures total.
output 0 signatures
$ unzip -v test.zip
Archive: test.zip
Length Method Size Cmpr Date Time CRC-32 Name
-------- ------ ------- ---- ---------- ----- -------- ----
128 Stored 128 0% 2024-06-16 14:21 7c2b036b SOURMASH-MANIFEST.csv
-------- ------- --- -------
128 128 0% 1 file
Release candidate testing: - [ ] Command line tests pass for a release candidate - [ ] All eight release candidate wheels are built Releasing to PyPI: - [ ] RC tag(s)s deleted on github - [ ] Release tag cut - [ ] Release notes written - [ ] All eight release wheels built - [ ] Release wheels uploaded to pypi - [ ] tar.gz distribution uploaded to pypi After release to PyPI and conda-forge/bioconda packages built: - [ ] [PyPI page](https://pypi.org/project/sourmash/) updated - [ ] Zenodo DOI successfully minted upon new github release - [see search results](https://zenodo.org/search?page=1&size=20&q=sourmash&sort=mostrecent) - [ ] `pip install sourmash` installs the correct version - [ ] [conda-forge sourmash-minimal-feedstock](https://github.com/conda-forge/sourmash-minimal-feedstock) has updated `sourmash-minimal` to the correct version - [ ] `mamba create -n smash-release -y sourmash` installs the correct version Optional but recommended: - [ ] PR submitted to update pyodide version - [ ] PR submitted to update spack version --- ## Release notes Minor new features: * check `select` parameters; enforce types when building manifests (#3212) * patch-fix `sig extract` to no longer create empty zips (#3214) Bug fixes: * adjust how ANI is calculated in the revindex code. (#3218) Cleanup and documentation updates: * final updates for 2024 JOSS publication (#3225) * Improve JOSS paper affiliations (#3224) * fix DOI for Rahman Hera paper in JOSS pub. (#3221) * upd citations, minor text (#3220) Developer updates: * bump sourmash core version to 0.14.1 (#3219) * bump version to 4.8.10-dev (#3211) Dependabot updates: - Bump proptest from 1.4.0 to 1.5.0 (#3222) - [pre-commit.ci] pre-commit autoupdate (#3223) - [pre-commit.ci] pre-commit autoupdate (#3003) - Bump histogram from 0.10.2 to 0.11.0 (#3216) - Bump pypa/cibuildwheel from 2.19.0 to 2.19.1 (#3217) - Bump histogram from 0.10.1 to 0.10.2 (#3207) - Bump statrs from 0.16.1 to 0.17.1 (#3205) - Bump roaring from 0.10.4 to 0.10.5 (#3206) - Bump primal-check from 0.3.3 to 0.3.4 (#3208) - Bump niffler from 2.5.0 to 2.6.0 (#3204) - Bump pypa/cibuildwheel from 2.18.1 to 2.19.0 (#3202)
This fixes
sourmash sig extract
to properly close thesourmash_args.SaveSignaturesToLocation
upon error exit.The proper thing to do is really to use the context manager tho 😭 . But I want to fix this problem first.
Fixes #3191