Skip to content

Commit

Permalink
Merge bca1e02 into 619e591
Browse files Browse the repository at this point in the history
  • Loading branch information
schferbe committed May 24, 2019
2 parents 619e591 + bca1e02 commit c332946
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Bug fixes:
* Tables of shape `(0, n)` or `(n, 0)` were raising exceptions when being written out. See [issue #619](https://github.com/biocore/biom-format/issues/619).
* Tables loaded with a `list` of empty `dict`s will have their metadata attributes set to None. See [issue #594](https://github.com/biocore/biom-format/issues/594).

* `Table.from_json` now respects the creation date [issue #770](https://github.com/biocore/biom-format/issues/770)

biom 2.1.6
----------

Expand Down
25 changes: 11 additions & 14 deletions biom/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
import scipy.stats
from copy import deepcopy
from datetime import datetime
from dateutil import parser
from json import dumps
from functools import reduce, partial
from operator import itemgetter
Expand Down Expand Up @@ -4416,21 +4417,17 @@ def from_json(self, json_table, data_pump=None,
type_ = json_table['type']

if data_pump is None:
table_obj = Table(json_table['data'], obs_ids, sample_ids,
obs_metadata, sample_metadata,
shape=json_table['shape'],
dtype=dtype,
type=type_,
generated_by=json_table['generated_by'],
input_is_dense=input_is_dense)
data = json_table['data']
else:
table_obj = Table(data_pump, obs_ids, sample_ids,
obs_metadata, sample_metadata,
shape=json_table['shape'],
dtype=dtype,
type=type_,
generated_by=json_table['generated_by'],
input_is_dense=input_is_dense)
data = data_pump
table_obj = Table(data, obs_ids, sample_ids,
obs_metadata, sample_metadata,
shape=json_table['shape'],
dtype=dtype,
type=type_,
create_date=parser.parse(json_table['date']),
generated_by=json_table['generated_by'],
input_is_dense=input_is_dense)
return table_obj

def to_json(self, generated_by, direct_io=None):
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ def run_tests(self):
from Cython.Build import cythonize
extensions = cythonize(extensions)


install_requires = ["click", "numpy >= 1.9.2", "future >= 0.16.0",
"scipy >= 0.13.0", 'pandas >= 0.20.0',
"six >= 1.10.0"]
"six >= 1.10.0", 'python-dateutil']

# HACK: for backward-compatibility with QIIME 1.9.x, pyqi must be installed.
# pyqi is not used anymore in this project.
Expand Down

0 comments on commit c332946

Please sign in to comment.