Skip to content

Commit

Permalink
Merge pull request #113 from ecohealthalliance/update/dependencies-renv
Browse files Browse the repository at this point in the history
adding system dependencies
  • Loading branch information
collinschwantes authored Jan 9, 2024
2 parents 33e188d + 0d6567d commit a59b87e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/bookdown_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
- name: Install libgit2
run: sudo apt install libgit2-dev

- name: Install system dependencies
run: |
sh sys_deps/sys_deps.sh
- name: Cache bookdown results
uses: actions/cache@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions dependencies.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ project](http://ropenscilabs.github.io/r-docker-tutorial/)

- R packages can be a useful project output. We have some in-house R packages to provide access to internal data and generate reports, and may be developing more for external audiences. Hadley Wickham's [R Packages Book](http://r-pkgs.had.co.nz/) provides guidance for these, and we expect our packages to be up to [rOpenSci standards](https://github.com/ropensci/onboarding).


## GCC and mac silicon

- R package installation can be especially tricky on Mac computers with [Apple Silicon](https://support.apple.com/en-us/HT211814). Below are some steps to get
package install set ups.

Expand All @@ -40,4 +43,5 @@ FLIBS = -L/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/13
configure.args = "--with-udunits2-lib=/opt/homebrew/Cellar/udunits/2.2.28/lib --with-udunits2-include=/opt/homebrew/Cellar/udunits/2.2.28/include")`


##
Historically some projects used [Packrat](https://rstudio.github.io/packrat/) or [checkpoint](https://CRAN.R-project.org/package=checkpoint) to fix R package versions. These systems have been superceded by `renv`.
9 changes: 9 additions & 0 deletions sys_deps/sys_deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apt-get update && apt-get install -y --no-install-recommends \
libcurl4-openssl-dev \
libssl-dev \
git-crypt \
libudunits2-dev \
libgdal-dev \
libgeos-dev \
libproj-dev \
libglpk-dev

0 comments on commit a59b87e

Please sign in to comment.