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

BUG: inconsistent order of evaluation for table error checks #813

Closed
wasade opened this issue May 7, 2019 · 1 comment
Closed

BUG: inconsistent order of evaluation for table error checks #813

wasade opened this issue May 7, 2019 · 1 comment
Assignees

Comments

@wasade
Copy link
Member

wasade commented May 7, 2019

An example of the bug is below. If print statements are added into ErrorProfile.test, it can be shown that there is an unstable order of evaluation. The reason the second example below works is that empty is by default set to ignore and not to raise. However, empty does not presently assert a lack of axis IDs or metadata which is surprising.

$ python
Python 3.5.5 | packaged by conda-forge | (default, Apr  6 2018, 13:43:56)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import biom
>>> t = biom.Table([], [], ['foo', 'bar'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/dtmcdonald/ResearchWork/software/biom-format/biom/table.py", line 508, in __init__
    errcheck(self)
  File "/Users/dtmcdonald/ResearchWork/software/biom-format/biom/err.py", line 472, in errcheck
    raise ret
biom.exception.TableException: Number of sample IDs differs from matrix size!
>>>
$ python
Python 3.5.5 | packaged by conda-forge | (default, Apr  6 2018, 13:43:56)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import biom
>>> t = biom.Table([], [], ['foo', 'bar'])
>>>

Issue first observed in biocore/unifrac#65 by @gwarmstrong

@wasade wasade self-assigned this May 7, 2019
@wasade
Copy link
Member Author

wasade commented Jan 6, 2020

Fixed in #814

@wasade wasade closed this as completed Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant