-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.mriqc | ||
""" | ||
|
||
from warnings import warn | ||
from pathlib import Path | ||
|
||
pkg_path = Path(__file__).parent.parent | ||
|
||
try: | ||
from ._version import __version__ | ||
except ImportError: | ||
raise RuntimeError( | ||
"pydra-mriqc 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.mriqc" | ||
) | ||
else: | ||
__version__ += "post" + post_release | ||
|
||
|
||
__all__ = ["__version__"] |