idmtools.utils.info module¶
Utilities to fetch info about local system such as packages installed.
Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.
- idmtools.utils.info.get_doc_base_url() str ¶
Get base url for documentation links.
- Returns:
Doc base url
- idmtools.utils.info.get_pip_packages_10_to_6()¶
Load packages for versions 1.0 to 6 of pip.
- Returns:
None
- Raises:
ImportError – If the pip version is different.
- idmtools.utils.info.get_pip_packages_6_to_9()¶
Get packages for pip versions 6 through 9.
- Returns:
None
- Raises:
ImportError – If the pip version is different.
- idmtools.utils.info.get_pip_packages_10_to_current()¶
Get packages for pip versions 10 to current.
- Returns:
None
- Raises:
ImportError – If the pip version is different.
- idmtools.utils.info.get_packages_from_pip()¶
Attempt to load packages from pip.
- Returns:
A list of packages installed.
- Return type:
(List[str])
- idmtools.utils.info.get_packages_list() List[str] ¶
Return a list of installed packages in the current environment.
Currently idmtools depends on pip for this functionality and since it is just used for troubleshooting, errors can be ignored.
- Returns:
A list of packages installed.
- Return type:
(List[str])
- idmtools.utils.info.get_help_version_url(help_path, url_template: str = 'https://docs.idmod.org/projects/idmtools/en/{version}/', version: Optional[str] = None) str ¶
Get the help url for a subject based on a version.
- Parameters:
help_path – Path to config(minus base url). For example, configuration.html
url_template – Template for URL containing version replacement formatter
version – Optional version. If not provided, the version of idmtools installed will be used. For development versions, the version will always be nightly
- Returns:
Path to url