pkgcache icon indicating copy to clipboard operation
pkgcache copied to clipboard

[Feature request] Add metadata from Bioconductor packages

Open averissimo opened this issue 2 years ago • 1 comments

The pkgcache::meta_cache_list("SummarizedExperiment")$published currently returns a NULL date for Bioc packages

The date information is available under https://bioconductor.org/packages/3.17/bioc/VIEWS and can be parsed on the Date/Publication field. bioc::BiocPkgTools package may also be able to access the information

Considerations:

There could be an issue about which version from Bioconductor to use for the date. Possible workarounds can be implemented by defaulting to pkgcache::bioc_version() or as a parameter for meta_cache_list function

Simple sample code that retrieves publication date (without any caching)

sample_bioc_date <- \(package) {
  uri <- url(glue::glue("https://bioconductor.org/packages/{pkgcache::bioc_version()}/bioc/VIEWS"))
  data_raw <- data.frame(read.dcf(uri))
  data_raw[data_raw$Package == package, "Date.Publication"]
}

sample_bioc_date("SummarizedExperiment")

averissimo avatar Aug 16 '23 16:08 averissimo

Yeah, that would be great, and the VIEWS files indeed seem useful. OTOH they do not contain some of the stuff that we collect for CRAN packages, e.g. file size, build timestamp, etc. In any case, hopefully we'll have improvements for this soon.

gaborcsardi avatar Aug 16 '23 16:08 gaborcsardi