colrev.env.environment_manager.EnvironmentManager

class colrev.env.environment_manager.EnvironmentManager[source]

Bases: object

The EnvironmentManager manages environment resources and services.

Initialize the instance.

Methods

check_git_installed

Check whether git is installed.

get_curated_outlets

Get the curated outlets.

get_environment_details

Get the environment details.

get_name_mail_from_git

Get the committer name and email from git (globals).

get_settings_by_key

Loads setting by the given key.

load_environment_registry

Load the local registry.

local_repos

Get local repositories from the local index.

register_ports

Register a localhost port to avoid conflicts.

register_repo

Register a repository.

save_environment_registry

Save the local registry.

update_registry

Updates a given key in the registry with new value.

Attributes

load_yaml

check_git_installed()[source]

Check whether git is installed.

Return type:

None

get_curated_outlets()[source]

Get the curated outlets.

Return type:

list

get_environment_details()[source]

Get the environment details.

Return type:

dict

classmethod get_name_mail_from_git()[source]

Get the committer name and email from git (globals).

Return type:

Tuple[str, str]

get_settings_by_key(key)[source]

Loads setting by the given key.

The registry is stored in /home/username/colrev/registry.json

Return type:

Optional[str]

load_environment_registry()[source]

Load the local registry.

Return type:

dict

local_repos()[source]

Get local repositories from the local index.

Return type:

list

register_ports(ports)[source]

Register a localhost port to avoid conflicts.

Return type:

None

register_repo(path_to_register, logger=<Logger colrev.env.environment_manager (WARNING)>)[source]

Register a repository.

Return type:

None

save_environment_registry(updated_registry)[source]

Save the local registry.

Return type:

None

update_registry(key, value)[source]

Updates a given key in the registry with new value.

The registry is stored in /home/username/colrev/registry.json

Return type:

None