Skip to content

Bioconductor downloads - #361

Open
AKlebus wants to merge 6 commits into
pharmaR:masterfrom
AKlebus:bioc-downloads
Open

Bioconductor downloads#361
AKlebus wants to merge 6 commits into
pharmaR:masterfrom
AKlebus:bioc-downloads

Conversation

@AKlebus

@AKlebus AKlebus commented Dec 2, 2024

Copy link
Copy Markdown

Issue: #360

Bioconductor downloads

This PR adds functionality for caching downloads for packages on Bioconductor. Previously, this downloads functionality only attempted to get package downloads from CRAN, meaning popular Bioconductor packages were judged as if they had 0 downloads. With this change, assessments of Bioconductor package downloads should be more informative.

Background

Hi! My team and I at Novartis wanted to contribute this functionality to riskmetric as it is something we have implemented for an internal tool. I personally am quite new to software engineering, and this is my first PR for an open source project, so I would really appreciate any thoughts or feedback on how we can better integrate this functionality. Looking forward to the discussion!

@emilliman5
emilliman5 self-requested a review March 21, 2025 16:07
#' @importFrom cranlogs cran_downloads
#' @keywords internal
pkg_ref_cache.downloads.pkg_ref <- function(x, ..., n = 365) {
downloads <- cran_downloads(x$name, from = Sys.Date() - n, to = Sys.Date())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is any need to dispatch a download method for pkg_ref, in fact we should return NA "by default" to account for sources that do not have download stats (e.g. source packages)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants