-
Notifications
You must be signed in to change notification settings - Fork 79
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] Rename library to sourmash #374
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e31ef4e
Change library name to sourmash instead of sourmash_lib
luizirber 4fa1707
Fix test discovery
luizirber fc5b097
Fix tox dependencies
luizirber c8a5ae0
add cpp file to gitignore
luizirber de49f62
Fix sourmash_lib import in lca
luizirber c166cbb
Tests passing
luizirber 5adb94d
avoid using import sourmash inside the module code, use . imports ins…
luizirber b52fcfc
Avoid changing current tests
luizirber 3efe726
Remove redundant import
luizirber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Presumably recursively finds all packages and subpackages?
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.
Yes, it is recommended by the Python packaging guide: https://packaging.python.org/tutorials/distributing-packages/#packages