conda environment file to ini file
Project description
env2ini
Developer Guide
Setup
# create conda environment
$ mamba env create -f env.yml
# update conda environment
$ mamba env update -n env2ini --file env.yml
# $ mamba env update -n env2ini --file env.mac.yml
Install
pip install -e .
# install from pypi
pip install env2ini
nbdev
# activate conda environment
$ conda activate env2ini
# make sure the env2ini package is installed in development mode
$ pip install -e .
# make changes under nbs/ directory
# ...
# compile to have changes apply to the ivanova package
$ nbdev_prepare
env_to_ini.py
This script is provided so that if the env.yml
(or env.mac.yml
) file
changes you can automatically update the depedencies of the env2ini
package (under settings.ini
) to match.
$ python env_to_ini.py
# show packages that didnt change
$ python env_to_ini.py --unchanged
# specify a different environment file
$ python env_to_ini.py --unchanged --file=env.mac.yml
Usage
You can also update the conda environment file to modify the behavior
under a key env2ini
:
env2ini:
ignore:
- python
- pip
aliases:
torch: pytorch
lightning: pytorch-lightning
Note: doing so will yield a warning which looks like this:
EnvironmentSectionNotValid: The following section on 'path/to/file/env.yml' is invalid and will be ignored:
- env2ini
Here is the full environment file used to make this package for reference:
name: env2ini
channels:
- conda-forge
- fastai
dependencies:
- python>=3.10
# Utilities
# -------------------------------------------------------------------------
- tqdm
- rich
- typer
# Jupyter Notebook
# -------------------------------------------------------------------------
- conda-forge::notebook
- conda-forge::ipykernel
- conda-forge::ipywidgets
- conda-forge::jupyter_contrib_nbextensions
# nbdev
# -------------------------------------------------------------------------
- fastai::nbdev>=2.3.12
env2ini:
ignore:
- python
- pip
aliases:
torch: pytorch
torchvision: pytorch
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
env2ini-0.0.1.tar.gz
(19.5 kB
view hashes)
Built Distribution
env2ini-0.0.1-py3-none-any.whl
(22.9 kB
view hashes)