@@ -69,9 +69,10 @@ def add_run_arguments(run_parser: ArgumentParser):
6969 dest = "task_params" ,
7070 metavar = "PARAM=VALUE" ,
7171 help = (
72- "This argument instructs the command to run a single task in a Session with the given value for one of the task parameters "
73- "defined for the Step. The option must be provided once for each task parameter defined for the Step, with each instance "
74- "providing the value for a different task parameter. Mutually exclusive with --tasks and --maximum-tasks."
72+ "This argument instructs the command to run a single task or chunk of tasks in a Session with the given value for "
73+ "one of the task parameters defined for the Step. The option must be provided once for each task parameter defined "
74+ "for the Step, with each instance providing the value for a different task parameter. Mutually exclusive with "
75+ "--tasks and --maximum-tasks."
7576 ),
7677 )
7778 group .add_argument (
@@ -81,9 +82,9 @@ def add_run_arguments(run_parser: ArgumentParser):
8182 dest = "tasks" ,
8283 metavar = 'file://tasks.json OR file://tasks.yaml OR [{"Param": "Value1", ...}, {"Param": "Value2", ...}]' ,
8384 help = (
84- "This argument instructs the command to run one or more tasks for the Step in a Session. The argument must be either "
85- "the filename of a JSON or YAML file containing an array of maps from task parameter name to value; or an inlined "
86- "JSON string of the same. Mutually exclusive with --task-param/-tp and --maximum-tasks."
85+ "This argument instructs the command to run one or more tasks/chunks of tasks for the Step in a Session. "
86+ "The argument must be either the filename of a JSON or YAML file containing an array of maps from task parameter "
87+ "name to value; or an inlined JSON string of the same. Mutually exclusive with --task-param/-tp and --maximum-tasks."
8788 ),
8889 )
8990 group .add_argument (
@@ -206,10 +207,8 @@ def _process_task_params(arguments: list[str]) -> dict[str, str]:
206207 )
207208
208209 if error_list :
209- error_msg = "Found the following errors collecting Task parameters:"
210- for error in error_list :
211- error_msg += f"\n - { error } "
212- raise RuntimeError (error_msg )
210+ error_msgs = "" .join (f"\n - { error } " for error in error_list )
211+ raise RuntimeError ("Found the following errors collecting Task parameters:" + error_msgs )
213212
214213 return parameter_set
215214
@@ -278,8 +277,8 @@ def _validate_task_params(step: Step, task_params: list[dict[str, str]]) -> None
278277
279278 # Collect the names of all of the task parameters defined in the step.
280279 if step .parameterSpace is not None :
281- parameter_space = StepParameterSpaceIterator (space = step .parameterSpace )
282- task_parameter_names : set [str ] = set (parameter_space .names )
280+ param_space_iter = StepParameterSpaceIterator (space = step .parameterSpace )
281+ task_parameter_names : set [str ] = set (param_space_iter .names )
283282 else :
284283 task_parameter_names = set [str ]()
285284
@@ -298,7 +297,6 @@ def _validate_task_params(step: Step, task_params: list[dict[str, str]]) -> None
298297 error_list .append (
299298 f"Task { i } is missing values for parameters: { ', ' .join (sorted (missing_names ))} "
300299 )
301-
302300 if error_list :
303301 error_msg = "Errors defining task parameter values:\n - "
304302 error_msg += "\n - " .join (error_list )
0 commit comments