Contributing to UtilsGGSV
Source:CONTRIBUTING.md
Thank you for considering a contribution to UtilsGGSV! The following guidelines will help you get started quickly and ensure your contribution fits smoothly into the project.
Code of conduct
Please be respectful and constructive in all interactions. This project follows the Contributor Covenant Code of Conduct.
How to contribute
Reporting bugs
Open an issue on GitHub Issues and include:
- A minimal reproducible example (use
reprex::reprex()if possible). - The output of
sessionInfo(). - A clear description of the expected vs. actual behaviour.
Suggesting enhancements
Open an issue labelled enhancement and describe:
- The problem you want to solve.
- A sketch of the proposed API (function name, parameters, return value).
- Why the enhancement belongs in this package rather than user code.
Submitting a pull request
-
Fork the repository and create a feature branch from
main: -
Install development dependencies:
renv::restore() Make your changes, following the style guide below.
Add or update tests in
tests/testthat/test-{function}.R.-
Run the full check locally and confirm it passes with no ERRORs, WARNINGs, or unexpected NOTEs:
devtools::document() devtools::test() devtools::check() Push your branch and open a pull request against
main.
Style guide
- Follow the conventions described in
.github/instructions/(R coding standards, testing guidelines, package development workflow). - Use
snake_casefor function and variable names. - Prefix internal (non-exported) helpers with
.(e.g..my_helper()). - Document all exported functions with roxygen2. Every
@param,@return, and@examplessection is required. - Do not leave trailing whitespace at the end of lines or on blank lines.
- Use
package::function()notation rather than attaching packages withlibrary()inside package code.
Adding a new exported function
- Create
R/{function_name}.Rwith a complete roxygen2 header. - Run
devtools::document()to regenerateNAMESPACEandman/. - Create
tests/testthat/test-{function_name}.Rwith tests. - Update
_pkgdown.ymlto include the new function in the reference index. - Mention the addition in
NEWS.mdunder# UtilsGGSV (development version).
Versioning
This package follows Semantic Versioning. In brief:
| Change type | Version component bumped |
|---|---|
| Bug fixes and documentation only | patch (x.y.Z) |
| New backwards-compatible functionality | minor (x.Y.0) |
| Breaking changes | major (X.0.0) |
Questions
If you are unsure about anything, open an issue or start a discussion on GitHub.