- vivarium.cluster_tools.core.cli_tools.resolve_sim_verbosity(sim_verbosity, sim_verbosity_deprecated)[source]
Resolve per-simulation verbosity from the new
-scount and the deprecated--sim-verbosityvalue option.Returns the resolved verbosity count and emits a deprecation warning if the old value form was used. Raises a click.UsageError if verbosity is supplied both as
-s/-ssand via the deprecated--sim-verbosityoption.
- vivarium.cluster_tools.core.cli_tools.with_slack_channel(func)[source]
Decorator that adds the
--slack-channeloption for completion notifications.
- vivarium.cluster_tools.core.cli_tools.with_slack_tag(func)[source]
Decorator that adds the
--slack-tagoption for completion notifications.
- vivarium.cluster_tools.core.cli_tools.with_slack_mute(func)[source]
Decorator that adds the
--no-slackflag to suppress the notification.
- vivarium.cluster_tools.core.cli_tools.validate_slack_options(slack_channel, slack_tag, mute_slack=False)[source]
Validate the mutual constraints among the Slack notification options.
Raises a
UsageErrorif--no-slackis combined with a channel or tag, or if--slack-tagis used without--slack-channel.
Allows the user to supply a list of click options to apply to a command.
- class vivarium.cluster_tools.core.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.core.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.core.cli_tools.with_run_config(func)[source]
Decorator that adds the
--run-configoption to a Click command.
- vivarium.cluster_tools.core.cli_tools.with_workflow_config(func)[source]
Decorator that adds the
--config/-coption for workflow YAML files.
- vivarium.cluster_tools.core.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.