Skip to content

Commit

Permalink
Create conda environment.yml file to install most R deps (#59)
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Kalverla <[email protected]>
  • Loading branch information
sverhoeven and Peter9192 authored Feb 16, 2023
1 parent 27bba48 commit 23c6954
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 36 deletions.
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,47 @@ and a standardized "recipe" format to define the steps in our workflows.
[Documentation](https://springtime.readthedocs.io/)

<!--installation-start-->
## Installation
## Requirements

To install springtime in your current environment, type
This project requires python and R. To simplify installation of the (indirect) R
depencencies you can create a Anaconda environment using [Mamba
forge](https://github.com/conda-forge/miniforge#mambaforge) with:

```shell
mamba env create --file environment.yml
conda activate springtime
```

## Install Python package with dependencies

Once you have python and R, to install springtime in your current environment,
type

```bash
pip install git+https://github.com/phenology/springtime.git
```

## R dependencies

Some datasets use [R](https://www.r-project.org/) libraries.
## Install R dependencies

The R dependencies can be installed from R shell with
Some datasets use [R](https://www.r-project.org/) libraries. The R dependencies
can be installed with

```R
if(!require(devtools)){install.packages(devtools)}
devtools::install_github("bluegreen-labs/[email protected]")
install.packages("daymetr")
devtools::install_github("ropensci/rppo")
```bash
Rscript -e 'devtools::install_github("bluegreen-labs/phenor")'
Rscript -e 'devtools::install_github("ropensci/rppo")'
Rscript -e 'install.packages("daymetr")'
```

To complete installation you might need to install some OS dependencies.

## Verify installation

```bash
python -m r2py.situation
> ...
> Calling `R RHOME`: /home/peter/miniconda3/envs/springtime/lib/R
> Environment variable R_LIBS_USER: None
> ...
```
<!--installation-end-->

<!--illustration-start-->
Expand Down
23 changes: 0 additions & 23 deletions docs/conda.md

This file was deleted.

57 changes: 57 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: springtime
channels:
- conda-forge
dependencies:
- pip!=21.3
- python==3.10
- hatch
# R dependencies
- r-base >=4.2
# - r-BayesianTools # not in any anconda channel
- r-ape
- r-changepoint
- r-class
- r-devtools
- r-doparallel
- r-expm
- r-filelock
- r-foreach
- r-gap
- r-GenSA
- r-getpass
- r-ggplot2
- r-gmm
- r-httr
- r-idpmisc
- r-jsonlite
- r-keyring
- r-kernsmooth
- r-lme4
- r-lmtest
- r-magrittr
- r-minqa
- r-msm
- r-ncdf4
- r-nloptr
- r-proxy
- r-qgam
- r-raster
- r-rcppeigen
# - r-rgenoud # is in r channel
- r-rvest
- r-sf
- r-snow
- r-sp
- r-sodium
- r-survival
- r-terra
- r-tibble
- r-tidyr
- r-tmvtnorm
- r-units
- r-wk
- r-xml2
- r-uuid
- r-zoo
# TODO make list smaller by only listing most direct dependencies
# this will make it easier to maintain the list
1 change: 0 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ nav:
- Getting started: setup.md
- User Guide:
- Getting started: setup.md
- Conda installation: conda.md
- CRIB installation: crib.md
- Example notebooks: notebooks/pk_wishful_workflows.ipynb
- Contributing guide: contributing.md
Expand Down

0 comments on commit 23c6954

Please sign in to comment.