Skip to content

Commit

Permalink
Merge branch 'master' of github.com:biocore/biom-format into upstream…
Browse files Browse the repository at this point in the history
…-update
  • Loading branch information
schferbe committed May 23, 2019
2 parents 3849b71 + 619e591 commit bca1e02
Show file tree
Hide file tree
Showing 144 changed files with 2,611 additions and 1,568 deletions.
32 changes: 12 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,33 @@
# Modified from https://github.com/biocore/scikit-bio/
language: python
env:
- PYTHON_VERSION=2.7 USE_H5PY=True NOSE_ARGS="--with-doctest --with-coverage"
- PYTHON_VERSION=2.7 USE_CYTHON=True NOSE_ARGS="--with-doctest --with-coverage"
- PYTHON_VERSION=3.4 USE_H5PY=True
- PYTHON_VERSION=3.4 USE_CYTHON=True
- PYTHON_VERSION=3.5 USE_H5PY=True
- PYTHON_VERSION=3.5 USE_CYTHON=True
- PYTHON_VERSION=3.6 USE_H5PY=True
- PYTHON_VERSION=3.6 USE_CYTHON=True
- PYTHON_VERSION=2.7 WITH_DOCTEST=False USE_CYTHON=True
- PYTHON_VERSION=3.5 WITH_DOCTEST=True USE_CYTHON=True
- PYTHON_VERSION=3.6 WITH_DOCTEST=True USE_CYTHON=True
- PYTHON_VERSION=3.7 WITH_DOCTEST=True USE_CYTHON=True
before_install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda3/bin:$PATH
install:
- conda create --yes -n env_name python=$PYTHON_VERSION pip click numpy scipy nose pep8 flake8 coverage future six pandas
- if [ ${USE_CYTHON} ]; then conda install --yes -n env_name cython; fi
- if [ ${USE_H5PY} ]; then conda install --yes -n env_name h5py>=2.2.0; fi
- if [ ${PYTHON_VERSION} = "2.7" ]; then conda install --yes -n env_name Sphinx=1.2.2; fi
- conda create --yes -n env_name python=$PYTHON_VERSION pip click numpy scipy pep8 flake8 coverage future six "pandas>=0.20.0" nose h5py>=2.2.0 cython
- rm biom/*.c
- source activate env_name
- if [ ${PYTHON_VERSION} = "2.7" ]; then pip install pyqi; fi
- if [ ${PYTHON_VERSION} = "2.7" ]; then conda install --yes Sphinx=1.2.2; fi
- pip install coveralls
- pip install -e . --no-deps
script:
- nosetests ${NOSE_ARGS}
- flake8 biom setup.py
- make test
- biom show-install-info
- if [ ${PYTHON_VERSION} = "2.7" ]; then make -C doc html; fi
# we can only validate the tables if we have H5PY
- if [ ${USE_H5PY} ]; then for table in examples/*hdf5.biom; do echo ${table}; biom validate-table -i ${table}; done; fi
- for table in examples/*hdf5.biom; do echo ${table}; biom validate-table -i ${table}; done
# validate JSON formatted tables
- for table in examples/*table.biom; do echo ${table}; biom validate-table -i ${table}; done;
- pushd biom/assets
- if [ ${USE_H5PY} ]; then python exercise_api.py ../../examples/rich_sparse_otu_table_hdf5.biom sample; fi
- if [ ${USE_H5PY} ]; then python exercise_api.py ../../examples/rich_sparse_otu_table_hdf5.biom observation; fi
- if [ ${USE_H5PY} ]; then sh exercise_cli.sh; fi
- popd
- python biom/assets/exercise_api.py examples/rich_sparse_otu_table_hdf5.biom sample
- python biom/assets/exercise_api.py examples/rich_sparse_otu_table_hdf5.biom observation
- sh biom/assets/exercise_cli.sh
after_success:
- coveralls
37 changes: 32 additions & 5 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,43 @@
BIOM-Format ChangeLog
=====================

biom 2.1.6-dev
biom 2.1.7-dev
--------------

Changes since 2.1.6 go here.
New changes since 2.1.7 go here.

New Features:

Bug fixes:

* `Table.to_dataframe(dense=False)` does now correctly produce sparse data frames (and not accidentally dense ones as before). See [issue #808](https://github.com/biocore/biom-format/issues/808).

biom 2.1.7
----------

New features and bug fixes, released on 28 September 2018.

Important:

* Python 3.4 support has been dropped. We now only support Python 2.7, 3.5, 3.6 and 3.7.
* We will be dropping Python 2.7 support on the next release.
* Pandas >= 0.20.0 is now the minimum required version.
* pytest is now used instead of nose.

New Features:

* Massive performance boost to `Table.collapse` with the default collapse function. The difference was 10s of milliseconds vs. minutes stemming from prior use of `operator.add`. See [issue #761](https://github.com/biocore/biom-format/issues/761).
* `Table.align_to` for aligning one table to another. This is useful in multi-omic analyses where multiple preparations have been performed on the sample physical samples. This is essentially a helper method around `Table.sort_order`. See [issue #747](https://github.com/biocore/biom-format/issues/747).
* Added additional sanity checks when calling `Table.to_hdf5`, see [PR #769](https://github.com/biocore/biom-format/pull/769).
* `Table.subsample()` can optionally perform subsampling with replacement. See [issue #774](https://github.com/biocore/biom-format/issues/774).
* `Table.to_dataframe()` now supports a `dense` argument to return `pd.DataFrame`. See [issue #762](https://github.com/biocore/biom-format/issues/762).
* Parsing methods for BIOM-Format 1.0.0 tables now preserve dict ordering. See [issue #781](https://github.com/biocore/biom-format/issues/781).

Bug fixes:

* `Table.subsample(by_id=True, axis='observation')` did not subsample over the 'observations'. Because of the nature of the bug, an empty table was returned, so the scope of the issue is such that it should not have produced misleading results but instead triggered empty table errors, with the exception of the pathological case of the ID namespaces between features and samples not being disjoint. See [PR #759](https://github.com/biocore/biom-format/pull/759) for more information.
* 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)

Expand All @@ -24,7 +51,7 @@ New Features:
* `Table.from_hdf5` now supports a rapid subset in the event that metadata is
not needed. In benchmarking against the Earth Microbiome Project BIOM table,
the reduction in runtime was multiple orders of magnitude while additionally
preserving substantial memory.
preserving substantial memory.
* `Table.rankdata` has been added to convert values to ranked abundances on
either axis. See [issue #645](https://github.com/biocore/biom-format/issues/639).
* Format of numbers in ``biom summarize-table`` output is now more readable and localized. See [issue #679](https://github.com/biocore/biom-format/issues/679).
Expand Down Expand Up @@ -82,8 +109,8 @@ Bug fixes:
* `biom --version` now prints the software version (previously the individual
commands did this, but not the base command).
* `Table.vlen_list_of_str_formatter` was considering a `str` to be valid for
formatting resulting in an obscure error when a `str`, as opposed to a
`list` of `str`, was used for taxonomy. See
formatting resulting in an obscure error when a `str`, as opposed to a
`list` of `str`, was used for taxonomy. See
[issue #709](https://github.com/biocore/biom-format/issues/709).

biom 2.1.4
Expand Down
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, biom-format development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ----------------------------------------------------------------------------

ifeq ($(WITH_DOCTEST), TRUE)
TEST_COMMAND = python setup.py test -a --doctest-modules --doctest-glob='*.pyx'
else
TEST_COMMAND = python setup.py test
endif

test:
$(TEST_COMMAND)
flake8 biom setup.py
2 changes: 1 addition & 1 deletion biom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
Load an example table:
>>> from biom import example_table
>>> print example_table # doctest: +NORMALIZE_WHITESPACE
>>> print(example_table) # doctest: +NORMALIZE_WHITESPACE
# Constructed from biom file
#OTU ID S1 S2 S3
O1 0.0 1.0 2.0
Expand Down
Loading

0 comments on commit bca1e02

Please sign in to comment.