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

INST/CITATION: better only cite first URL #113

Closed florisvdh closed 1 year ago

florisvdh commented 1 year ago

If the URL field of DESCRIPTION contains multiple URLs, all of them are included in the textVersion argument of bibentry() in INST/CITATION. It seems better to only take the first one.

ThierryO commented 1 year ago

Currently we strip the source URL and DOI URL from the list of URLs. https://github.com/inbo/checklist/blob/cef05b1b54177c3eb4a37b13249b2d0ca3104b14/R/citation_description.R#L117C36-L117C36

If the author lists multiple URLs, then the author considers them all as important. Why should we choose which to display?

florisvdh commented 1 year ago

Why should we choose which to display?

While multiple URLs are often given in a DESCRIPTION file, this is not the case for bibliographic records, where typically a URL field is meant to contain one URL, hence one URL displayed in the bibliography.

I see that url does indeed select one URL, but textVersion does not.

For example, we have this behaviour:

URL: https://r-spatial.github.io/qgisprocess,
    https://github.com/r-spatial/qgisprocess

bibentry( title = "qgisprocess: Using QGIS Processing Algorithms from R. Version 0.0.0.9000", url = "https://r-spatial.github.io/qgisprocess", textVersion = "Dunnington, Dewey; Vanderhaeghe, Floris; Caha, Jan; Muenchow, Jannes (2023) qgisprocess: Using QGIS Processing Algorithms from R. Version 0.0.0.9000. https://github.com/r-spatial/qgisprocess/; https://r-spatial.github.io/qgisprocess",

Note the single element of url but the two URLs inside textVersion, in reversed order compared to DESCRIPTION.

ThierryO commented 1 year ago

https://github.com/inbo/checklist/blob/cef05b1b54177c3eb4a37b13249b2d0ca3104b14/R/citation_meta_class.R#L471 It seems like we display both the source URL and the other URLs in textVersion. Maybe display only the source URL when there are no other URLs?

florisvdh commented 1 year ago

Maybe display only the source URL when there are no other URLs?

That sounds like a good idea indeed. :+1: