-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MRG] Rename library to sourmash (#374)
* Change library name to sourmash instead of sourmash_lib * sourmash_lib is still available for older scripts * Remove the local sourmash script * Fix tests that expected the local sourmash script * Fix test discovery * Fix tox dependencies * add cpp file to gitignore * Fix sourmash_lib import in lca * Tests passing * avoid using import sourmash inside the module code, use . imports instead * Avoid changing current tests * Remove redundant import
- Loading branch information
Showing
38 changed files
with
143 additions
and
141 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ _minhash.so | |
*.so | ||
.coverage | ||
sourmash_lib/_minhash.cpp | ||
sourmash/_minhash.cpp |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[pytest] | ||
addopts = --doctest-glob='doc/*.md' | ||
python_files = sourmash_lib/*.py tests/*.py | ||
norecursedirs = utils build buildenv .tox .asv | ||
addopts = --doctest-glob='doc/*.md' --ignore=setup.py | ||
python_files = sourmash/*.py tests/*.py | ||
norecursedirs = utils build buildenv .tox .asv .eggs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
from __future__ import print_function | ||
import sys | ||
from setuptools import setup | ||
from setuptools import setup, find_packages | ||
from setuptools import Extension | ||
import os | ||
|
||
# retrieve VERSION from sourmash_lib/VERSION. | ||
# retrieve VERSION from sourmash/VERSION. | ||
thisdir = os.path.dirname(__file__) | ||
version_file = open(os.path.join(thisdir, 'sourmash_lib', 'VERSION')) | ||
version_file = open(os.path.join(thisdir, 'sourmash', 'VERSION')) | ||
VERSION = version_file.read().strip() | ||
|
||
EXTRA_COMPILE_ARGS = ['-std=c++11', '-pedantic'] | ||
|
@@ -51,16 +51,16 @@ | |
"author": "C. Titus Brown", | ||
"author_email": "[email protected]", | ||
"license": "BSD 3-clause", | ||
"packages": ["sourmash_lib"], | ||
"packages": find_packages(), | ||
"entry_points": {'console_scripts': [ | ||
'sourmash = sourmash_lib.__main__:main' | ||
'sourmash = sourmash.__main__:main' | ||
] | ||
}, | ||
"ext_modules": [Extension("sourmash_lib._minhash", | ||
sources=["sourmash_lib/_minhash.pyx", | ||
"ext_modules": [Extension("sourmash._minhash", | ||
sources=["sourmash/_minhash.pyx", | ||
"third-party/smhasher/MurmurHash3.cc"], | ||
depends=["sourmash_lib/kmer_min_hash.hh"], | ||
include_dirs=["./sourmash_lib", | ||
depends=["sourmash/kmer_min_hash.hh"], | ||
include_dirs=["./sourmash", | ||
"./third-party/smhasher/"], | ||
language="c++", | ||
extra_compile_args=EXTRA_COMPILE_ARGS, | ||
|
@@ -74,7 +74,7 @@ | |
}, | ||
"include_package_data": True, | ||
"package_data": { | ||
"sourmash_lib": ['*.pxd'] | ||
"sourmash": ['*.pxd'] | ||
}, | ||
"classifiers": CLASSIFIERS | ||
} | ||
|
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#! /usr/bin/env python | ||
""" | ||
An implementation of a MinHash bottom sketch, applied to k-mers in DNA. | ||
""" | ||
from __future__ import print_function | ||
import re | ||
import math | ||
import os | ||
|
||
from ._minhash import (MinHash, get_minhash_default_seed, get_minhash_max_hash) | ||
DEFAULT_SEED = get_minhash_default_seed() | ||
MAX_HASH = get_minhash_max_hash() | ||
|
||
from .signature import (load_signatures, load_one_signature, SourmashSignature, | ||
save_signatures) | ||
from .sbtmh import load_sbt_index, search_sbt_index, create_sbt_index | ||
from . import lca | ||
from . import sbt | ||
from . import sbtmh | ||
from . import sbt_storage | ||
from . import signature | ||
|
||
# retrieve VERSION from sourmash/VERSION. | ||
thisdir = os.path.dirname(__file__) | ||
version_file = open(os.path.join(thisdir, 'VERSION')) | ||
VERSION = version_file.read().strip() |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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.