Package Manager¶
Package manager for worlds available to download and use for Holodeck
Functions:
Returns a list of package names available for the current version of Holodeck |
|
|
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 holodeck 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 holodeck, other than the running version. |
|
Removes a holodeck package. |
Removes all holodeck 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. |
-
holodeck.packagemanager.
available_packages
()¶ Returns a list of package names available for the current version of Holodeck
- Returns (
list
ofstr
): List of package names
- Returns (
-
holodeck.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
-
holodeck.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
-
holodeck.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
-
holodeck.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
-
holodeck.packagemanager.
install
(package_name, url=None)¶ Installs a holodeck package.
- Parameters
package_name (
str
) – The name of the package to install
-
holodeck.packagemanager.
installed_packages
()¶ Returns a list of all installed packages
- Returns
List of all the currently installed packages
- Return type
list
ofstr
-
holodeck.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
-
holodeck.packagemanager.
package_info
(pkg_name)¶ Prints the information of a package.
- Parameters
pkg_name (
str
) – The name of the desired package to get information
-
holodeck.packagemanager.
prune
()¶ Prunes old versions of holodeck, other than the running version.
DO NOT USE WITH HOLODECKPATH
Don’t use this function if you have overidden the path.
-
holodeck.packagemanager.
remove
(package_name)¶ Removes a holodeck package.
- Parameters
package_name (
str
) – the name of the package to remove
-
holodeck.packagemanager.
remove_all_packages
()¶ Removes all holodeck packages.
-
holodeck.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
-
holodeck.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