marinebon / obisindicators

R package for generating indicators from OBIS
https://marinebon.github.io/obisindicators/
Other
6 stars 4 forks source link

webpage change Articles to Examples #30

Closed MathewBiddle closed 2 years ago

MathewBiddle commented 2 years ago

See https://pkgdown.r-lib.org/articles/customise.html#navbar

MathewBiddle commented 2 years ago

I'll try to do this one...

MathewBiddle commented 2 years ago

Okay, I've finally been able to partially deploy the site locally.

In root, run:

pkgdown::build_site()

However, that only generates some of the webpages because you have to install obisindicators to build the function reference:

> pkgdown::build_site()
-- Installing package into temporary library -----------------------------------
== Building pkgdown site =======================================================
Reading from: '~/obisindicators'
Writing to:   '~/obisindicators/docs'
-- Initialising site -----------------------------------------------------------
-- Building home ---------------------------------------------------------------
Reading '.github/CONTRIBUTING.md'
Reading 'LICENSE.md'
Writing '404.html'
-- Building function reference -------------------------------------------------
Error in library(pkg$package, character.only = TRUE) : 
  there is no package called 'obisindicators'
Error: callr subprocess failed: there is no package called 'obisindicators'
Type .Last.error.trace to see where the error occurred
In addition: Warning messages:
1: In readLines(con, warn = readLines.warn) :
  incomplete final line found on './_pkgdown.yml'
2: In utils::install.packages(pkg$src_path, repos = NULL, type = "source",  :
  installation of package '~/obisindicators' had non-zero exit status

That's where the mess starts. I install R though conda, probably not a great idea. But, I can't install obisindicators because I need dggridR which needs Rtools 4.0 - which I can't figure out how to install in a specific conda environment.

Short story long, I think I can tinker with the _pkgdown.yml to get the headings the way we want, but I wont be able to fully test this until I track down all the dependencies here.

I do think we should be looking into how to make this package easier to install. I'm not an expert here, but I can manage, and I've spent a decent amount of time trying to figure this out. If we want folks to use it we need to make it easier.

7yl4r commented 2 years ago

RTools needs to be installed manually and is separate from R and RStudio. It is required to compile dggridr. I think the only thing we can do to make this easier to install is to fix this dggriddr issue (#31). We could write up some docs and an example of how to use this within docker or packrat, but those two environment-virtualization practices don't seem to be very common in the R community.