From 2594a7f2b8cab719d8ce687f9f8cdefb7b6351cb Mon Sep 17 00:00:00 2001 From: Aditya Rawat <160102480+Adi-123456789@users.noreply.github.com> Date: Sun, 5 Oct 2025 18:48:18 +0000 Subject: [PATCH] Add documentation for Conda environment variables (fixes #971) --- docs/source/contributing.rst | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 62dcc983..1712bd83 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -110,9 +110,34 @@ In these steps, we assume ``git`` is installed and available on ``PATH``. Conda Contributor License Agreement ------------------------------------ In case you're new to CLAs, this is rather standard procedure for larger projects. +[3 lines of post-context] + +Conda Environment Variables +-------------------------- + +Conda can be configured using environment variables, which override configuration settings from files and command-line options. Most configuration keys can be set as environment variables by converting the key to uppercase and prefixing it with ``CONDA_``. For example, the configuration key ``safety_checks`` becomes ``CONDA_SAFETY_CHECKS``. + +**How to use:** + +.. code-block:: bash + + export CONDA_SAFETY_CHECKS=warn + export CONDA_SSL_VERIFY=false + export CONDA_PKGS_DIRS="/custom/path" + +**Common environment variables:** + +- ``CONDA_SAFETY_CHECKS``: Controls package safety checks (e.g., ``warn``, ``enabled``, ``disabled``) +- ``CONDA_SSL_VERIFY``: Enables or disables SSL verification (``true`` or ``false``) +- ``CONDA_PKGS_DIRS``: Sets custom package cache directories +- ``CONDA_CHANNELS``: Specifies default channels +- ``CONDA_ALWAYS_YES``: Automatically confirms all actions (``true`` or ``false``) +- ``CONDA_PREFIX``: The path to the currently active environment +- ``CONDA_DEFAULT_ENV``: The name of the currently active environment + +For a full list of configuration options, see the `conda configuration documentation `_. Most options can be set as environment variables using the pattern described above. `Django `_ and even `Python `_ itself both use something similar.