This document contains guidelines for the collaboration in the eRTG3D R package.
Ready to contribute? Here’s how to set up eRTG3D for local development.
DESCRIPTION file).git checkout -b feature/<feature-description> master or git checkout -b bugfix/<bugfix-description> master
NEWS.md
devtools::document() before commit)feature/... or bugfix/... branch into the master branch of the original repository.The trunk-based development workflow uses one branch master to record the history of the project. In addition to the mainline short-lived feature or bugfix branches are used to develop new features or fix bugs.
Each new feature should reside in its own short-lived branch. Branch off of a feature/<feature-description> branch from master. When a feature is complete, it gets merged back into master and the feature branch is deleted.
Each bugfix should reside in its own short-lived branch. Branch off of a bugfix/<bugfix-description> branch from master. When the fix is complete, it gets merged back into master and the bugfix branch is deleted.
This packages uses semantic versions. Once master has aquired enough features for a release, set the new version number in the DESCRIPTION and NEWS.md files and submit the package to CRAN. When CRAN has accepted the package submission, the master branch is tagged with the version number, which triggers the build of the documentation site using pkgdown.
This packages uses roxygen2 for the package documentation.
Example:
#' Add together two numbers
#'
#' @param x A number
#' @param y A number
#' @return The sum of \code{x} and \code{y}
#' @examples
#' add(1, 1)
#' add(10, 1)
add <- function(x, y) {
x + y
}Add a header to CLI scripts according to the following template:
#!/usr/bin/env Rscript
# -----------------------------------------------------------------------------
# Name :example_script.R
# Description :Short description of the scripts purpose.
# Author :Name <your@email.ch>
# Date :YYYY-MM-DD
# Version :0.1.0
# Usage :./example_script.R
# Notes :Is there something important to consider when executing the
# script?
# =============================================================================Add your GitHub username to the bugfix or feature entry in the NEWS.md to ensure credits are given correctly:
# version x.x.x.9000
* Added <feature description> (@<github_username>, [#1](https://github.com/munterfi/eRTG3D/pull/1)).
* Bugfix: <description> (@<github_username>, closes [#2](https://github.com/munterfi/eRTG3D/issues/2)).
Please note that this project is released with a Contributor Code of Conduct. By contributing to this project you agree to abide by its terms.