Metadata-Version: 2.1
Name: env2ini
Version: 0.0.1
Summary: conda environment file to ini file
Home-page: https://github.com/dsm-72/env2ini
Author: dsm-72
Author-email: sumner.magruder@yale.edu
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich
Requires-Dist: typer
Requires-Dist: pyyaml
Provides-Extra: dev

env2ini
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Developer Guide

### Setup

``` sh
# 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

``` sh
pip install -e .

# install from pypi
pip install env2ini
```

### nbdev

``` sh
# 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.

``` sh
$ 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`:

``` yml
env2ini:

  ignore:
    - python
    - pip

  aliases:
    torch: pytorch
    lightning: pytorch-lightning
```

**Note**: doing so will yield a warning which looks like this:

``` sh
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:

``` yml
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
```
