15  GitHub Grooming

rOpenSci packages are currently in their vast majority developed on GitHub. Here are a few tips to leverage the platform in a section about making your repo more discoverable and a section about marketing your own GitHub account after going through peer review.

15.1 Make your repository more discoverable

15.1.1 GitHub repo topics

GitHub repo topics help browsing and searching GitHub repos, are used by R-universe on package pages and for search results, and are digested by codemetar for rOpenSci registry keywords.

We recommend:

  • Adding “r”, “r-package” and “rstats” as topics to your package repo.

  • Adding any other relevant topics to your package repo.

We might make suggestions to you after your package is onboarded.

15.1.2 GitHub linguist

GitHub linguist will assign a language for your repo based on the files it contains. Some packages containing a lot of C++ code might get classified as C++ rather than R packages, which is fine and shows the need for the “r”, “r-package” and “rstats” topics.

We recommend overriding GitHub linguist by adding or modifying a .gitattributes to your repo in two cases:

  • If you store html files in non standard places (not in docs/, e.g. in vignettes/) use the documentation overrides. Add *.html linguist-documentation=true to .gitattributes (Example in the wild)

  • If your repo contains code you haven’t authored, e.g. JavaScript code, add inst/js/* linguist-vendored to .gitattributes (Example in the wild)

This way the language classification and statistics of your repository will more closely reflect the source code it contains, as well as making it more discoverable. Notably, if linguist does not correctly recognize your repo as containing mainly R code, your package won’t appear in search results with the language:R filter. Similarly, your repo cannot be listed among the trending R repos.

More info about GitHub linguist overrides here.

15.2 Market your own account

  • As the author of an onboarded package, you are now a member of rOpenSci’s “ropensci” GitHub organization. By default, organization memberships are private; see how to make it public in GitHub docs.

  • Even after your package repo has been transferred to rOpenSci, you can pin it under your own account.

  • In general we recommend adding at least an avatar (which doesn’t need to be your face!) and your name to your GitHub profile.