plexus.cli.report.parameter_prompts module

Interactive parameter collection for CLI report execution.

This module provides functions to prompt users for report parameters when running reports from the command line.

plexus.cli.report.parameter_prompts.collect_parameters_interactively(configuration: str, provided_params: Dict[str, Any] | None = None) Dict[str, Any]

Collect parameter values interactively from the user.

Prompts for any parameters that weren’t provided via CLI options.

Args:

configuration: The report configuration string provided_params: Dictionary of parameters already provided via CLI options

Returns:

Complete dictionary of parameter name -> value mappings

plexus.cli.report.parameter_prompts.display_collected_parameters(parameters: Dict[str, Any])

Display collected parameters in a formatted table.

Args:

parameters: Dictionary of parameter name -> value

plexus.cli.report.parameter_prompts.parse_cli_parameter_options(ctx_params: Dict[str, Any]) Dict[str, Any]

Extract –param-* options from click context parameters.

Args:

ctx_params: Dictionary of all CLI parameters (from click.Context.params)

Returns:

Dictionary of parameter name -> value for parameters that were provided

plexus.cli.report.parameter_prompts.prompt_boolean(label: str, required: bool = False, default: Any = None) bool

Prompt for boolean input (Y/n).

plexus.cli.report.parameter_prompts.prompt_for_parameter(param_def: Dict[str, Any]) Any

Prompt user for a single parameter value.

Args:

param_def: Parameter definition dict

Returns:

The collected value (appropriate type)

plexus.cli.report.parameter_prompts.prompt_number(label: str, param_def: Dict[str, Any], required: bool = False, default: Any = None) float | None

Prompt for number input with validation.

plexus.cli.report.parameter_prompts.prompt_select(label: str, param_def: Dict[str, Any], required: bool = False, default: Any = None) str | None

Prompt for select input with options.

plexus.cli.report.parameter_prompts.prompt_text(label: str, required: bool = False, default: Any = None) str | None

Prompt for text input.