Contributing to Rclade
Source:CONTRIBUTING.EN.md
Note: GitHub repository at https://github.com/zengzichao/Rclade. Issues and pull requests welcome.
Thank you for your interest in contributing to Rclade!
Reporting Issues
Please submit issues at https://github.com/zengzichao/Rclade/issues.
When reporting a bug, please include: - A minimal reproducible example - Your R session info (sessionInfo()) - The expected vs. actual behavior
Development Setup
# Clone the repository
git clone https://github.com/zengzichao/Rclade.git
# Install development dependencies
install.packages(c("devtools", "testthat", "roxygen2", "knitr", "rmarkdown"))
# Bioconductor dependencies
tryCatch({
library(BiocManager)
}, error = function(e) {
install.packages("BiocManager")
})
BiocManager::install(c("ggtree", "treeio", "tidytree"))
# Load the package in development mode
devtools::load_all(".")
# Run tests
devtools::test()
# Check the package
devtools::check()
# Build documentation
devtools::document()Code Style
- Follow Google’s R Style Guide
- Use
snake_casefor function names and variables - Document all exported functions with roxygen2
- Add
@keywords internalto non-exported functions - Run
devtools::document()after modifying roxygen comments to keepman/in sync
Pull Requests
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes
- Add tests for new functionality
- Run
devtools::check()to ensure no regressions - Submit a pull request
Testing
# Run all tests
devtools::test()
# Run specific test file
testthat::test_file("tests/testthat/test-taxonomy.R")
# Check test coverage
covr::package_coverage()