ropensci / rnaturalearth

An R package to hold and facilitate interaction with natural earth map data :earth_africa:
http://ropensci.github.io/rnaturalearth/
Other
217 stars 23 forks source link

Add Remotes field for rnaturalearthhires? #73

Closed maelle closed 1 year ago

maelle commented 1 year ago

We see https://github.com/r-universe/ropensci/actions/runs/4091518554/jobs/7055696202 via https://ropensci.r-universe.dev/builds

Failed with error:  ‘there is no package called ‘rnaturalearthhires’’
PMassicotte commented 1 year ago

As I understand, CRAN packages can not have the "Remotes" field.

https://cran.r-project.org/web/packages/devtools/vignettes/dependencies.html

https://github.com/ropensci/rnaturalearth/blob/3090745b3829c3cad2747c713cab048f01c78238/DESCRIPTION#L33

Any suggestions?

maelle commented 1 year ago

oh right but for the docs building you need this field, or to pre-build the vignette as shown in this post by @jeroen https://ropensci.org/blog/2019/12/08/precompute-vignettes/

maelle commented 1 year ago

friendly reminder :smile_cat:

PMassicotte commented 1 year ago

I have been working on it, but I am trying to find a solution that do not involve renaming the vignette files. Would not be a better solution to use the Additional Repo field like CRAN does? (https://github.com/ropensci/rnaturalearth/blob/3090745b3829c3cad2747c713cab048f01c78238/DESCRIPTION#L33)?

maelle commented 1 year ago

yes that might work? https://community.rstudio.com/t/correctly-installing-non-cran-dependencies/114649/6

PMassicotte commented 1 year ago

I am not sure to understand. Would it work if I install it manually with Actions?

maelle commented 1 year ago

no I mean the Additional_repositories would work for CRAN if the package is used conditonally.

Now you can also make sure it's installed on rOpenSci docs server by adding this to DESCRIPTION:

Config/Needs/website:  ropensci/rnaturalearthhires
PMassicotte commented 1 year ago

But I think this will break CRAN? They allow having this field in the DESCRIPTION file?

maelle commented 1 year ago

the Config/Needs/website field will be fine (ignored) on CRAN https://r-pkgs.org/description.html#sec-description-custom-fields

PMassicotte commented 1 year ago

oh ok. I did that, its building. Lets see if it works :)

PMassicotte commented 1 year ago

Looks like the rnaturalearthhighres is installing, but I am getting another error and I can not find why: https://github.com/r-universe/ropensci/actions/runs/4384887842/jobs/7676906560#step:3:1140

Any idea?

maelle commented 1 year ago

weird, let me try a local build

PMassicotte commented 1 year ago

I tried to run rotemplate:::build_ropensci_docs() locally, I am also getting an error.

maelle commented 1 year ago

I am still installing deps :sweat_smile:

maelle commented 1 year ago

I can reproduce the error with pkgdown::build_site() :eyes:

PMassicotte commented 1 year ago

Same, and the error message is cryptic.

maelle commented 1 year ago

https://stackoverflow.com/questions/75117053/how-to-successfully-use-pkgdown-when-svglite-graphics-device-is-used

PMassicotte commented 1 year ago

oh... might just switch to png then. Let me try.

jeroen commented 1 year ago

Also you should move images used in README.md to man/figures:

Warning message:
Missing images in 'README.md': 'README_files/figure-gfm/unnamed-chunk-2-1.svg', 'README_files/figure-gfm/unnamed-chunk-2-2.svg', 'README_files/figure-gfm/unnamed-chunk-2-3.svg'
ℹ pkgdown can only use images in 'man/figures' and 'vignettes'
maelle commented 1 year ago

@jeroen #75 :wink:

PMassicotte commented 1 year ago

@jeroen I just did it last commit :)

jeroen commented 1 year ago

Ok great :)

PMassicotte commented 1 year ago

I think this is fixing everything, thank to @maelle and @jeroen for helping.

maelle commented 1 year ago

Awesome, great to read, well done!