+
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
latest_python: "3.13"
supported_pythons: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
supported_pythons: '["3.10", "3.11", "3.12", "3.13"]'
miniforge_version: "23.11.0-0"
miniforge_variant: "Mambaforge"

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '*'

env:
earliest_python: "3.9"
earliest_python: "3.10"
latest_python: "3.13"
miniforge_version: "23.11.0-0"
miniforge_variant: "Mambaforge"
Expand All @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.10
- name: Build distribution
run: |
# set version from '${{ github.ref_name }}'
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
*.pyc
biom_format.egg-info/

# Cython converted files
########################
*.c

# Cython compiled files
#######################
*.so
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ BIOM-Format ChangeLog
biom-2.1.16-dev
---------------

Important:

* The underlying data structure has been migrated from SciPy sparse matrix (spmatrix) to sparse array (sparray). See PR[#993](https://github.com/biocore/biom-format/pull/993). This change does not affect any public-facing API of biom-format. However, be minded that the downstream analysis of data extracted from a BIOM table may be impacted by the API change in sparray vs. spmatrix. See SciPy's documentation: https://docs.scipy.org/doc/scipy/reference/sparse.html for details. This change requires SciPy >= 1.8.0. See its release note: https://docs.scipy.org/doc/scipy/release/1.8.0-notes.html for details.

Performance improvements:

* Decreased execution time of `import biom` by half with lazy imports. See PR[#987](https://github.com/biocore/biom-format/pull/987)
Expand Down
2 changes: 1 addition & 1 deletion biom/_filter.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _filter(arr, ids, metadata, index, ids_to_keep, axis, invert):
arr = arr.tocsr()
elif axis == 1:
arr = arr.tocsc()
fmt = arr.getformat()
fmt = arr.format

cdef cnp.ndarray[cnp.uint8_t, ndim=1] bools

Expand Down
10 changes: 5 additions & 5 deletions biom/_subsample.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ cdef _subsample_with_replacement(cnp.ndarray[cnp.float64_t, ndim=1] data,

Parameters
----------
data : {csr_matrix, csc_matrix}.data
data : {csr_array, csc_array}.data
A 1xM sparse vector data
indptr : {csr_matrix, csc_matrix}.indptr
indptr : {csr_array, csc_array}.indptr
A 1xM sparse vector indptr
n : int
Number of items to subsample from `arr`
Expand Down Expand Up @@ -66,9 +66,9 @@ cdef _subsample_without_replacement(cnp.ndarray[cnp.float64_t, ndim=1] data,

Parameters
----------
data : {csr_matrix, csc_matrix}.data
data : {csr_array, csc_array}.data
A 1xM sparse vector data
indptr : {csr_matrix, csc_matrix}.indptr
indptr : {csr_array, csc_array}.indptr
A 1xM sparse vector indptr
n : int
Number of items to subsample from `arr`
Expand Down Expand Up @@ -153,7 +153,7 @@ def subsample(arr, n, with_replacement, rng):

Parameters
----------
arr : {csr_matrix, csc_matrix}
arr : {csr_array, csc_array}
A 1xM sparse vector
n : int
Number of items to subsample from `arr`
Expand Down
2 changes: 1 addition & 1 deletion biom/_transform.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def _transform(arr, ids, metadata, function, axis):

Parameters
----------
arr : csr_matrix or csc_matrix
arr : csr_array or csc_array
Matrix whose rows or columns (respectively) are to be
transformed.
ids : 1D array_like
Expand Down
21 changes: 11 additions & 10 deletions biom/cli/installation_informer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@


import sys
from importlib.metadata import version, PackageNotFoundError

import click

Expand Down Expand Up @@ -63,25 +64,25 @@ def _get_dependency_version_info():
not_installed_msg = "Not installed"

try:
from click import __version__ as click_lib_version
except ImportError:
click_lib_version = version("click")
except PackageNotFoundError:
click_lib_version = not_installed_msg

try:
from numpy import __version__ as numpy_lib_version
except ImportError:
numpy_lib_version = version("numpy")
except PackageNotFoundError:
numpy_lib_version = ("ERROR: Not installed - this is required! "
"(This will also cause the BIOM library to "
"not be importable.)")

try:
from scipy import __version__ as scipy_lib_version
except ImportError:
scipy_lib_version = version("scipy")
except PackageNotFoundError:
scipy_lib_version = not_installed_msg

try:
from h5py import __version__ as h5py_lib_version
except ImportError:
h5py_lib_version = version("h5py")
except PackageNotFoundError:
h5py_lib_version = ("WARNING: Not installed - this is an optional "
"dependency. It is strongly recommended for "
"large datasets.")
Expand All @@ -97,8 +98,8 @@ def _get_package_info():
"numpy) - is it installed and in your "
"$PYTHONPATH?")
try:
from biom import __version__ as biom_lib_version
except ImportError:
biom_lib_version = version("biom-format")
except PackageNotFoundError:
biom_lib_version = import_error_msg

return (("biom-format version", biom_lib_version),)
Expand Down
Loading
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载