We welcome contributions to SpaDES.tools, both as bug reports or package enhancements.
Use the issue tracker to report a bug.
Please include a minimum reproducible example that triggers the bug.
Please include the output of devtools::session_info().
The development branch contains the latest contributions and other code that will appear in the next release. The main branch contains the latest release, which is exactly what is currently on CRAN.
To make a contribution, create a branch from development and send a pull request with development as the destination branch. Never target main; it only receives releases. Your PR should pass R CMD check --as-cran, which is also run when the PR is submitted.
R/{name}.R go in tests/testthat/test-{name}.R (testthat 3rd edition). Every change in behaviour needs a test. Start tests with testInit(), and use needTerraAndRaster() to cover both raster classes, as the existing tests do. Run devtools::test(filter = "^{name}") while you work, and devtools::check() before you open the PR.devtools::document(). Never edit man/*.Rd, NAMESPACE, or the Collate field in DESCRIPTION by hand: devtools::document() regenerates them, along with the Rcpp exports after a change to src/. Add any new exported topic to _pkgdown.yml, and confirm with pkgdown::check_pkgdown().air.toml sets the style for new files, but most existing files are not yet formatted with it, so air format . would rewrite them. Use the base pipe (|>), and Canadian English (behaviour, neighbour) in documentation and messages.Version in DESCRIPTION by one (e.g., 2.1.3.9015 to 2.1.3.9016) when your PR changes package code.NEWS.md for each change a user would notice (see below).NEWS.md follows the usethis and tidyverse conventions.
# SpaDES.tools (development version). Never add a heading with a version number, such as # SpaDES.tools 2.1.3.9016, even when you increase the version. At release, usethis::use_version() renames the development heading to the released version.## headings such as Behaviour changes, New features, Performance, Bug fixes, and Documentation and testing.(#123).
We’ll try to review your pull request and provide feedback / merge improvements as quickly as possible.
Thank you!