Having contributors will improve your package, and if you onboard some of them as package authors with write permissions to the repo, your package will be more sustainably developed. It can also be very enjoyable to work as a team!
Besides these mostly technical tips, it is important to remember to be kind, and to take others’ perspective into account especially when their priorities differ from yours.
11.1 Make your repo contribution and collaboration friendly
11.1.1 Code of conduct
After transfer to our GitHub organization, rOpenSci Code of Conduct will apply to your project. Please add this text to the README
Please note that this package is released with a [ContributorCode of Conduct](https://ropensci.org/code-of-conduct/). Bycontributing to this project, you agree to abide by its terms.
And delete the package current code of conduct if there was one.
11.1.2 Contributing guide
You can use issue, pull request and contributing guidelines. Having a contributing file as .github/CONTRIBUTING.md or docs/CONTRIBUTING.md is compulsory. An easy way to insert a template for a contributing guide is the use_tidy_contributing() function from the usethis package, which inserts this template as .github/CONTRIBUTING.md. A more extensive example is this template by Peter Desmet, or the comprehensive GitHub wiki pages for the mlr3 package. These and other templates will generally need to be modified for use with an rOpenSci package, particularly by referring and linking to our Code of Conduct, as described elsewhere in this book. Modifying a generic contributing guide to add a personal touch also tends to make it look less generic and more sincere. Personal preferences in a contributing guide include:
Sandbox account creation? Mocking in tests? Linking to external docs?
rOpenSci further encourages contributing guides to include a lifecycle statement clarifying visions and expectations for the future development of your package, like in this example. Statistical packages are required to have a lifecycle statement, as specified in General Statistical Stanards G1.2. That links provides a template for a simple lifecycle statement. CONTRIBUTING.md files can also describe how you acknowledge contributions (see this section).
We encourage you to direct feedback that is not a bug report or a feature request to rOpenSci forum, after making sure you’d see such questions on the forum. Users can use the forum to ask questions about use and report their use cases, and you can subscribe to individual categories and tags to receive notifications about your package. Feel free to mention this in the docs of your package and/or the contributing guidelines/issue template. Please direct your users to tag posts with the package name.
By using GitHub features around issues you can help potential contributors find them, and make your roadmap public.
11.1.3.1 Issue templates
You could use one or several issue template(s) to help users fill better bug reports or feature requests. When there are several issue templates, users who click on opening a new issue see a menu that guide their choices.
You can even configure one of the choices to point to somewhere outside of your repository (for instance a discussion forum).
You can pin up to 3 issues by repository that will then appear at the top of your issue tracker as nice issue cards. It can help advertise what your priorities are.
11.1.3.4 Milestones
You can create milestones and assign issues to them, which help see what you plan for the next version of your package for instance.
11.1.4 Communication with users
You can point users to rOpenSci forum if you monitor it, or enable GitHub Discussions for your package repository. Each GitHub discussion can be converted to an issue if needed (and the other way round, issues can be converted to discussions).
11.2 Working with collaborators
First thing first: keep in touch with your GitHub repository!
do not forget to watch your GitHub repository to be notified of issues or pull requests (alternatively, if you work in bursts, maybe add the information to the contributing guide).
do not forget to push updates you have locally.
disable failing tests if you cannot fix them as they create noise in PRs that can puzzle new contributors.
11.2.1 Onboarding collaborators
There’s no general rOpenSci rule as to how you should onboard collaborators. You should increase their rights to the repo as you gain trust, and you should definitely acknowledge contributions (see this section).
You can ask a new collaborator to make PRs (see following section for assessing a PR locally, i.e. beyond CI checks) to dev/main and assess them before merging, and after a while let them push to main, although you might want to keep a system of PR reviews… even for yourself once you have team mates!
A possible model for onboarding collaborators is provided by Jim Hester in his lintr repo.
If your problem is recruiting collaborators, you can post an open call like Jim Hester’s on Twitter, GitHub, and as an rOpenSci package author, you can ask for help in rOpenSci slack and ask rOpenSci team for ideas for recruiting new collaborators.
11.2.2 Working with collaborators (including yourself)
Branches are cheap. Use them extensively when developing features, testing out new ideas, fixing problems.
One of the branches is the default / main branch, where, if you follow trunk-based development, you “merge small, frequent updates”. See also GitHub flow and GitLab flow docs. You might want to frequently increment version numbers (in DESCRIPTION). One particular aspect of working with collaborators is reviewing pull requests, with some useful guidance in:
If someone contributes to your repository consider adding them in DESCRIPTION, as contributor (“ctb”) for small contributions, author (“aut”) for bigger contributions. Traditionally when citing a package in a scientific publication only “aut” authors are listed, not “ctb” contributors; and on pkgdown websites only “aut” names are listed on the homepage, all authors being listed on the authors/ page.
At a minimum consider adding the name of contributors near the feature/bug fix line in NEWS.md.
We recommend your being generous with such acknowledgements, because it is a nice thing to do and because it will make folks more likely to contribute again to your package or other repos of the organization.
As a reminder from our packaging guidelines if your package was reviewed and you feel that your reviewers have made a substantial contribution to the development of your package, you may list them in the Authors@R field with a Reviewer contributor type ("rev"), like so:
person("Bea", "Hernández", role = "rev",
comment = "Bea reviewed the package (v. X.X.XX) for rOpenSci, see <https://github.com/ropensci/software-review/issues/116>"),
Please do not list editors as contributors. Your participation in and contribution to rOpenSci is thanks enough!
11.2.4 Welcoming collaborators to rOpenSci
If you give someone write permissions to the repository,
please contact a staff member so that this new contributor might get invited to rOpenSci’s “ropensci” GitHub organization (instead of being an outside collaborator)