Environment

class honda.config.env.EnvironmentConfig(search_path: Optional[Sequence[str]] = None, home: str = '', path: str = '', shell: str = '', is_windows: bool = False, conda_root: str = '', conda_prefix: str = '', conda_exe: str = '', conda_python_exe: str = '', conda_shlvl: int = 1, conda_default_env: int = '', condarc: str = '', xdg_config_home: str = '', user_rc_path: pathlib.Path = PosixPath('/home/docs/.condarc'), sys_rc_path: pathlib.Path = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/honda/envs/latest/.condarc'))

This is the main configuration object. It stores all configuration for the program. This configuration comes from a mix of environment variables and config files.

property compatible_shells: Sequence[str]

Depending on which OS is currently configured, we’ll want to display different shells

conda_default_env: int

Name of the default environment (currently activated one)

conda_exe: str

Path to the currently configured conda executable

conda_prefix: str

Full path to the current active environment

conda_python_exe: str

Path to the currently configured conda python executable

conda_root: str

Full path to your base conda install (not sure this is actually used)

conda_shlvl: int

Path to the currently configured conda python executable

condarc: str

Override and point to a specific condarc file

property default_channels: Sequence[str]

We differ the default channels that configured depending on OS type

home: str

Users HOME directory

is_windows: bool

Determines whether we are running on Windows or not

path: str

Users PATH variable

property platform: str

Grab the platform we are using (wrapper around platform module)

search_path: Sequence[str]

Search path which determines where we find multiple condarc confiugrations

shell: str

Shell the user is current running

sys_rc_path: pathlib.Path

Default path for system .condarc file

user_rc_path: pathlib.Path

Default path user’s .condarc file

property valid_condarc_files: Sequence[pathlib.Path]

Using the search_path property, return a list of condarc files which actually exist”

TODO: maybe cache this? This environment config is mutable, but I don’t expect consumers

to change anything after __post_init__ has run.

xdg_config_home: str

???? Not sure about this one

honda.config.env.get_search_path_from_config(config: honda.config.env.EnvironmentConfig) Sequence[str]

Uses config parameters to determine the search path.