Thank you for your interest in contributing to the DIVAS package! This document provides guidelines for contributing to the project, whether through code contributions, documentation improvements, or bug reports.
Ways to Contribute
There are several ways you can contribute to the DIVAS project:
Report bugs: If you find a bug, please report it by creating an issue on our GitHub repository.
Suggest features: Have an idea for a new feature? Share it by creating an issue labeled as “feature request.”
Improve documentation: Help us improve documentation by fixing typos, clarifying explanations, or adding examples.
Contribute code: Add new features, fix bugs, or optimize existing code.
Share examples: Create example scripts that showcase DIVAS in real-world applications.
Code Contribution Guidelines
If you’d like to contribute code to DIVAS, please follow these steps:
Fork the repository to your GitHub account.
-
Create a branch for your changes:
Make your changes following our coding style guidelines (see below).
Add tests for new features or bug fixes.
-
Run tests to ensure your changes don’t break existing functionality:
devtools::test()
Document your code using roxygen2 comments and update vignettes if necessary.
Submit a pull request with a clear description of the changes.
Coding Style Guidelines
We follow the tidyverse style guide for R code. Key points include:
- Use 2 spaces for indentation
- Limit lines to 80 characters
- Use snake_case for variable and function names
- Document all exported functions with roxygen2
- Include examples in function documentation
Documentation
Good documentation is crucial for the usability of the package. When contributing:
- Document all exported functions with roxygen2
- Include examples in function documentation
- Update vignettes to reflect changes in functionality
- Keep the README up to date
Testing
We use the testthat package for testing. Please ensure:
- All new features have corresponding tests
- All bug fixes include tests that would have caught the bug
- All tests pass before submitting your contribution
To run tests locally:
devtools::test()
Submitting a Pull Request
When you’re ready to submit your changes:
-
Push your branch to your fork:
Go to the DIVAS repository and create a pull request.
Include a clear title and description of your changes.
Reference any related issues using the GitHub issue number (e.g., “Fixes #42”).
Code of Conduct
Please note that the DIVAS project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Questions?
If you have any questions about contributing, please open an issue and we’ll be happy to help!