Chapter 12 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 onboarding your package.

12.1 Make your repository more discoverable

12.1.1 GitHub repo topics

GitHub repo topics help browsing and searching GitHub repos, 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.

12.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.

More info about GitHub linguist overrides here.

12.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.