LSSTDESC / TXPipe

Pipeline elements for 3x2pt analysis (shear-shear, shear-density, density-density) for DC2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use environment.yml for conda and pip requirements

ntessore opened this issue · comments

It would simplify conda installation if the conda.txt file was replaced by an environment.yml file that includes the pip installation in one go:

# environment.yml
channels: [conda-forge]
# list all conda-installable packages here
dependencies:
- astropy
- camb
- cosmosis
- dask
- dm-tree
- firecrown>=1.4.0
- fitsio
- h5py=*=mpi_mpich_*
- healpix
- healpy
- healsparse
- jax
- matplotlib
- mpi4py
- mpich
- namaster
- notebook
- numpy
- psutil
- pyccl
- sacc
- scikit-learn
- scipy
- tables-io-full
- threadpoolctl
- treecorr>=4.2.2
- pip
# install non-conda requirements using pip
- pip:
  - ceci>=1.13
  - git+https://github.com/jlvdb/hyperbolic
  - git+https://github.com/joezuntz/dask-mpi
  - git+https://github.com/LSSTDESC/gcr-catalogs#egg=GCRCatalogs
  - parallel_statistics
  - pz-rail-hub
  - tjpcov

One could then simply conda env create -n NAME --file requirements.yml in one step.

If I understand the bin/install.sh script correctly, everything is installed into the base environment there; that could be done with mamba env update -y --file requirements.yml, also making the separate pip-install step unnecessary.

To make maintenance even easier, the common requirements could also be moved to e.g. requirements-common.txt and then -r requirements-common.txt used verbatim in both environment.yml and requirements.txt.

Done in in #298