idmtools.core.system_information module

Utilities functions/classes to fetch info that is useful for troubleshooting user issues.

Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.

idmtools.core.system_information.get_data_directory() str

Get our default data directory for a user.

Returns:

Default data directory for a user.

idmtools.core.system_information.get_filtered_environment_vars(exclude=None) Dict[str, str]

Get environment vars excluding a specific set.

Parameters:

exclude – If not provided, we default to using [‘LS_COLORS’, ‘XDG_CONFIG_DIRS’, ‘PS1’, ‘XDG_DATA_DIRS’]

Returns:

Environment vars filtered for items specified

class idmtools.core.system_information.SystemInformation(data_directory: ~typing.Optional[str] = '/home/docs/.local_data', user: ~typing.Optional[str] = 'docs', python_version: str = '3.7.9', python_build: str = ('default', 'Oct 19 2020 15:13:17'), python_packages: ~typing.List[str] = <factory>, environment_variables: ~typing.Dict[str, str] = <factory>, os_name: str = 'Linux', hostname: str = 'build-1153282-project-5702-institute-for-disease-modeling-idmtoo', system_version: str = '#6-Ubuntu SMP Thu Mar 31 09:44:20 UTC 2022', system_architecture: str = 'x86_64', system_processor: str = 'x86_64', system_architecture_details: str = ('64bit', ''), default_docket_socket_path: str = '/var/run/docker.sock', cwd: str = '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-idmtools/checkouts/v1.7.1/docs', user_group_str: str = '1000:1000', version: ~typing.Optional[str] = None)

Bases: object

Utility class to provide details useful in troubleshooting issues.

data_directory: Optional[str] = '/home/docs/.local_data'
user: Optional[str] = 'docs'
python_version: str = '3.7.9'
python_build: str = ('default', 'Oct 19 2020 15:13:17')
python_implementation = 'CPython'
python_packages: List[str]
environment_variables: Dict[str, str]
os_name: str = 'Linux'
hostname: str = 'build-1153282-project-5702-institute-for-disease-modeling-idmtoo'
system_version: str = '#6-Ubuntu SMP Thu Mar 31 09:44:20 UTC 2022'
system_architecture: str = 'x86_64'
system_processor: str = 'x86_64'
system_architecture_details: str = ('64bit', '')
default_docket_socket_path: str = '/var/run/docker.sock'
cwd: str = '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-idmtools/checkouts/v1.7.1/docs'
user_group_str: str = '1000:1000'
version: str = None
__init__(data_directory: ~typing.Optional[str] = '/home/docs/.local_data', user: ~typing.Optional[str] = 'docs', python_version: str = '3.7.9', python_build: str = ('default', 'Oct 19 2020 15:13:17'), python_packages: ~typing.List[str] = <factory>, environment_variables: ~typing.Dict[str, str] = <factory>, os_name: str = 'Linux', hostname: str = 'build-1153282-project-5702-institute-for-disease-modeling-idmtoo', system_version: str = '#6-Ubuntu SMP Thu Mar 31 09:44:20 UTC 2022', system_architecture: str = 'x86_64', system_processor: str = 'x86_64', system_architecture_details: str = ('64bit', ''), default_docket_socket_path: str = '/var/run/docker.sock', cwd: str = '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-idmtools/checkouts/v1.7.1/docs', user_group_str: str = '1000:1000', version: ~typing.Optional[str] = None) None
class idmtools.core.system_information.LinuxSystemInformation(data_directory: ~typing.Optional[str] = '/home/docs/.local_data', user: ~typing.Optional[str] = 'docs', python_version: str = '3.7.9', python_build: str = ('default', 'Oct 19 2020 15:13:17'), python_packages: ~typing.List[str] = <factory>, environment_variables: ~typing.Dict[str, str] = <factory>, os_name: str = 'Linux', hostname: str = 'build-1153282-project-5702-institute-for-disease-modeling-idmtoo', system_version: str = '#6-Ubuntu SMP Thu Mar 31 09:44:20 UTC 2022', system_architecture: str = 'x86_64', system_processor: str = 'x86_64', system_architecture_details: str = ('64bit', ''), default_docket_socket_path: str = '/var/run/docker.sock', cwd: str = '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-idmtools/checkouts/v1.7.1/docs', user_group_str: str = <factory>, version: ~typing.Optional[str] = None)

Bases: SystemInformation

LinuxSystemInformation adds linux specific properties.

__init__(data_directory: ~typing.Optional[str] = '/home/docs/.local_data', user: ~typing.Optional[str] = 'docs', python_version: str = '3.7.9', python_build: str = ('default', 'Oct 19 2020 15:13:17'), python_packages: ~typing.List[str] = <factory>, environment_variables: ~typing.Dict[str, str] = <factory>, os_name: str = 'Linux', hostname: str = 'build-1153282-project-5702-institute-for-disease-modeling-idmtoo', system_version: str = '#6-Ubuntu SMP Thu Mar 31 09:44:20 UTC 2022', system_architecture: str = 'x86_64', system_processor: str = 'x86_64', system_architecture_details: str = ('64bit', ''), default_docket_socket_path: str = '/var/run/docker.sock', cwd: str = '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-idmtools/checkouts/v1.7.1/docs', user_group_str: str = <factory>, version: ~typing.Optional[str] = None) None
class idmtools.core.system_information.WindowsSystemInformation(data_directory: ~typing.Optional[str] = '/home/docs/.local_data', user: ~typing.Optional[str] = 'docs', python_version: str = '3.7.9', python_build: str = ('default', 'Oct 19 2020 15:13:17'), python_packages: ~typing.List[str] = <factory>, environment_variables: ~typing.Dict[str, str] = <factory>, os_name: str = 'Linux', hostname: str = 'build-1153282-project-5702-institute-for-disease-modeling-idmtoo', system_version: str = '#6-Ubuntu SMP Thu Mar 31 09:44:20 UTC 2022', system_architecture: str = 'x86_64', system_processor: str = 'x86_64', system_architecture_details: str = ('64bit', ''), default_docket_socket_path: str = '/var/run/docker.sock', cwd: str = '/home/docs/checkouts/readthedocs.org/user_builds/institute-for-disease-modeling-idmtools/checkouts/v1.7.1/docs', user_group_str: str = '1000:1000', version: ~typing.Optional[str] = None)

Bases: SystemInformation

WindowsSystemInformation adds windows specific properties.

default_docket_socket_path: str = '//var/run/docker.sock'
idmtools.core.system_information.get_system_information() SystemInformation

Fetch the system-appropriate information inspection object.

Returns:

SystemInformation with platform-specific implementation.