Package Manager
Package manager for worlds available to download and use for HoloOcean
Functions:
Returns a list of package names available for the current version of HoloOcean |
|
|
Gets the path to the binary of a specific package. |
|
Gets the path to the binary for a given scenario name |
|
For the given scenario, returns the package config associated with it (config.json) |
|
Gets the scenario configuration associated with the given name |
|
Installs a holoocean package. |
Returns a list of all installed packages |
|
|
Loads the scenario config file and returns a dictionary containing the configuration |
|
Prints the information of a package. |
|
Prunes old versions of holoocean, other than the running version. |
|
Removes a holoocean package. |
Removes all holoocean packages. |
|
|
Gets and prints information for a particular scenario file Must match this format: scenario_name.json |
|
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
ofstr
): List of package names
- Returns (
- 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
ofstr
- 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 scenarioscenario (
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 forworld_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