Package Manager

Package manager for worlds available to download and use for HoloOcean

Functions:

available_packages()

Returns a list of package names available for the current version of HoloOcean

get_binary_path_for_package(package_name)

Gets the path to the binary of a specific package.

get_binary_path_for_scenario(scenario_name)

Gets the path to the binary for a given scenario name

get_package_config_for_scenario(scenario)

For the given scenario, returns the package config associated with it (config.json)

get_scenario(scenario_name)

Gets the scenario configuration associated with the given name

install(package_name[, url, branch, commit])

Installs a holoocean package.

installed_packages()

Returns a list of all installed packages

load_scenario_file(scenario_path)

Loads the scenario config file and returns a dictionary containing the configuration

package_info(pkg_name)

Prints the information of a package.

prune()

Prunes old versions of holoocean, other than the running version.

remove(package_name)

Removes a holoocean package.

remove_all_packages()

Removes all holoocean packages.

scenario_info([scenario_name, scenario, ...])

Gets and prints information for a particular scenario file Must match this format: scenario_name.json

world_info(world_name[, world_config, ...])

Gets and prints the information of a world.

holoocean.packagemanager.available_packages()

Returns a list of package names available for the current version of HoloOcean

Returns (list of str):

List of package names

holoocean.packagemanager.get_binary_path_for_package(package_name)

Gets the path to the binary of a specific package.

Parameters:

package_name (str) – Name of the package to search for

Returns:

Returns the path to the config directory

Return type:

str

Raises:

NotFoundException – When the package requested is not found

holoocean.packagemanager.get_binary_path_for_scenario(scenario_name)

Gets the path to the binary for a given scenario name

Parameters:

scenario_name (str) – name of the configuration to load - eg “UrbanCity-Follow” Must be an exact match. Name must be unique among all installed packages

Returns:

A dictionary containing the configuration file

Return type:

dict

holoocean.packagemanager.get_package_config_for_scenario(scenario)

For the given scenario, returns the package config associated with it (config.json)

Parameters:

scenario (dict) – scenario dict to look up the package for

Returns:

package configuration dictionary

Return type:

dict

holoocean.packagemanager.get_scenario(scenario_name)

Gets the scenario configuration associated with the given name

Parameters:

scenario_name (str) – name of the configuration to load - eg “UrbanCity-Follow” Must be an exact match. Name must be unique among all installed packages

Returns:

A dictionary containing the configuration file

Return type:

dict

holoocean.packagemanager.install(package_name, url=None, branch=None, commit=None)

Installs a holoocean package.

Parameters:

package_name (str) – The name of the package to install

holoocean.packagemanager.installed_packages()

Returns a list of all installed packages

Returns:

List of all the currently installed packages

Return type:

list of str

holoocean.packagemanager.load_scenario_file(scenario_path)

Loads the scenario config file and returns a dictionary containing the configuration

Parameters:

scenario_path (str) – Path to the configuration file

Returns:

A dictionary containing the configuration file

Return type:

dict

holoocean.packagemanager.package_info(pkg_name)

Prints the information of a package.

Parameters:

pkg_name (str) – The name of the desired package to get information

holoocean.packagemanager.prune()

Prunes old versions of holoocean, other than the running version.

DO NOT USE WITH HOLODECKPATH

Don’t use this function if you have overidden the path.

holoocean.packagemanager.remove(package_name)

Removes a holoocean package.

Parameters:

package_name (str) – the name of the package to remove

holoocean.packagemanager.remove_all_packages()

Removes all holoocean packages.

holoocean.packagemanager.scenario_info(scenario_name='', scenario=None, base_indent=0)

Gets and prints information for a particular scenario file Must match this format: scenario_name.json

Parameters:
  • scenario_name (str) – The name of the scenario

  • scenario (dict, optional) – Loaded dictionary config (overrides world_name and scenario_name)

  • base_indent (int, optional) – How much to indent output by

holoocean.packagemanager.world_info(world_name, world_config=None, base_indent=0)

Gets and prints the information of a world.

Parameters:
  • world_name (str) – the name of the world to retrieve information for

  • world_config (dict, optional) – A dictionary containing the world’s configuration. Will find the config if None. Defaults to None.

  • base_indent (int, optional) – How much to indent output