Log conda environments to Anaconda.cloud
conda install anaconda-cloud::anaconda-env-log
conda install anaconda-cloud/label/broken::anaconda-env-log
conda install anaconda-cloud/label/dev::anaconda-env-log
pip install -i https://pypi.anaconda.org/anaconda-cloud/simple anaconda-env-log
pip install -i https://pypi.anaconda.org/anaconda-cloud/label/broken/simple anaconda-env-log
pip install -i https://pypi.anaconda.org/anaconda-cloud/label/dev/simple anaconda-env-log
Log conda environments to anaconda.cloud
Once install, conda environment are automatically logged to anaconda.cloud when they are created or updated. This is accomplished with a pre-command conda plugin.
Environment can be logged manually from the command line:
conda env-log log {--name/-n/--prefix/-p name_or_prefix}
Environment are logged with an alerts_enabled
flagged.
This can be set per environment from the command line:
conda env-log alerts {--name/-n/--prefix/-p name_or_prefix} --enable/disable
The current alerts status can be checked using:
conda env-log alerts {--name/-n/--prefix/-p name_or_prefix}
The ANACONDA_ENV_LOG_ALERTS_ENABLED
environment variable controls the default alerts status for environments that do not set this explicitly. The default is False, meaning alerts are disabled.
By default, environment details are logged to anaconda.cloud.
This can be changed by setting the ANACONDA_ENV_LOG_ACTION
environment variables.
Possible values for this variable include:
none
: Do not log anything.print
: Print the recorded environment details to stdout.local-dir
: Save the logs as JSON file in the directory specified by ANACONDA_ENV_LOG_DIR
.
If not specified logs are saved in $HOME/env_logs.anaconda.cloud
: Log to anaconda.cloud, the default option.
This is accomplished using the anaconda-cloud-auth
library which has it's
own set of variables for configuration.These alternatives logging methods are intended for testing and debugging not production use.
Ensure you have conda
installed.
Then run:
make setup
This creates a development environment in the root of the project directory. Activate it using:
conda activate ./env
After activation conda
will still refer to the install in the base environment. The conda
from the environment where plugin is installed needs to be called from the condabin directory:
./env/condabin/conda env-log --help
To switch conda
to refer to the developmennt installuse:
eval $(./env/condabin/conda shell.zsh hook)
Replace shell.zsh
with shell.bash
when using bash.
With this switch conda
can be used directory to test logging and the subcommand, for example:
conda env-log --help
make test
make tox