Manager (autotransform.util.manager)

Provides utility methods for interacting with the management of outstanding Changes.

class autotransform.util.manager.Manager(*, repo: Repo, steps: List[Step])

Bases: ComponentModel

The information and functionality required for managing outstanding changes.

repo

The repo to get outstanding changes for.

Type:

Repo

steps

The steps to take for outstanding changes.

Type:

List[Step]

static from_console(prev_manager: Optional[Manager] = None) Manager

Gets a Manager using console inputs.

Parameters:

prev_manager (Optional[Manager], optional) – A previously input Manager. Defaults to None.

Returns:

The input Manager.

Return type:

Manager

static from_data(data: Dict[str, Any]) Manager

Produces an instance of the Manager from decoded data.

Parameters:

data (Mapping[str, Any]) – The JSON decoded data.

Returns:

An instance of the Manager.

Return type:

Manager

static from_json(manager_json: str) Manager

Builds a Manager from JSON encoded values.

Parameters:

manager_json (str) – The JSON encoded Manager.

Returns:

The Manager from the JSON.

Return type:

Manager

static init_from_console(repo_name: Optional[RepoName] = None, simple: bool = False) Manager

Gets a Manager using console inputs.

Parameters:
  • repo_name (Optional[RepoName], optional) – The name of the repo to use. Defaults to None.

  • simple (bool, optional) – Whether to use simple options for setting up the manager. Defaults to False.

Returns:

The input Manager.

Return type:

Manager

static read(file_path: str) Manager

Reads management info from a JSON encoded file.

Parameters:

file_path (str) – The path where the JSON for the management info is located.

Returns:

The Manager from the file.

Return type:

Manager

repo: Repo
run(run_local: bool = False) None

Runs the management steps.

Parameters:

run_local (bool, optional) – Whether to use local runners. Defaults to False.

steps: List[Step]
write(file_path: str) None

Writes the management information to a file as JSON.

Parameters:

file_path (str) – The file to write to.