idmtools_platform_comps.cli.cli_functions module#

idmtools cli utils.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

idmtools_platform_comps.cli.cli_functions.validate_range(value: float, min: float, max: float) Tuple[bool, str][source]#

Function used to validate an integer value between min and max.

Parameters:
  • value – The value set by the user

  • min – Minimum value

  • max – Maximum value

Returns: tuple with validation result and error message if needed

idmtools_platform_comps.cli.cli_functions.environment_list(previous_settings: Dict, current_field: Field) Dict[source]#

Allows the CLI to provide a list of available environments.

Uses the previous_settings to get the endpoint to query for environments

Parameters:
  • previous_settings – previous settings set by the user in the CLI.

  • current_field – Current field specs

Returns: updates to the choices and default