Skip to content

Commit

Permalink
fix: Revert breaking changes to execution progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
b-butler committed Aug 28, 2023
1 parent 65825bd commit ab37ab0
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions flow/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -3300,7 +3300,7 @@ def _op_submission_summary(counter):
print("\n" + "\n".join(profiling_results), file=file)

def _run_operations(
self, operations, pretend=False, np=None, timeout=None, hide_progress=True
self, operations, pretend=False, np=None, timeout=None, progress=True
):
"""Execute the next operations as specified by the project's workflow.
Expand All @@ -3321,7 +3321,7 @@ def _run_operations(
An optional timeout for each operation in seconds after which
execution will be cancelled. Use None to indicate no timeout
(Default value = None).
hide_progress : bool
progress : bool
Hides progress bar when printing status output (Default value = True).
"""
Expand All @@ -3330,7 +3330,7 @@ def _run_operations(
operations = list(operations) # ensure list

if np is None or np == 1 or pretend:
if not hide_progress:
if not progress:
operations = tqdm(operations)
for operation in operations:
self._execute_operation(operation, timeout, pretend)
Expand All @@ -3342,7 +3342,7 @@ def _run_operations(
)
try:
self._run_operations_in_parallel(
pool, operations, hide_progress, timeout
pool, operations, progress, timeout
)
except self._PickleError as error:
raise RuntimeError(
Expand Down Expand Up @@ -3387,7 +3387,7 @@ def _run_operations_in_parallel(self, pool, operations, hide_progress, timeout):
operations : Sequence of instances of :class:`_JobOperation`
The operations to execute.
hide_progress : bool
Hides progress bar when printing status output (Default value = True).
Hides progress bar when printing status output.
timeout : float
A timeout for each operation in seconds after which
execution will be cancelled. Use None to indicate no timeout
Expand Down Expand Up @@ -3522,7 +3522,7 @@ def run(
timeout=None,
num=None,
num_passes=1,
hide_progress=True,
progress=True,
order=None,
ignore_conditions=IgnoreConditions.NONE,
):
Expand Down Expand Up @@ -3565,7 +3565,7 @@ def run(
The total number of executions of one specific job-operation pair
will not exceed this argument. The default is 1, there is no limit
if this argument is None.
hide_progress : bool
progress : bool
Hides progress bar when printing status output (Default value = True).
order : str, callable, or None
Specify the order of operations. Possible values are:
Expand Down Expand Up @@ -3753,7 +3753,7 @@ def key_func_by_job(operation):
pretend=pretend,
np=np,
timeout=timeout,
hide_progress=hide_progress,
progress=progress,
)

def _gather_flow_groups(self, names=None):
Expand Down Expand Up @@ -4858,7 +4858,7 @@ def _main_run(self, args):
timeout=args.timeout,
num=args.num,
num_passes=args.num_passes,
hide_progress=args.hide_progress,
progress=args.progress,
order=args.order,
ignore_conditions=args.ignore_conditions,
)
Expand Down Expand Up @@ -5050,8 +5050,8 @@ class MyProject(FlowProject):
help="Do not actually execute commands, just show them.",
)
execution_group.add_argument(
"--hide_progress",
action="store_false",
"--progress",
action="store_true",
help="Hide the progress bar during execution.",
)
execution_group.add_argument(
Expand Down

0 comments on commit ab37ab0

Please sign in to comment.