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[source]

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][source]

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: str | None = '/home/docs/.local_data', user: str | None = 'docs', python_version: str = '3.9.18', python_build: str = ('main', 'Oct 18 2023 22:10:26'), python_packages: ~typing.List[str] = <factory>, environment_variables: ~typing.Dict[str, str] = <factory>, os_name: str = 'Linux', hostname: str = 'build-1948057-project-5702-institute-for-disease-modeling-idmtoo', system_version: str = '#29~22.04.1-Ubuntu SMP Tue Jun 20 19:12:11 UTC 2023', system_architecture: str = 'x86_64', system_processor: str = 'x86_64', system_architecture_details: str = ('64bit', 'ELF'), 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.9/docs', user_group_str: str = '1000:1000', version: str | None = None)[source]

Bases: object

Utility class to provide details useful in troubleshooting issues.

data_directory: str | None = '/home/docs/.local_data'
user: str | None = 'docs'
python_version: str = '3.9.18'
python_build: str = ('main', 'Oct 18 2023 22:10:26')
python_implementation = 'CPython'
python_packages: List[str]
environment_variables: Dict[str, str]
os_name: str = 'Linux'
hostname: str = 'build-1948057-project-5702-institute-for-disease-modeling-idmtoo'
system_version: str = '#29~22.04.1-Ubuntu SMP Tue Jun 20 19:12:11 UTC 2023'
system_architecture: str = 'x86_64'
system_processor: str = 'x86_64'
system_architecture_details: str = ('64bit', 'ELF')
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.9/docs'
user_group_str: str = '1000:1000'
version: str = None
__init__(data_directory: str | None = '/home/docs/.local_data', user: str | None = 'docs', python_version: str = '3.9.18', python_build: str = ('main', 'Oct 18 2023 22:10:26'), python_packages: ~typing.List[str] = <factory>, environment_variables: ~typing.Dict[str, str] = <factory>, os_name: str = 'Linux', hostname: str = 'build-1948057-project-5702-institute-for-disease-modeling-idmtoo', system_version: str = '#29~22.04.1-Ubuntu SMP Tue Jun 20 19:12:11 UTC 2023', system_architecture: str = 'x86_64', system_processor: str = 'x86_64', system_architecture_details: str = ('64bit', 'ELF'), 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.9/docs', user_group_str: str = '1000:1000', version: str | None = None) None
class idmtools.core.system_information.LinuxSystemInformation(data_directory: str | None = '/home/docs/.local_data', user: str | None = 'docs', python_version: str = '3.9.18', python_build: str = ('main', 'Oct 18 2023 22:10:26'), python_packages: ~typing.List[str] = <factory>, environment_variables: ~typing.Dict[str, str] = <factory>, os_name: str = 'Linux', hostname: str = 'build-1948057-project-5702-institute-for-disease-modeling-idmtoo', system_version: str = '#29~22.04.1-Ubuntu SMP Tue Jun 20 19:12:11 UTC 2023', system_architecture: str = 'x86_64', system_processor: str = 'x86_64', system_architecture_details: str = ('64bit', 'ELF'), 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.9/docs', user_group_str: str = <factory>, version: str | None = None)[source]

Bases: SystemInformation

LinuxSystemInformation adds linux specific properties.

__init__(data_directory: str | None = '/home/docs/.local_data', user: str | None = 'docs', python_version: str = '3.9.18', python_build: str = ('main', 'Oct 18 2023 22:10:26'), python_packages: ~typing.List[str] = <factory>, environment_variables: ~typing.Dict[str, str] = <factory>, os_name: str = 'Linux', hostname: str = 'build-1948057-project-5702-institute-for-disease-modeling-idmtoo', system_version: str = '#29~22.04.1-Ubuntu SMP Tue Jun 20 19:12:11 UTC 2023', system_architecture: str = 'x86_64', system_processor: str = 'x86_64', system_architecture_details: str = ('64bit', 'ELF'), 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.9/docs', user_group_str: str = <factory>, version: str | None = None) None
class idmtools.core.system_information.WindowsSystemInformation(data_directory: str | None = '/home/docs/.local_data', user: str | None = 'docs', python_version: str = '3.9.18', python_build: str = ('main', 'Oct 18 2023 22:10:26'), python_packages: ~typing.List[str] = <factory>, environment_variables: ~typing.Dict[str, str] = <factory>, os_name: str = 'Linux', hostname: str = 'build-1948057-project-5702-institute-for-disease-modeling-idmtoo', system_version: str = '#29~22.04.1-Ubuntu SMP Tue Jun 20 19:12:11 UTC 2023', system_architecture: str = 'x86_64', system_processor: str = 'x86_64', system_architecture_details: str = ('64bit', 'ELF'), 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.9/docs', user_group_str: str = '1000:1000', version: str | None = None)[source]

Bases: SystemInformation

WindowsSystemInformation adds windows specific properties.

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

Fetch the system-appropriate information inspection object.

Returns:

SystemInformation with platform-specific implementation.