Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Markiewicz <[email protected]>
  • Loading branch information
oesteban and effigies authored Dec 5, 2023
1 parent bde2175 commit a682abe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
1 change: 0 additions & 1 deletion sdcflows/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ def main(argv=None):
if config.nipype.plugin in ("MultiProc", "LegacyMultiProc"):
from contextlib import suppress
import multiprocessing as mp
import multiprocessing.forkserver
from concurrent.futures import ProcessPoolExecutor

os.environ["OMP_NUM_THREADS"] = "1"
Expand Down
25 changes: 8 additions & 17 deletions sdcflows/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,13 @@ def _bids_filter(value):
g_bids = parser.add_argument_group("Options related to BIDS")
g_bids.add_argument(
"--participant-label",
"--participant_label",
"--participant-labels",
"--participant_labels",
dest="participant_label",
action=ParticipantLabelAction,
nargs="+",
help="A space delimited list of participant identifiers or a single "
"identifier (the sub- prefix can be removed).",
)
g_bids.add_argument(
"--session",
"--session-label",
action="store",
nargs="*",
type=str,
Expand Down Expand Up @@ -180,9 +176,6 @@ def _bids_filter(value):
g_perfm = parser.add_argument_group("Options to handle performance")
g_perfm.add_argument(
"--nprocs",
"--n_procs",
"--n_cpus",
"-n-cpus",
action="store",
type=PositiveInt,
help="""\
Expand All @@ -200,7 +193,6 @@ def _bids_filter(value):
)
g_perfm.add_argument(
"--omp-nthreads",
"--ants-nthreads",
action="store",
type=PositiveInt,
help="""\
Expand All @@ -210,8 +202,6 @@ def _bids_filter(value):
not be what you want in, e.g., shared systems like a HPC cluster.""",
)
g_perfm.add_argument(
"--mem",
"--mem_gb",
"--mem-gb",
dest="memory_gb",
action="store",
Expand All @@ -222,7 +212,7 @@ def _bids_filter(value):
"--debug",
action="store_true",
default=False,
help="Initiate in debug mode",
help="Enable changes to processing to aid in debugging",
)
g_perfm.add_argument(
"--pdb",
Expand Down Expand Up @@ -256,8 +246,9 @@ def _bids_filter(value):
help="only find estimable fieldmaps (that is, estimation is not triggered)",
)
g_outputs.add_argument(
"--fmapless",
action="store_true",
"--no-fmapless",
action="store_false",
dest="fieldmapless",
default=False,
help="Allow fieldmap-less estimation",
)
Expand All @@ -271,9 +262,9 @@ def _bids_filter(value):
g_outputs.add_argument(
"--notrack",
action="store_true",
help="Opt-out of sending tracking information of this run to the NiPreps developers. This"
" information helps to improve SDCFlows and provides an indicator of real world usage "
" crucial for obtaining funding.",
help="Opt-out of sending tracking information of this run to the NiPreps developers. "
"This information helps to improve SDCFlows and provides an indicator of "
"real world usage for obtaining funding.",
)

return parser
Expand Down
2 changes: 1 addition & 1 deletion sdcflows/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class execution(_Config):
"""Drop into PDB when exceptions are encountered."""
run_uuid = "{}_{}".format(strftime("%Y%m%d-%H%M%S"), uuid4())
"""Unique identifier of this particular run."""
session = None
session_label = None
"""Filter input dataset by session identifier."""
sloppy = False
"""Run in sloppy mode (meaning, suboptimal parameters that minimize run-time)."""
Expand Down

0 comments on commit a682abe

Please sign in to comment.