Skip to content
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

Add support for R packages (CRAN) #252

Closed
stefanbuck opened this issue Sep 26, 2020 · 4 comments
Closed

Add support for R packages (CRAN) #252

stefanbuck opened this issue Sep 26, 2020 · 4 comments

Comments

@stefanbuck
Copy link
Member

In OctoLinker/OctoLinker#1037 @edavidaja offered help to get OctoLinker work with R.

R packages are hosted by Comprehensive R Archive Network (CRAN). A web version of each package manifest is available at the link: https://cran.r-project.org/package={package} (e.g. https://cran.r-project.org/package=flextable)

Packages with web pages list them in the URL field of the DESCRIPTION file; however, not all packages have a webpage. There is a GitHub Mirror of CRAN packages at https://github.com/cran, which has the source code, including the manifest, for any package on CRAN.

First we need to figure out wether or not CRAN has an endpoint that returns a JSON document so we can leverage our universal config which makes adding new registry support super easy.

So, does CRAN have such an endpoint @edavidaja ?

@edavidaja
Copy link

Nope, CRAN does not return a JSON response, just raw HTML.

@stefanbuck
Copy link
Member Author

https://www.r-pkg.org is using CouchDB and I wonder if this is a service we can / should rely on.

@edavidaja
Copy link

That would work: the GitHub cran mirror I mentioned before is generated by the same source, and the maintainers are well known r community members.

@stefanbuck
Copy link
Member Author

Ahh I see, that should simplify things a lot. I'm on my phone right now so hard to do proper research on this, but looks like URLs set in the URL field are separated by comma https://crandb.r-pkg.org/usethis. The current implementation does not support such a custom format.

I think it makes sense to split the work between you and me. I can look into the API side of things later this week. Once I'm back home tonight, I'll point you to the steps required to make the browser extension side happen.

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

No branches or pull requests

2 participants