Closed swamidass closed 7 years ago
Here are the first two errors if it helps trace the bug:
____________________________________________________________________________________________________________ test_tree_save_load _____________________________________________________________________________________________________________
def test_tree_save_load():
factory = GraphFactory(31, 1e5, 4)
tree = SBT(factory)
for f in glob("demo/*.sig"):
sig = next(signature.load_signatures(f))
leaf = SigLeaf(os.path.basename(f), sig)
> tree.add_node(leaf)
sourmash_lib/test_sbt.py:133:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sourmash_lib/sbt.py:135: in add_node
node.update(p.node)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sourmash_lib.sbtmh.SigLeaf object at 0x10609a090>, parent = <sourmash_lib.sbt.Node object at 0x10609a110>
def update(self, parent):
for v in self.data.estimator.mh.get_mins():
> parent.data.count(v)
E TypeError: argument 1 must be string, not long
sourmash_lib/sbtmh.py:21: TypeError
___________________________________________________________________________________________________________ test_binary_nary_tree ____________________________________________________________________________________________________________
def test_binary_nary_tree():
factory = GraphFactory(31, 1e5, 4)
trees = {}
trees[2] = SBT(factory)
trees[5] = SBT(factory, d=5)
trees[10] = SBT(factory, d=10)
for f in glob("demo/*.sig"):
sig = next(signature.load_signatures(f))
leaf = SigLeaf(os.path.basename(f), sig)
for tree in trees.values():
> tree.add_node(leaf)
sourmash_lib/test_sbt.py:166:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sourmash_lib/sbt.py:135: in add_node
node.update(p.node)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sourmash_lib.sbtmh.SigLeaf object at 0x109aac090>, parent = <sourmash_lib.sbt.Node object at 0x109aac0d0>
def update(self, parent):
for v in self.data.estimator.mh.get_mins():
> parent.data.count(v)
E TypeError: argument 1 must be string, not long
sourmash_lib/sbtmh.py:21: TypeError
Could you post which version of python you are using? With the following all tests except for test_mash_yaml_to_json
pass:
$ make clean && make test
platform darwin -- Python 3.6.0, pytest-3.0.5, py-1.4.32, pluggy-0.4.0
....
platform darwin -- Python 2.7.13, pytest-3.0.6, py-1.4.32, pluggy-0.4.0
ahh! this is b/c of the version of khmer you have installed, I believe. you'll need the latest master (soon to be khmer 2.1). funny, I thought I'd put in better error messages for that... will revisit.
Note to self: add instructions somewhere for installing latest version of khmer as pip install https://github.com/dib-lab/khmer/archive/master.zip
pip install git+https://github.com/dib-lab/khmer#egg=khmer
would be one way of doing that.
(yeah, @luizirber prefers the git-free version, so that you don't have to install git. I amended the comment above.)
Fixed by #117.
In addition to these failure, two important requirements are not declared: khmer and sphynx.
doc/api-example.rst . sourmash_lib/init.py .. sourmash_lib/logging.py ....... sourmash_lib/test__minhash.py ...................................................................................... sourmash_lib/test_estimators.py .................... sourmash_lib/test_sbt.py ..FF sourmash_lib/test_signature.py ...................... sourmash_lib/test_signature_json.py ..... sourmash_lib/test_sourmash.py .............................FF.FFFF...FFFFFFFFFFF