Skip to content

Commit

Permalink
Remove extras
Browse files Browse the repository at this point in the history
  • Loading branch information
smoia committed Oct 9, 2024
1 parent 34fc89d commit 94b711c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
9 changes: 7 additions & 2 deletions physutils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import os.path as op

import numpy as np
from bids import BIDSLayout
from loguru import logger

from physutils import physio
Expand All @@ -28,7 +27,7 @@ def load_from_bids(
suffix="physio",
):
"""
Load physiological data from BIDS-formatted directory
Load physiological data from BIDS-formatted directory.
Parameters
----------
Expand All @@ -50,6 +49,12 @@ def load_from_bids(
data : :class:`physutils.Physio`
Loaded physiological data
"""
try:
from bids import BIDSLayout
except ImportError:
raise ImportError(
"To use BIDS-based feature, pybids must be installed. Install manually or with `pip install physutils[bids]`"
)

# check if file exists and is in BIDS format
if not op.exists(bids_path):
Expand Down
1 change: 0 additions & 1 deletion physutils/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

# from loguru import logger


try:
from pydra import task
except ImportError:
Expand Down
8 changes: 6 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ install_requires =
matplotlib
numpy >=1.9.3
loguru
pydra
pybids
tests_require =
pytest >=3.6
test_suite = pytest
Expand All @@ -34,6 +32,10 @@ packages = find:
include_package_data = True

[options.extras_require]
pydra =
pydra
bids =
pybids
doc =
sphinx >=2.0
sphinx-argparse
Expand All @@ -49,6 +51,8 @@ test =
scipy
pytest >=5.3
pytest-cov
%(pydra)s
%(bids)s
%(style)s
devtools =
pre-commit
Expand Down

0 comments on commit 94b711c

Please sign in to comment.