Contributing to kagu
Source:CONTRIBUTING.md
Thanks for your interest in contributing. This document explains how to report problems and propose changes.
Reporting bugs and requesting features
Please open an issue at https://github.com/causalabs/kagu-r/issues.
For a bug report, the most useful thing you can include is a small, reproducible example (a reprex) together with the output of sessionInfo(). A minimal DAG, a snippet of simulated data, and the exact call that misbehaves are usually enough.
For a feature request, describe the causal question or workflow you are trying to support, not only the API you have in mind, so we can weigh alternatives.
Branching and pull requests
We follow a GitHub-flow model. main is the live branch: it is protected, and changes only reach it through a reviewed pull request that passes all checks.
- Create a branch off
mainwith a short, descriptive name for the work (e.g.fix-sweep-hdi,discovery-edge-priors). - Make your change, keeping commits focused and their messages descriptive.
-
Bump the package version in
DESCRIPTION(every pull request must raise it above the currentmain). - Open a pull request against
main. Small, self-contained PRs are much easier to review and merge than large ones; if you are planning something big, open an issue first so we can agree on the approach.
Continuous integration runs R CMD check (including the test suite) on Linux, macOS and Windows, and verifies the version bump, for every pull request. All checks must pass before a PR can be merged.
Development setup
The package is developed with devtools:
# install.packages("devtools")
devtools::load_all() # load the package from source
devtools::test() # run the testthat suite
devtools::document() # regenerate NAMESPACE and man/ from roxygen
devtools::check() # a local R CMD checkPlease:
-
Add tests for any behaviour you add or fix, under
tests/testthat/. Fitting-dependent tests shouldskip_on_cran(). -
Document exported functions with roxygen2 and run
devtools::document()soman/andNAMESPACEstay in sync with the source. -
Match the surrounding style. Follow the conventions already in the file you are editing (naming, comment density, the R6 mechanism interface, and the
[n_chains, n_draws]posterior draw convention).AGENTS.mddocuments the package’s architecture and design decisions.