Contributing to myrpackage
Source:CONTRIBUTING.md
Thank you for considering contributing to myrpackage! This document provides guidelines for contributing to the project.
Code of Conduct
Please note that the myrpackage project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
How to Contribute
Reporting Bugs
If you find a bug, please create an issue on GitHub with the following information:
- A clear title and description
- Steps to reproduce the behavior
- Expected behavior
- Actual behavior
- Environment details (R version, package version, OS)
- If possible, a minimal reproducible example
Development Workflow
Setting Up Development Environment
- Clone the repository
- Open the project in RStudio (or your preferred R IDE)
- Install development dependencies:
# Install development dependencies
devtools::install_dev_deps()
# Install the package in development mode
devtools::load_all()
Running Tests
# Run all tests
devtools::test()
# Run specific tests
testthat::test_file("tests/testthat/test-hello.R")
# Check test coverage
covr::package_coverage()
Documentation
# Generate documentation
devtools::document()
# Preview documentation
devtools::dev_help("hello")
# Build vignettes
devtools::build_vignettes()
# Build README
devtools::build_readme()
Code Style
We follow the tidyverse style guide. Please ensure your code adheres to this style.
You can use the following tools to check and fix style issues:
# Check code style
lintr::lint_package()
# Auto-format code
styler::style_pkg()
Commit Messages
Please use clear and descriptive commit messages. We recommend following the conventional commits specification:
-
feat
: A new feature -
fix
: A bug fix -
docs
: Documentation changes -
style
: Changes that do not affect code behavior (formatting, etc.) -
refactor
: Code changes that neither fix a bug nor add a feature -
test
: Adding or fixing tests -
chore
: Changes to the build process or auxiliary tools
Release Process
- Update version number in DESCRIPTION
- Update NEWS.md with changes
- Run full checks:
- Build the package:
devtools::build()
- Tag the release in Git:
usethis::use_git_tag("v0.1.0")
Getting Help
If you need help or have questions, you can:
- Open an issue on GitHub
- Reach out to the package maintainer: Diogo Ribeiro (dfr@esmad.ipp.pt)
Thank you for contributing!