Thank you for your interest in contributing to bgms. This document covers the practical steps for building, testing, and submitting changes.
Contributions come in many forms, and all of them are valued:
- Report a bug — open an issue and the bug report template will load automatically.
- Suggest a feature — open an issue and the feature request template will load automatically.
- Improve documentation — fix a typo, clarify a vignette, or add an example.
- Write tests — help us cover edge cases and new functionality.
- Review a pull request — a second pair of eyes is always welcome.
- Contribute code — fix a bug, implement a feature, or improve performance.
For small changes (typos, documentation fixes), open a pull request directly. For larger work (new features, algorithm changes), open an issue first so we can discuss the approach before you invest time.
If you get stuck or have questions about contributing, open an issue or contact the maintainer at m.marsman@uva.nl.
git clone https://github.com/Bayesian-Graphical-Modelling-Lab/bgms.git
cd bgmsBuild and check the package:
devtools::document()
devtools::check()bgms uses = for assignment (not <-) and omits the space between
if/for/while and (. You do not need to memorize these rules;
the pre-commit checks enforce them automatically.
Before committing, run the following in order:
# 1. Enforce code style
source("inst/styler/bgms_style.R")
styler::style_pkg(style = bgms_style)
# 2. Check for lint issues
lintr::lint_package()
# 3. Regenerate documentation (if you changed any roxygen comments)
roxygen2::roxygenise()The pull request template includes a full checklist of these steps.
- Exported R functions get full roxygen2 blocks (
@title,@description,@param,@return,@examples,@seealso,@export). - Internal R functions use plain
#comment blocks, not#'roxygen. - C++ headers use Doxygen
/** */blocks on classes and methods. - C++ implementations use inline
//comments only.
When modifying a function signature, update its documentation in the same commit.
Run the test suite with:
devtools::test()Test files live in tests/testthat/. Each test_that() description
should be an imperative sentence.
Pull requests are checked automatically by GitHub Actions:
R-CMD-check.yaml— builds and checks on multiple platformstest-coverage.yaml— reports test coveragepkgdown.yaml— builds the documentation site
Use the format: type: short description. Common types: feat,
fix, docs, refactor, test.
All contributors are acknowledged in inst/CONTRIBUTORS.md.
This project is released with a Contributor Code of Conduct. By contributing to bgms, you agree to abide by its terms.