-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cran_package_history("-")
fails
#126
Comments
|
Does that mean you aren't interested in supporting I was hoping to get the version history for every CRAN package---and the |
That endpoint is pretty heavy on the DB, so I definitely don't want to support it in pkgsearch. In fact I might need to remove it completely, or heavily cache it in cloidflare. In fact, I'll remove the link from your comments, because people and/or crawlers clicking on it will kill the server. |
Ah, fair enough. Is there a responsible way to get the history for every package? I'm assuming calling |
No, that's not heavy at all, but it also takes a very long time to make thousands of HTTP queries. I don't know of any good way currently. |
Thanks, that's good to know. Maybe a regularly updated duckdb database would be a good way to share the history for every package? Just for context, the reason I wanted this data was for a {shinylive} dashboard that would provide download analytics for every CRAN package, and my original plan was to make said database with GitHub Actions (so I didn't want something that would take forever to run). I'm probably going to pivot from my original plan now though, so feel free to close this. |
I like the idea of having a daily Parquet file available with all the data. |
Problem
https://crandb.r-pkg.org/-/<redacted>
is a valid API call that gets history for all packages, butcran_package_history("-")
results in an error. I did some debugging and the error happens here:pkgsearch/R/crandb-public-api.R
Line 313 in d613795
The problem is that
resp$versions
ends up querying the list for the {versions} package, instead of theversions
index in each package.Would you be open to expanding the function to support the
cran_package_history("-")
call? Happy to start a PR for it!reprex
Created on 2024-08-26 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: