CondaRC
- class honda.config.condarc.CondarcConfig(*, channels: list[str] = None, channel_alias: str = 'https://conda.anaconda.org', default_channels: list[str] = None, override_channels_enabled: bool = True, whitelist_channels: list[str] = None, custom_channels: dict[str, str] = None, custom_multichannels: dict[str, str] = None, migrated_channel_aliases: list[str] = None, migrated_custom_channels: dict[str, str] = None, add_anaconda_token: bool = True, allow_non_channel_urls: bool = False, restore_free_channel: bool = False, repodata_fns: list[str] = None, use_only_tar_bz2: bool = None, repodata_threads: int = 0, envs_dirs: list[str] = None, pkgs_dirs: list[str] = None, default_threads: int = 0, client_ssl_cert: str = None, client_ssl_cert_key: str = None, local_repodata_ttl: Union[int, bool] = 1, offline: bool = False, proxy_servers: dict[str, str] = None, remote_connect_timeout_secs: float = 9.15, remote_max_retries: int = 3, remote_backoff_factor: int = 1, remote_read_timeout_secs: float = 60.0, ssl_verify: bool = True, aggressive_update_packages: list[str] = None, auto_update_conda: bool = True, channel_priority: Literal['flexible', 'strict', 'disabled'] = 'flexible', create_default_packages: list[str] = None, disallowed_packages: list[str] = None, force_reinstall: bool = False, pinned_packages: list[str] = None, pip_interop_enabled: bool = False, track_features: list[str] = None, experimental_solver: str = 'classic', allow_softlinks: bool = False, always_copy: bool = False, always_softlink: bool = False, path_conflict: Literal['clobber', 'warn', 'prevent'] = 'clobber', rollback_enabled: bool = True, safety_checks: Literal['warn', 'enabled', 'disabled'] = 'warn', extra_safety_checks: bool = False, signing_metadata_url_base: str = None, shortcuts: bool = True, non_admin_enabled: bool = True, separate_format_cache: bool = False, verify_threads: int = 0, execute_threads: int = 0, bld_path: str = '', croot: str = '', anaconda_upload: bool = False, conda_build: dict = None, always_yes: bool = False, auto_activate_base: bool = True, auto_stack: int = 0, changeps1: bool = True, env_prompt: str = '({default_env})', json: bool = False, notify_outdated_conda: bool = True, quiet: bool = False, report_errors: bool = False, show_channel_urls: bool = None, verbosity: int = 0, unsatisfiable_hints: bool = True, unsatisfiable_hints_check_depth: int = 2)
Contains all variables which come from the condarc file
- add_anaconda_token: bool
aliases -> add_binstar_token
In conjunction with the anaconda command-line client (installed with conda install anaconda-client), and following logging into an Anaconda Server API site using anaconda login, automatically apply a matching private token to enable access to private packages and channels.
- aggressive_update_packages: list[str]
env_var_string_delimiter -> ‘,’
A list of packages that, if installed, are always updated to the latest possible version.
- allow_non_channel_urls: bool
Warn, but do not fail, when conda detects a channel url is not a valid channel.
- allow_softlinks: bool
When allow_softlinks is True, conda uses hard-links when possible, and soft-links (symlinks) when hard-links are not possible, such as when installing on a different filesystem than the one that the package cache is on. When allow_softlinks is False, conda still uses hard- links when possible, but when it is not possible, conda copies files. Individual packages can override this setting, specifying that certain files should never be soft-linked (see the no_link option in the build recipe documentation).
- always_copy: bool
aliases -> copy
Register a preference that files be copied into a prefix during install rather than hard-linked.
- always_softlink: bool
aliases -> softlink
Register a preference that files be soft-linked (symlinked) into a prefix during install rather than hard-linked. The link source is the ‘pkgs_dir’ package cache from where the package is being linked. WARNING: Using this option can result in corruption of long-lived conda environments. Package caches are caches, which means there is some churn and invalidation. With this option, the contents of environments can be switched out (or erased) via operations on other environments.
- always_yes: bool
aliases -> yes
Automatically choose the ‘yes’ option whenever asked to proceed with a conda operation, such as when running conda install.
- anaconda_upload: bool
aliases -> binstar_upload
Automatically upload packages built with conda build to anaconda.org.
- auto_activate_base: bool
Automatically activate the base environment during shell initialization.
- auto_stack: int
Implicitly use –stack when using activate if current level of nesting (as indicated by CONDA_SHLVL environment variable) is less than or equal to specified value. 0 or false disables automatic stacking, 1 or true enables it for one level.
- auto_update_conda: bool
aliases -> self_update
Automatically update conda when a newer or higher priority version is detected.
- bld_path: str
The location where conda-build will put built packages. Same as ‘croot’, but ‘croot’ takes precedence when both are defined. Also used in construction of the ‘local’ multichannel.
- changeps1: bool
When using activate, change the command prompt ($PS1) to include the activated environment.
- channel_alias: str
The prepended url location to associate with channel names.
- channel_priority: Literal['flexible', 'strict', 'disabled']
Accepts values of ‘strict’, ‘flexible’, and ‘disabled’. The default value is ‘flexible’. With strict channel priority, packages in lower priority channels are not considered if a package with the same name appears in a higher priority channel. With flexible channel priority, the solver may reach into lower priority channels to fulfill dependencies, rather than raising an unsatisfiable error. With channel priority disabled, package version takes precedence, and the configured priority of channels is used only to break ties. In previous versions of conda, this parameter was configured as either True or False. True is now an alias to ‘flexible’.
- channels: list[str]
aliases -> channel
env_var_string_delimiter -> ‘,’
The list of conda channels to include for relevant operations.
- client_ssl_cert: str
aliases -> client_cert
A path to a single file containing a private key and certificate (e.g. .pem file). Alternately, use client_ssl_cert_key in conjunction with client_ssl_cert for individual files.
- client_ssl_cert_key: str
aliases -> client_cert_key
Used in conjunction with client_ssl_cert for a matching key file.
- conda_build: dict
aliases -> conda-build
General configuration parameters for conda-build.
- create_default_packages: list[str]
env_var_string_delimiter -> ‘,’
Packages that are by default added to a newly created environments.
- croot: str
The location where conda-build will put built packages. Same as ‘bld_path’, but ‘croot’ takes precedence when both are defined. Also used in construction of the ‘local’ multichannel.
- custom_channels: dict[str, str]
A map of key-value pairs where the key is a channel name and the value is a channel location. Channels defined here override the default ‘channel_alias’ value. The channel name (key) is not included in the channel location (value). For example, to override the location of the ‘conda-forge’ channel where the url to repodata is https://anaconda-repo.dev/packages/conda-forge/linux-64/repodata.json, add an entry ‘conda-forge: https://anaconda-repo.dev/packages’.
- custom_multichannels: dict[str, str]
A multichannel is a metachannel composed of multiple channels. The two reserved multichannels are ‘defaults’ and ‘local’. The ‘defaults’ multichannel is customized using the ‘default_channels’ parameter. The ‘local’ multichannel is a list of file:// channel locations where conda-build stashes successfully-built packages. Other multichannels can be defined with custom_multichannels, where the key is the multichannel name and the value is a list of channel names and/or channel urls.
- default_channels: list[str]
env_var_string_delimiter -> ‘,’
The list of channel names and/or urls used for the ‘defaults’ multichannel.
- default_threads: int
Threads to use by default for parallel operations. Default is None, which allows operations to choose themselves. For more specific control, see the other *_threads parameters: * repodata_threads - for fetching/loading repodata * verify_threads - for verifying package contents in transactions * execute_threads - for carrying out the unlinking and linking steps
- disallowed_packages: list[str]
aliases -> disallow
env_var_string_delimiter -> ‘&’
Package specifications to disallow installing. The default is to allow all packages.
- env_prompt: str
Template for prompt modification based on the active environment. Currently supported template variables are ‘{prefix}’, ‘{name}’, and ‘{default_env}’. ‘{prefix}’ is the absolute path to the active environment. ‘{name}’ is the basename of the active environment prefix. ‘{default_env}’ holds the value of ‘{name}’ if the active environment is a conda named environment (‘-n’ flag), or otherwise holds the value of ‘{prefix}’. Templating uses python’s str.format() method.
- envs_dirs: list[str]
aliases -> envs_path
env_var_string_delimiter -> ‘:’
The list of directories to search for named environments. When creating a new named environment, the environment will be placed in the first writable location.
- execute_threads: int
Threads to use when performing the unlink/link transaction. When not set, defaults to 1. This step is pretty strongly I/O limited, and you may not see much benefit here.
- experimental_solver: str
A string to choose between the different solver logics implemented in conda. A solver logic takes care of turning your requested packages into a list of specs to add and/or remove from a given environment, based on their dependencies and specified constraints.
- extra_safety_checks: bool
Spend extra time validating package contents. Currently, runs sha256 verification on every file within each package during installation.
- force_reinstall: bool
Ensure that any user-requested package for the current operation is uninstalled and reinstalled, even if that package already exists in the environment.
- json__: bool
Ensure all output written to stdout is structured json.
- local_repodata_ttl: Union[int, bool]
For a value of False or 0, always fetch remote repodata (HTTP 304 responses respected). For a value of True or 1, respect the HTTP Cache-Control max-age header. Any other positive integer values is the number of seconds to locally cache repodata before checking the remote server for an update.
- migrated_channel_aliases: list[str]
env_var_string_delimiter -> ‘,’
A list of previously-used channel_alias values. Useful when switching between different Anaconda Repository instances.
- migrated_custom_channels: dict[str, str]
A map of key-value pairs where the key is a channel name and the value is the previous location of the channel.
- non_admin_enabled: bool
Allows completion of conda’s create, install, update, and remove operations, for non-privileged (non-root or non-administrator) users.
- notify_outdated_conda: bool
Notify if a newer version of conda is detected during a create, install, update, or remove operation.
- offline: bool
// based urls.
- Type
Restrict conda to cached download content and file
- override_channels_enabled: bool
Permit use of the –overide-channels command-line flag.
- path_conflict: Literal['clobber', 'warn', 'prevent']
The method by which conda handle’s conflicting/overlapping paths during a create, install, or update operation. The value must be one of ‘clobber’, ‘warn’, or ‘prevent’. The ‘–clobber’ command-line flag or clobber configuration parameter overrides path_conflict set to ‘prevent’.
- pinned_packages: list[str]
env_var_string_delimiter -> ‘&’
A list of package specs to pin for every environment resolution. This parameter is in BETA, and its behavior may change in a future release.
- pip_interop_enabled: bool
Allow the conda solver to interact with non-conda-installed python packages.
- pkgs_dirs: list[str]
env_var_string_delimiter -> ‘,’
The list of directories where locally-available packages are linked from at install time. Packages not locally available are downloaded and extracted into the first writable directory.
- proxy_servers: dict[str, str]
A mapping to enable proxy settings. Keys can be either (1) a scheme://hostname form, which will match any request to the given scheme and exact hostname, or (2) just a scheme, which will match requests to that scheme. Values are are the actual proxy server, and are of the form ‘scheme://[user:password@]host[:port]’. The optional ‘user:password’ inclusion enables HTTP Basic Auth with your proxy.
- quiet: bool
Disable progress bar display and other output.
- remote_backoff_factor: int
The factor determines the time HTTP connection should wait for attempt.
- remote_connect_timeout_secs: float
The number seconds conda will wait for your client to establish a connection to a remote url resource.
- remote_max_retries: int
The maximum number of retries each HTTP connection should attempt.
- remote_read_timeout_secs: float
Once conda has connected to a remote resource and sent an HTTP request, the read timeout is the number of seconds conda will wait for the server to send a response.
- repodata_fns: list[str]
env_var_string_delimiter -> ‘,’
Specify filenames for repodata fetching. The default is (‘current_repodata.json’, ‘repodata.json’), which tries a subset of the full index containing only the latest version for each package, then falls back to repodata.json. You may want to specify something else to use an alternate index that has been reduced somehow.
- repodata_threads: int
Threads to use when downloading and reading repodata. When not set, defaults to None, which uses the default ThreadPoolExecutor behavior.
- report_errors: bool
Opt in, or opt out, of automatic error reporting to core maintainers. Error reports are anonymous, with only the error stack trace and information given by conda info being sent.
- restore_free_channel: bool
“Add the “free” channel back into defaults, behind “main” in priority. The “free” channel was removed from the collection of default channels in conda 4.7.0.
- rollback_enabled: bool
Should any error occur during an unlink/link transaction, revert any disk mutations made to that point in the transaction.
- safety_checks: Literal['warn', 'enabled', 'disabled']
Enforce available safety guarantees during package installation. The value must be one of ‘enabled’, ‘warn’, or ‘disabled’.
- separate_format_cache: bool
Treat .tar.bz2 files as different from .conda packages when filenames are otherwise similar. This defaults to False, so that your package cache doesn’t churn when rolling out the new package format. If you’d rather not assume that a .tar.bz2 and .conda from the same place represent the same content, set this to True.
- shortcuts: bool
Allow packages to create OS-specific shortcuts (e.g. in the Windows Start Menu) at install time.
- show_channel_urls: bool
Show channel URLs when displaying what is going to be downloaded.
- signing_metadata_url_base: str
Base URL for obtaining trust metadata updates (i.e., the *.root.json and key_mgr.json files) used to verify metadata and (eventually) package signatures.
- ssl_verify: bool
aliases -> verify_ssl
Conda verifies SSL certificates for HTTPS requests, just like a web browser. By default, SSL verification is enabled, and conda operations will fail if a required url’s certificate cannot be verified. Setting ssl_verify to False disables certification verification. The value for ssl_verify can also be (1) a path to a CA bundle file, or (2) a path to a directory containing certificates of trusted CA.
- track_features: list[str]
env_var_string_delimiter -> ‘,’
A list of features that are tracked by default. An entry here is similar to adding an entry to the create_default_packages list.
- unsatisfiable_hints: bool
A boolean to determine if conda should find conflicting packages in the case of a failed install.
- unsatisfiable_hints_check_depth: int
An integer that specifies how many levels deep to search for unsatisfiable dependencies. If this number is 1 it will complete the unsatisfiable hints fastest (but perhaps not the most complete). The higher this number, the longer the generation of the unsat hint will take. Defaults to 3.
- use_only_tar_bz2: Optional[bool]
A boolean indicating that only .tar.bz2 conda packages should be downloaded. This is forced to True if conda-build is installed and older than 3.18.3, because older versions of conda break when conda feeds it the new file format.
- verbosity: int
aliases -> verbose
Sets output log level. 0 is warn. 1 is info. 2 is debug. 3 is trace.
- verify_threads: int
Threads to use when performing the transaction verification step. When not set, defaults to 1.
- whitelist_channels: list[str]
env_var_string_delimiter -> ‘,’
The exclusive list of channels allowed to be used on the system. Use of any other channels will result in an error. If conda-build channels are to be allowed, along with the –use-local command line flag, be sure to include the ‘local’ channel in the list. If the list is empty or left undefined, no channel exclusions will be enforced.
- honda.config.condarc.format_config_error(exc: pydantic.error_wrappers.ValidationError, path: pathlib.Path) rich.text.Text
Formats a PyDantic error as a rich Text object.
- honda.config.condarc.get_condarc_obj(paths: Sequence[pathlib.Path]) honda.config.condarc.CondarcConfig
From a list of valid paths to condarc files, perform the desired merge operation and return a single CondaRC object.
- honda.config.condarc.merge_condarc(obj_one: honda.config.condarc.CondarcConfig, obj_two: honda.config.condarc.CondarcConfig) honda.config.condarc.CondarcConfig
Provided two CondaRC objects, return one where right (obj_two) overrides properties on left (obj_one).
- honda.config.condarc.read_yaml_file(path: pathlib.Path) Optional[dict[str, Any]]
Opens yaml file and returns value dict