Skip to content

Commit

Permalink
FIX: Enable fieldmapless by default in CLI (#426)
Browse files Browse the repository at this point in the history
* FIX: Enable fieldmapless by default in CLI

* FIX: Detect empty workflow before attempting to run
  • Loading branch information
effigies authored Jan 18, 2024
1 parent 2db0774 commit 2cd1d45
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions sdcflows/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ def main(argv=None):
if exitcode != 0:
sys.exit(exitcode)

if len(sdcflows_wf.list_node_names()) == 0:
config.loggers.cli.critical(
'Workflow did not generate any jobs. Please check your inputs are valid.'
)
sys.exit(os.EX_USAGE)

# Initialize nipype config
config.nipype.init()
# Make sure loggers are started
Expand Down
4 changes: 2 additions & 2 deletions sdcflows/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ def _bids_filter(value):
g_outputs.add_argument(
"--no-fmapless",
action="store_false",
dest="fieldmapless",
default=False,
dest="fmapless",
default=True,
help="Allow fieldmap-less estimation",
)
g_outputs.add_argument(
Expand Down

0 comments on commit 2cd1d45

Please sign in to comment.