bio_data_guide icon indicating copy to clipboard operation
bio_data_guide copied to clipboard

Fix GH Action Install packages

Open MathewBiddle opened this issue 1 year ago • 3 comments

https://github.com/ioos/bio_data_guide/actions/runs/8804894787/job/24166283620#step:5:1

MathewBiddle avatar Apr 23 '24 19:04 MathewBiddle

this shouldn't take 30 mins!

MathewBiddle avatar Apr 23 '24 19:04 MathewBiddle

The blocker here is that we are installing all of the libraries we use in the example applications. https://github.com/ioos/bio_data_guide/blob/db45e96601160e947fa0ee9ae396348efb703c6c/.github/workflows/deploy_bookdown.yml#L31-L35

Is there a way to just simply build the book from the .Rmd without the requirement of all the nuanced libraries being installed? https://github.com/ioos/bio_data_guide/blob/db45e96601160e947fa0ee9ae396348efb703c6c/.github/workflows/deploy_bookdown.yml#L46

I seem to recall some options that might be available to not have to install the libraries everytime https://bookdown.org/yihui/rmarkdown-cookbook/

MathewBiddle avatar Apr 24 '24 13:04 MathewBiddle

There are github actions that help manage dependencies & do caching [ref]. I think the first step towards doing this is to move the dependency list into a DESCRIPTION file.

7yl4r avatar May 17 '24 17:05 7yl4r

* checking for file ‘/private/var/folders/m4/5dz5h26x329cqq4fx333f8gm0000gn/T/Rtmp77vAAO/remotesf253130af5c/iobis-obistools-9df1c36/DESCRIPTION’ ... OK
* preparing ‘obistools’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* building ‘obistools_0.1.0.tar.gz’
Installing package into ‘/Users/runner/work/_temp/Library’
(as ‘lib’ is unspecified)
ERROR: dependencies ‘httr’, ‘leaflet’, ‘sf’, ‘terra’ are not available for package ‘obistools’
* removing ‘/Users/runner/work/_temp/Library/obistools’
Warning messages:
1: In i.p(...) :
  installation of package ‘openssl’ had non-zero exit status
2: In i.p(...) : installation of package ‘terra’ had non-zero exit status
3: In i.p(...) : installation of package ‘units’ had non-zero exit status
4: In i.p(...) : installation of package ‘s2’ had non-zero exit status
5: In i.p(...) : installation of package ‘httr’ had non-zero exit status
6: In i.p(...) : installation of package ‘raster’ had non-zero exit status
7: In i.p(...) : installation of package ‘sf’ had non-zero exit status
8: In i.p(...) :
  installation of package ‘leaflet’ had non-zero exit status
9: In i.p(...) :
  installation of package ‘/var/folders/m4/5dz5h26x329cqq4fx333f8gm0000gn/T//Rtmp77vAAO/filef256b28f40a/obistools_0.1.0.tar.gz’ had non-zero exit status
trying URL 'https://yihui.org/tinytex/TinyTeX-1.tgz'
Content type 'application/octet-stream' length 112507857 bytes (107.3 MB)

Looks like we're missing a few libraries to make obistools work. I'll try adding them and see where we get.

MathewBiddle avatar Sep 04 '24 14:09 MathewBiddle

I'm also wondering if it should be ported over to quarto as that might be easier to manage and limit dependencies.

MathewBiddle avatar Sep 04 '24 14:09 MathewBiddle

Hi @MathewBiddle ,

I started fiddling with this in a fork bbest/bio_data_guide, but the Github Action isn't firing when I push commits to test it. If you give me privileges in this repo I can try to make the GH Action work and have experience with switching to Quarto too.

bbest avatar Sep 05 '24 12:09 bbest

Thanks, @bbest! I finally got the action to work after adding a bunch of new packages to the GH Action - install step. It still takes 23 minutes to install, build, and publish the rbookdown.

Action Run: https://github.com/ioos/bio_data_guide/actions/runs/10704923264 Changes I made: https://github.com/ioos/bio_data_guide/compare/99f04e2fb74f2f3b0b21dbadd2ca37fea75bf0d1..main#diff-d9e9c628038e6474c0572aad848b58690c7222f3092b90aa09d0c3cb11e194ccL32

The current settings should allow you to submit PRs and the Actions will run. Can you advise on the additional privileges you need?

MathewBiddle avatar Sep 05 '24 14:09 MathewBiddle

Hi @MathewBiddle,

I should've forked from ioos/bio_data_guide, but did make considerable progress with a fully functional Quarto book (generating html/pdf/epub) that renders in 3.5 minutes with this pull request:

https://github.com/MathewBiddle/bio_data_guide/pull/7

bbest avatar Sep 06 '24 12:09 bbest

We are live now! Thanks @bbest for this significant contribution!

https://ioos.github.io/bio_data_guide/

MathewBiddle avatar Sep 06 '24 15:09 MathewBiddle