Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added conda toolchain info #16

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,51 @@ source .venv/bin/activate # for bash
# Install in developer mode
python -m pip install -e .[dev]
```
# Toolchains
## `conda`
`conda` should be used as the package and environment manager when we require `conda` only packages.

In this case, the following files should be present:
```
environment.yml
conda-win-64.lock
conda-osx-64.lock
conda-linux-64.lock
pyproject.toml
```

Remove the following files:
```
setup.py
```

An example `environment.yml`:
```
name: example_env
channels:
- defaults
- anaconda
- conda-forge

dependencies:
- python=3.9
- conda-lock
- pip
- pip:
- numpy
```
Note that it is required to include `conda-lock` in the dependencies.

To create this structure, first define `environment.yml` as you normally would. Create the environment using `conda env create -f environment.yml`. Once the environment is created successfully, run `conda activate {environment_name}`. In the activated environment, run `conda-lock -k explicit`, which will create the `.lock` files. Add and commit these.

To add a new package, add it into `environment.yml`. Then, in the activated environment, do the following:
```
conda-lock -k explicit
conda update --file conda-{os}-64.lock
```

To create the environment once all the lock files are created, simply do the following:
```
conda create --file conda-{os}-64.lock
conda activate {env_name}
```