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 use_r_universe_badge() #1994

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add use_r_universe_badge() #1994

wants to merge 4 commits into from

Conversation

olivroy
Copy link
Contributor

@olivroy olivroy commented May 18, 2024

FIx #1883

It has limitations, in the sense that it doesn't verify that the repo actually exists. It would also be great to add the r-universe installation options too.

I could add this to the badge with ui_code()

install.packages('{pkg}', repos = c('https://{org}.r-universe.dev', 'https://cloud.r-project.org'))

It worked out of the box with usethis
image

implementation considerations

  • marked it as experimental
  • requires a (github?) url in DESCRIPTION, or can probably manage with only git remote.
  • Assumes r-universe is set up (which is true for CRAN packages that have a repo link in DESCRIPTION), although it would probably be great to check if R-universe is set-up and nudge towards r-universe help, but that seems out of scope for this PR.
  • If the repo name is different than packages name, it doesn't affect the r-universe url. So rstudio/pins-r still has the
  • Doesn't currently care for a r-universe.dev link in description, (probably should though, but I didn't want the function to get too complicated)
  • Added an example for how to manually setup a r-universe badge in use_badge()

If you want, you can let me know what you think @jeroen. And you'd probably best to implement this function.

ideas

A browse_r_universe() similar to browse_github() would probably be useful and easy to implement + the badge could build on top of this.

man page preview

image

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.

Badge for r-universe?
1 participant