-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MRG: transition internal signature loading functions (#3161)
Note: PR into #3153 Tackles some signature loading and saving cleanup throughout the codebase. Most changes are in the tests, and this is a significant cleanup of the test code! Fixes #1062. --- Goals: * deprecate external use of `sourmash.signature` load/save functions, because they are JSON-specific and inflexible. * simplify and standardize signature load/save function usage during tests; * get rid of deprecation messages during tests; In brief, * rename `sourmash.signature.load_signatures` to `load_signatures_from_json`; * rename `sourmash.signature.load_one_signature` to `load_one_signature_from_json`; * rename `sourmash.signature.save_signatures` to `save_signatures_to_json`; * deprecate `sourmash.save_signatures` and `sourmash.load_one_signature` for 5.0 (joining `load_signatures`, which was already deprecated); * reduce/eliminate deprecations by transitioning internal test code to use these three functions directly from `sourmash.signature` instead of from the top-level sourmash import. * **bonus**: eliminate zipfile UserWarning around overwriting files, which causes lots of warnings when running tests. --- Done: - [x] in sourmash.signature submodule, rename `load_signatures` to `load_signatures_from_json`, `load_one_signature` to `load_one_signatures_from_json`, and `save_signatures` to `save_signatures_to_json`; make tests pass. - [x] deprecate `sourmash.load_one_signature` and `sourmash.save_signatures`. - [x] catch zipfile UserWarning for duplicate filenames in ZipStorage.save TODO: - [x] transition internal sourmash code+tests away from deprecated functions - [ ] create issue around changing API documentation prior to 5.0; --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2542c69
commit 9283dc4
Showing
21 changed files
with
686 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.