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 env file #54

Closed
sverhoeven opened this issue Feb 15, 2023 · 3 comments · Fixed by #59
Closed

Create conda env file #54

sverhoeven opened this issue Feb 15, 2023 · 3 comments · Fixed by #59
Assignees

Comments

@sverhoeven
Copy link
Collaborator

To install most R dependencies without compiling

@Peter9192
Copy link
Collaborator

Peter9192 commented Feb 15, 2023

Phenor and modistools are not available from anaconda channels, so I think we need a separate r-install command anyway. Would this also be an alternative?

# Create a basic conda environment with R and Python
mamba create -c conda-forge -n springtime python=3.9 r-base r-devtools

# Install r-deps from command line (how to make this simpler?)
Rscript -e 'devtools::install_github("bluegreen-labs/phenor")'

# Install python package and verify installation
pip install git+https://github.com/phenology/springtime.git
python -m r2py.situation
> ...
> Calling `R RHOME`: /home/peter/miniconda3/envs/springtime/lib/R
> Environment variable R_LIBS_USER: None
> ...

# Or use hatch
pip install hatch
hatch env create
hatch run python -m rpy2.situation

Can we somehow create an r-package with phenor and modistools as dependencies and make it available on CRAN/conda channels? Or do you want to look at the dependencies from phenor and modistools and see how many of them are available on conda channels already and use that?

@Peter9192
Copy link
Collaborator

Perhaps r-essentials already contains the bulk of what we need?

@sverhoeven
Copy link
Collaborator Author

Maybe https://cran.r-project.org/web/packages/packrat/ can be used to make a lock file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants