Skip to content

Commit

Permalink
added package init
Browse files Browse the repository at this point in the history
  • Loading branch information
tclose committed May 21, 2024
1 parent e235fc0 commit 6da7064
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pydra/tasks/niworkflows/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
This is a basic doctest demonstrating that the package and pydra can both be successfully
imported.
>>> import pydra.engine
>>> import pydra.tasks.niworkflows
"""

from warnings import warn
from pathlib import Path

pkg_path = Path(__file__).parent.parent

try:
from ._version import __version__
except ImportError:
raise RuntimeError(
"pydra-niworkflows has not been properly installed, please run "
f"`pip install -e {str(pkg_path)}` to install a development version"
)
if "post" not in __version__:
try:
from ._post_release import post_release
except ImportError:
warn(
"Nipype interfaces haven't been automatically converted from their specs in "
f"`nipype-auto-conv`. Please run `{str(pkg_path / 'nipype-auto-conv' / 'generate')}` "
"to generated the converted Nipype interfaces in pydra.tasks.niworkflows"
)
else:
__version__ += "post" + post_release


__all__ = ["__version__"]

0 comments on commit 6da7064

Please sign in to comment.