furrer-lab / r-containers

GNU General Public License v3.0
1 stars 0 forks source link

include URL checker in pipeline #21

Closed matteodelucchi closed 5 months ago

matteodelucchi commented 6 months ago

CRAN checks all URLs (and URIs) in a package. This makes sense, and we should include this too. They seem to use urlchecker. As this is not abn specific but required for all packages, I think it makes the most sense to have it implemented directly in the container. Also because we don't want the urlchecker package as a suggests in abn because it is unrelated to its functionality.

j-i-l commented 6 months ago

CRAN checks all URLs (and URIs) in a package. This makes sense, and we should include this too. They seem to use urlchecker. As this is not abn specific but required for all packages, I think it makes the most sense to have it implemented directly in the container. Also because we don't want the urlchecker package as a suggests in abn because it is unrelated to its functionality.

Doing sanity checks on URL's/URI's is part of a testing procedure. As such, I would install the urlchecker in the container, but perform the actual sanity check in the tests of the abn package. In doing so we keep the clean separation between the container that provides a the testing environment and the tests that are tied to the development lifecycle of the package, after all URL's and URI's are part of the package content, just like code.

So my suggestion would be:

  1. install urlchecker in the container
  2. adapt the tests to perform an url check (and even do the automatic update in case of 301) in the abn package

Does this make sense to you, @matteodelucchi

matteodelucchi commented 6 months ago

CRAN checks all URLs (and URIs) in a package. This makes sense, and we should include this too. They seem to use urlchecker. As this is not abn specific but required for all packages, I think it makes the most sense to have it implemented directly in the container. Also because we don't want the urlchecker package as a suggests in abn because it is unrelated to its functionality.

Doing sanity checks on URL's/URI's is part of a testing procedure. As such, I would install the urlchecker in the container, but perform the actual sanity check in the tests of the abn package. In doing so we keep the clean separation between the container that provides a the testing environment and the tests that are tied to the development lifecycle of the package, after all URL's and URI's are part of the package content, just like code.

So my suggestion would be:

  1. install urlchecker in the container
  2. adapt the tests to perform an url check (and even do the automatic update in case of 301) in the abn package

Does this make sense to you, @matteodelucchi

awesome, that's how we gonna do it!

j-i-l commented 6 months ago

One thing we might consider is to define a github action in this repository and then call the action in the tests of abn. In that way the sanity check of urls becomes portable to other repo's.

matteodelucchi commented 6 months ago

Implement it as an additional job in the quick tests because it is fast and usually requires only a simple fix.