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

Create conda environment.yml file to install most R deps #59

Merged
merged 5 commits into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
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
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