ropensci / universe

Tools for Working with R-universe
https://docs.ropensci.org/universe
Apache License 2.0
6 stars 1 forks source link

Functions to manage the registry #1

Open llrs opened 10 months ago

llrs commented 10 months ago

I'm trying to automate the universe setup of an organization ropenspain. I thought this package would help me to generate the manifest but I haven't found how to automatically setup the registry. Ideally I would setup a GHA to check once a day if there are new repos in the organization and add them to the registry and force them to use the pkgdown template for the organization.

Would be this something of interest for this package or it is out of scope? I imagine something like registry_add() and registry_remove() to handle this. Ideally they would check that the content added is a R package expanding from this code block from the tech note:

df <- data.frame(
    package = c("curl", "pdftools", "stringdist"),
    url = c("https://github.com/jeroen/curl", "https://github.com/ropensci/pdftools", 
        "https://github.com/markvanderloo/stringdist"),
    subdir = c(NA, NA, "pkg")
)
jsonlite::write_json(df, 'packages.json', pretty = TRUE)
maelle commented 1 month ago

I'm wondering whether most universes are small enough to be curated by hand, and too varied in their needs, in which case a general solution would serve no one. :thinking:

At rOpenSci we do create the manifest automatically:

Maybe checking a JSON file is ok might help? (but it's a very simple JSON file so off-the-shelf JSON validators would catch mistakes?) @jeroen opinions?