Skip to content

Commit

Permalink
Merge pull request #147 from 36000/make_table_optional
Browse files Browse the repository at this point in the history
[ENH] make table optional
  • Loading branch information
arokem committed Apr 2, 2024
2 parents 6ad27c9 + 51709b7 commit cbf13cf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install .[dev]
python -m pip install .[dev,tables]
- name: Build docs
run: |
cd doc
Expand Down
12 changes: 11 additions & 1 deletion afqinsight/h5io.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,19 @@
"""

import numpy as np
import tables
import warnings
from scipy import sparse
from dipy.utils.optpkg import optional_package


tables_msg = (
"To use AFQ-Insight's h5io classes, you will need to have tables "
"installed. You can do this by installing afqinsight with `pip install "
"afqinsight[tables]`, or by separately installing these packages with "
"`pip install tables`."
)
tables, HAS_TABLES, _ = optional_package("tables", trip_msg=tables_msg)


try:
import pandas as pd
Expand Down
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ install_requires =
seaborn==0.13.0
scikit-learn==1.2.1
sklearn_pandas>=2.0.0
tables==3.9.1
tqdm
statsmodels==0.14.0
copt==0.9.1
Expand All @@ -50,6 +49,8 @@ include_package_data = True
packages = find:

[options.extras_require]
tables =
tables==3.9.1
torch =
torch
tf =
Expand Down Expand Up @@ -77,6 +78,7 @@ maint =
rapidfuzz

all =
%(tables)s
%(torch)s
%(tf)s
%(dev)s
Expand Down

0 comments on commit cbf13cf

Please sign in to comment.