inbo / checklist

An R package for checking R packages and R code
https://inbo.github.io/checklist
GNU General Public License v3.0
16 stars 2 forks source link

How to install newest version of checklist with INBO r-universe? #66

Closed ElsLommelen closed 7 months ago

ElsLommelen commented 3 years ago

When I install checklist using INBO r-universe, I get version 0.1.12 installed, whereas when I use remotes::install_github(), I get version 0.1.13. Due to problems when using remotes in CI, I would like to use INBO r-universe for the installation, but I would also like to have the latest version installed...

After viewing the talk on r-universe, I noticed this difference in versions is because the build of 0.1.13 failed on r-universe (due to the above mentioned problem), but I wonder:

hansvancalster commented 3 years ago

I've signalled this problem also to @ThierryO via chat (but he's on leave today so I'll answer). It's due to some failing unit tests for which secret tokens are needed which are not known to r-universe. So after @ThierryO has skipped these unit tests on CRAN, the problem should be gone.

Good questions though... I'm not sure if we, as maintainer of a package, would receive a message from r-universe. I guess not, but it's easy to see on the website whether a package failed (look at the colours of the icons (penguin, windows, apple): green = OK). If it's not OK, click on the symbol and look for the errors.

I'm not sure if it's a good idea to use r-universe for installation in a CI environment. It could, but in my mind it is just a convenience for use in R-scripts. If you want to use remotes::install_github() in CI, make sure you have 'remotes:' in your DESCRIPTION file (e.g. remotes: inbo/LSVI) and everything is setup correctly in the github actions workflow. See for instance https://github.com/inbo/protocols/blob/main/.github/workflows/generate-artifact-pr.yml.

ElsLommelen commented 3 years ago

Good questions though... I'm not sure if we, as maintainer of a package, would receive a message from r-universe. I guess not, but it's easy to see on the website whether a package failed (look at the colours of the icons (penguin, windows, apple): green = OK). If it's not OK, click on the symbol and look for the errors.

Yes, but there only the previous version of checklist (0.1.12) is mentioned, and the build is done a while ago. Only when looking at the r-universe/inbo site in this list, it is clear that @ThierryO attempted to add version 0.1.13 a about a week ago, but it didn't succeed to build (and maybe it is therefore not added to the list on inbo.r-universe?). And when a user without knowledge of r-universe would just look at the checklist site to install the newest version, he has no clue at all that both installation methods will install different versions. I suppose a lot of users won't do the effort to check this r-universe site, and honestly I'm not intended to do all these checks every time for every package (e.g. when doing an update of all packages) to make sure I'm installing the latest version of each package.

I'm not sure if it's a good idea to use r-universe for installation in a CI environment. It could, but in my mind it is just a convenience for use in R-scripts. If you want to use remotes::install_github() in CI, make sure you have 'remotes:' in your DESCRIPTION file (e.g. remotes: inbo/LSVI) and everything is setup correctly in the github actions workflow. See for instance https://github.com/inbo/protocols/blob/main/.github/workflows/generate-artifact-pr.yml.

You're right, when using Linux (for CI), there is no advantage of using r-universe, as it doesn't contain some kind of 'binary files' for Linux. For CI on Windows and Mac OS, on the other hand, speeding up the installation by using the r-universe binary files seems advantageous to me (these virtual machines are generally more expensive to run per time unit, so less installation time in beneficial, and also, less requirements for the virtual machine). Anyway, for my case (on a Linux VM) I finally succeeded in installing checklist with remotes, after installing package codemetar in advance, but the main issue for me remains: how can we easily find out that an earlier version is installed with r-universe? In the meantime I noticed it is indicated in a badge on https://github.com/inbo/checklist, I don't know if it is possible to add it also to https://inbo.github.io/checklist/? But I'd appreciate to have some answers on my questions on how it works as a maintainer: