Manager (autotransform.util.manager)

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

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

Bases: ComponentModel

The information and functionality required for managing outstanding changes.

repo

The repo to get outstanding changes for.

Type

Repo

runner

The runner to use when updating outstanding changes.

Type

Runner

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, prev_runner: Optional[Runner] = 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.

  • prev_runner (Optional[Runner], optional) – A previously input runner. 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() None

Runs the management.

runner: Runner
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.