Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify use of 'multiple' options in some CLI functions #5917

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/IO/H5/Python/DeleteSubfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
"subfiles",
required=True,
multiple=True,
help="Subfile to delete",
help=(
"Subfile to delete. Can be specified multiple times to delete many"
" subfiles at once."
),
)
@click.option(
"--repack/--no-repack",
Expand Down
6 changes: 5 additions & 1 deletion src/IO/H5/Python/ExtractDatFromH5.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ def extract_dat_files(
"-d",
"subfiles",
multiple=True,
help="Full path of subfile to extract (including extension).",
help=(
"Full path of subfile to extract (including extension). Can be"
" specified multiple times to extract several subfiles at once. If"
" unspecified, all subfiles will be extracted."
),
)
def extract_dat_command(**kwargs):
_rich_traceback_guard = True # Hide traceback until here
Expand Down
11 changes: 6 additions & 5 deletions src/Visualization/Python/InterpolateToMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,12 @@ def interpolate_to_mesh(
@click.option(
"--tensor-component",
"-t",
"tensor_components",
multiple=True,
help=(
"The names of the tensors that are to be interpolated. "
"Accepts regular expression. "
"If none are specified, all tensors are interpolated."
"The name of the tensor to be interpolated. Accepts regular"
" expression. Can be specified multiple times to interpolate several"
" tensors at once. If none are specified, all tensors are interpolated."
),
)
@click.option(
Expand Down Expand Up @@ -296,7 +297,7 @@ def interpolate_to_mesh_command(
target_extents,
target_basis,
target_quadrature,
tensor_component,
tensor_components,
start_time,
stop_time,
stride,
Expand Down Expand Up @@ -332,7 +333,7 @@ def interpolate_to_mesh_command(
target_file_path=target_file_path,
source_volume_data=source_subfile_name,
target_volume_data=target_subfile_name,
components_to_interpolate=tensor_component,
components_to_interpolate=tensor_components,
obs_start=start_time,
obs_end=stop_time,
obs_stride=stride,
Expand Down
11 changes: 8 additions & 3 deletions src/Visualization/Python/PlotDatFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,18 @@ def parse_functions(ctx, param, all_values):
help="Print out the available quantities and exit.",
)
@click.option(
"--functions",
"--function",
"-y",
"functions",
multiple=True,
callback=parse_functions,
help=(
"The quantities to plot. If unspecified, list all available "
"quantities and exit."
"The quantity to plot. Can be specified multiple times to plot several"
" quantities on a single figure. If unspecified, list all available"
" quantities and exit. Labels of quantities can be specified as"
" key-value pairs such as 'Error(Psi)=$L_2(\\psi)$'. Remember to wrap"
" the key-value pair in quotes on the command line to avoid issues with"
" special characters or spaces."
),
)
@click.option(
Expand Down
6 changes: 3 additions & 3 deletions src/Visualization/Python/PlotPowerMonitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ def plot_power_monitors(
"block_or_group_names",
multiple=True,
help=(
"Names of blocks or block groups to analyze. "
"Can be specified multiple times."
"Name of block or block group to analyze. "
"Can be specified multiple times to plot several block(groups) at once."
),
)
@click.option(
Expand All @@ -288,7 +288,7 @@ def plot_power_monitors(
"pattern, like 'B*,(L1I*,L0I0,L0I0)'. "
"Can be specified multiple times, in which case elements "
"are included that match _any_ of the specified "
"patterns."
"patterns. If unspecified, include all elements in the blocks."
),
)
@click.option(
Expand Down
18 changes: 9 additions & 9 deletions src/Visualization/Python/TransformVolumeData.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,12 +664,12 @@ def parse_kernels(kernels, exec_files, map_input_names):
"kernels",
multiple=True,
help=(
"Python function(s) to apply to the volume data. "
"Python function to apply to the volume data. "
"Specify as 'path.to.module.function_name', where the "
"module must be available to import. "
"Alternatively, specify just 'function_name' if the "
"function is defined in one of the '--exec' / '-e' "
"files."
"files. Can be specified multiple times."
),
)
@click.option(
Expand All @@ -679,9 +679,9 @@ def parse_kernels(kernels, exec_files, map_input_names):
type=click.File("r"),
multiple=True,
help=(
"Python file(s) to execute before loading kernels. "
"Load kernels from these files with the '--kernel' / '-k' "
"option."
"Python file to execute before loading kernels. "
"Load kernels from this file with the '--kernel' / '-k' "
"option. Can be specified multiple times."
),
)
@click.option(
Expand All @@ -691,10 +691,10 @@ def parse_kernels(kernels, exec_files, map_input_names):
multiple=True,
callback=parse_input_names,
help=(
"Map of function argument names to dataset names "
"in the volume data file. Specify key-value pairs "
"like 'spatial_metric=SpatialMetric'. If unspecified, "
"the argument name is transformed to CamelCase."
"Map of function argument name to dataset name in the volume data file."
" Specify key-value pair like 'spatial_metric=SpatialMetric'. Can be"
" specified multiple times. If unspecified, the argument name is"
" transformed to CamelCase."
),
)
@click.option(
Expand Down
2 changes: 1 addition & 1 deletion support/Python/Schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ def wrapper(*args, **kwargs):
multiple=True,
callback=_parse_params,
help=(
"Forward additional parameters to input file "
"Forward an additional parameter to the input file "
"and submit script templates. "
"Can be specified multiple times. "
"Each entry must be a 'key=value' pair, where the key is "
Expand Down
Loading