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

[MRG] deprecate import sourmash_lib #1143

Merged
merged 1 commit into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sourmash_lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#! /usr/bin/env python
"""
An implementation of a MinHash bottom sketch, applied to k-mers in DNA.

Legacy / deprecated; will be removed in sourmash 4.0.
"""
import sys
import warnings

warnings.warn("Please import sourmash, instead of sourmash_lib; sourmash_lib will be removed in 4.x", FutureWarning)

import sourmash

Expand Down
4 changes: 4 additions & 0 deletions tests/test_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ def test_load_textmode(track_abundance):
siglist = list(signature.load_signatures(sigfp))
loaded_sig = siglist[0]
assert loaded_sig.name() == 's10+s11'


def test_import_sourmash_lib():
import sourmash_lib
2 changes: 1 addition & 1 deletion tests/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sourmash
from sourmash import load_one_signature, SourmashSignature
from sourmash.index import LinearIndex
from sourmash_lib.sbt import SBT, GraphFactory, Leaf
from sourmash.sbt import SBT, GraphFactory, Leaf
from . import sourmash_tst_utils as utils


Expand Down