Contributing to r4sub
Source:CONTRIBUTING.md
Thanks for taking the time to contribute. r4sub is the meta-package for the R4SUB (“Ready for Submission”) ecosystem, so most domain logic lives in the satellite packages (r4subcore, r4subtrace, r4subscore, r4subrisk, r4subdata, r4subprofile). Please open changes against the package that owns the code.
Reporting a bug
Open an issue with the “Bug report” template and include:
- A minimal reproducible example (a
reprex::reprex()is ideal). - What you expected to happen and what happened instead.
- The output of
sessionInfo()orr4sub_packages().
Search the existing issues first so we can avoid duplicates.
Suggesting a feature
Open an issue with the “Feature request” template. Describe the problem you are trying to solve before the solution you have in mind, and note which package in the ecosystem the feature belongs to.
Submitting a pull request
- Fork the repository and create a branch off
mainwith a short, descriptive name. - Make your change and add tests that cover it.
- Run the checks below and make sure they pass.
- Update
NEWS.mdwith a short bullet describing the change. - Open the pull request against
mainusing the PR template, and link the issue it resolves.
Keep each pull request focused on one thing. Smaller pull requests are easier to review and merge.
Coding standards
- Follow the tidyverse style guide (https://style.tidyverse.org). The
stylerandlintrpackages help. - Document exported functions with roxygen2. Never hand-edit
NAMESPACEor the files underman/; regenerate them withroxygen2::roxygenise(). - Write tests with testthat (edition 3), one test file per source file.
- User-facing messages use the
clipackage.
Running checks locally
# Regenerate docs after changing roxygen comments
roxygen2::roxygenise()
# Run the tests
devtools::test()
# Full package check
devtools::check()Please make sure devtools::check() passes with no errors or warnings before you open a pull request.
Code of conduct
By participating in this project you agree to abide by the Code of Conduct.