Skip to content

Commit

Permalink
Merge pull request #52 from mnlevy1981/update_conda_config
Browse files Browse the repository at this point in the history
Update conda config
  • Loading branch information
rmshkv authored Jan 19, 2024
2 parents 164ac42 + 3b85ec2 commit abb888d
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: build_envs/docs.yml
environment-file: environments/docs.yml
cache-environment: true
cache-environment-key: "docs-${{env.TODAY}}"
create-args: >-
Expand Down Expand Up @@ -99,4 +99,4 @@ jobs:

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v2
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,18 @@ $ ./manage_externals/checkout_externals
Then build the necessary conda environments with

```
$ conda env create -f cupid/dev-environment.yml
$ mamba env create -f environments/dev-environment.yml
$ conda activate cupid-dev
$ which cupid-run
$ conda env create -f cupid-analysis.yml
$ mamba env create -f environments/cupid-analysis.yml
```

Notes:

1. `conda` now defaults to using `mamba` to solve environments; the `cupid-analysis.yml` environment is complicated, so older versions of `conda` should be updated (`conda update -n base conda`) or you should use `mamba` instead.
1. As of version 23.10.0, `conda` defaults to using `mamba` to solve environments.
It still feels slower than running `mamba` directly, hence the recommendation to install with `mamba env create` rather than `conda env create`.
If you do not have `mamba` installed, you can still use `conda`... it will just be significantly slower.
(To see what version of conda you have installed, run `conda --version`.)
1. If `./manage_externals/checkout_externals` is not found, run `git submodule update --init` to clone the submodule.
1. If `which cupid-run` returned the error `which: no cupid-run in ($PATH)`, then please run the following:

Expand Down
6 changes: 0 additions & 6 deletions cupid/dev-environment.yml

This file was deleted.

10 changes: 10 additions & 0 deletions environments/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
This directory contains three conda environment files:

1. dev-environment.yml: this creates (cupid-dev), which provides cupid-run and cupid-build,
and lets users update the main CUPiD code in cupid/

2. cupid-analysis.yml: this creates (cupid-analysis), the environment all scripts and notebooks
run in

3. docs.yml: this creates (cupid-docs), which is used by github actions to build
https://ncar.github.io/CUPiD
File renamed without changes.
18 changes: 18 additions & 0 deletions environments/dev-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: cupid-dev
dependencies:
- python=3.11.4
- black
- dask
- dask-jobqueue
- intake
- intake-esm
- jinja2
- jupyter-book
- pandas
- papermill
- pip
- ploomber=0.22.3
- pyyaml
- xarray
- pip:
- -e ../
File renamed without changes.

0 comments on commit abb888d

Please sign in to comment.