Init Command (autotransform.scripts.commands.initialize)
The config command is used to update the config files for AutoTransform.
- autotransform.scripts.commands.initialize.add_args(parser: ArgumentParser) None
Adds the args to a subparser that are required to initialize AutoTransform.
- Parameters
parser (ArgumentParser) – The parser for the initialization.
- autotransform.scripts.commands.initialize.initialize_command_main(args: Namespace) None
The main method for the schedule command, handles the actual execution of scheduling runs.
- Parameters
_args (Namespace) – The arguments supplied to the initialize command.
- autotransform.scripts.commands.initialize.initialize_config(config_path: str, config_name: str, prev_config: Optional[Config] = None, simple: bool = False, use_github: Optional[bool] = None, use_jenkins: Optional[bool] = None) Tuple[Config, Optional[bool], Optional[bool]]
Gets all of the inputs required to create a config file and write it.
- Parameters
config_path (str) – The path to the config.
config_name (str) – The name of the config: user, repo, or cwd.
prev_config (Optional[Config[, optional]) – Previously input Config. Defaults to None.
simple (bool, optional) – Whether to use the simple setup. Defaults to False.
use_github (bool, optional) – Whether to use Github or not. Defaults to None.
use_jenkins (bool, optional) – Whether to use Jenkins or not. Defaults to None.
- Returns
The input Config and whether it uses Github and Jenkins.
- Return type
Tuple[Config, Optional[bool]]
- autotransform.scripts.commands.initialize.initialize_docker(repo_dir: str, examples_dir: str) None
Set up the workflow files for using Github workflows.
- Parameters
repo_dir (str) – The top level directory of the repo.
examples_dir (str) – Where example files are located.
- autotransform.scripts.commands.initialize.initialize_repo(repo_dir: str, prev_config: Optional[Config], simple: bool = False, use_github: Optional[bool] = None, use_jenkins: Optional[bool] = None) None
Set up a repo to work with AutoTransform.
- Parameters
repo_dir (str) – The top level directory of the repo.
prev_config (Optional[Config]) – Previously input Config.
simple (bool, optional) – Whether to use the simple setup. Defaults to False.
use_github (bool, optional) – Whether to use Github or not. Defaults to None.
use_jenkins (bool, optional) – Whether to use Jenkins or not. Defaults to None.
- autotransform.scripts.commands.initialize.initialize_workflows(repo_dir: str, examples_dir: str, prev_config: Optional[Config]) None
Set up the workflow files for using Github workflows.
- Parameters
repo_dir (str) – The top level directory of the repo.
examples_dir (str) – Where example files are located.
prev_config (Optional[Config]) – Previously input Config.