Allows the user to supply a list of click options to apply to a command.
- class vivarium_cluster_tools.cli_tools.MinutesOrNone[source]
Click param type to allow user to set time in minutes or None.
- name: str = 'minutesornone'
the descriptive name of this type
- vivarium_cluster_tools.cli_tools.load_run_config(ctx, param, value)[source]
Eager callback for
--run-config. Loads a YAML file and injects its values as defaults for the current command.Options are set via
ctx.default_mapso Click’s own type coercion, callbacks, and validation still apply.Arguments (positional params) are handled by setting their
defaultand marking them as not required so Click does not complain about missing positional values.
- vivarium_cluster_tools.cli_tools.with_run_config(func)[source]
Decorator that adds the
--run-configoption to a Click command.
- vivarium_cluster_tools.cli_tools.resolve_deprecated_positional(positional_value, option_value, param_name, option_flag)[source]
Resolve a parameter that can be provided as a positional arg (deprecated) or as a keyword option (preferred).
Returns the resolved value and emits a deprecation warning if the positional form was used. Raises
click.UsageErrorif both forms are provided.