Skip to content

Commit 94b711c

Browse files
committed
Remove extras
1 parent 34fc89d commit 94b711c

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

physutils/io.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import os.path as op
1010

1111
import numpy as np
12-
from bids import BIDSLayout
1312
from loguru import logger
1413

1514
from physutils import physio
@@ -28,7 +27,7 @@ def load_from_bids(
2827
suffix="physio",
2928
):
3029
"""
31-
Load physiological data from BIDS-formatted directory
30+
Load physiological data from BIDS-formatted directory.
3231
3332
Parameters
3433
----------
@@ -50,6 +49,12 @@ def load_from_bids(
5049
data : :class:`physutils.Physio`
5150
Loaded physiological data
5251
"""
52+
try:
53+
from bids import BIDSLayout
54+
except ImportError:
55+
raise ImportError(
56+
"To use BIDS-based feature, pybids must be installed. Install manually or with `pip install physutils[bids]`"
57+
)
5358

5459
# check if file exists and is in BIDS format
5560
if not op.exists(bids_path):

physutils/tasks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
# from loguru import logger
1313

14-
1514
try:
1615
from pydra import task
1716
except ImportError:

setup.cfg

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ install_requires =
2424
matplotlib
2525
numpy >=1.9.3
2626
loguru
27-
pydra
28-
pybids
2927
tests_require =
3028
pytest >=3.6
3129
test_suite = pytest
@@ -34,6 +32,10 @@ packages = find:
3432
include_package_data = True
3533

3634
[options.extras_require]
35+
pydra =
36+
pydra
37+
bids =
38+
pybids
3739
doc =
3840
sphinx >=2.0
3941
sphinx-argparse
@@ -49,6 +51,8 @@ test =
4951
scipy
5052
pytest >=5.3
5153
pytest-cov
54+
%(pydra)s
55+
%(bids)s
5256
%(style)s
5357
devtools =
5458
pre-commit

0 commit comments

Comments
 (0)