Thanks for your interest in contributing to eulerr! This document outlines how to file issues, propose changes, and set up a local development environment.
By participating in this project you agree to abide by its Code of Conduct.
Filing issues
Before opening an issue, please search the existing issues to see whether your problem or suggestion has already been raised.
When reporting a bug, please include:
- A minimal reprex that reproduces the problem.
- The output of
sessionInfo()(orutils::sessionInfo()). - The version of eulerr you are using (
packageVersion("eulerr")).
For feature requests, describe the use case and, where possible, sketch the API you would like to see.
Pull requests
- Fork the repository and create a topic branch from
main. - Make your changes, keeping commits focused and self-contained.
- Add or update tests in
tests/testthat/for any user-visible change. - Update documentation as needed (see Documentation below).
- Run the checks listed in Checks before submitting.
- Open a pull request against
mainand describe the motivation for the change.
Small fixes (typos, doc tweaks) are welcome without prior discussion. For larger changes, please open an issue first so we can agree on the approach before you invest significant time.
Development setup
eulerr has an R orchestration layer and a Rust computational core (via extendr-api), so you will need both toolchains:
- R (>= 4.2) with the development tools listed in
DESCRIPTIONSuggests(notablydevtools,testthat,roxygen2, andrextendr). - A Rust toolchain matching the MSRV declared in
DESCRIPTIONSystemRequirements(currentlyrustc >= 1.81.0).
Common workflows from R:
- Install the package locally:
devtools::install() - Run the test suite:
devtools::test() - Run
R CMD check:devtools::check() - Regenerate roxygen docs and
NAMESPACE:devtools::document()
For development builds with a debug profile and permissive Cargo flags, set DEBUG=1 (or NOT_CRAN=1) in the environment before installing.
If you prefer a task runner, the repository also ships a Taskfile.yml with shortcuts for these commands (e.g. task install, task test, task check, task document). Using Task is entirely optional.
Working on the Rust side
The Rust crate under src/rust/ is a thin extendr shim (src/rust/src/lib.rs) that converts R inputs into a eunoia DiagramSpec, runs the fitter, and returns geometry back to R. The actual numerical engine — layout optimization, geometry, and goodness-of-fit computation — lives in the separate eunoia Rust crate, not in this repository.
This means:
- Changes to the core fitting algorithms, geometry, or optimization should be made in the
eunoiarepository, not here. Once released, bump theeunoiadependency insrc/rust/Cargo.tomland re-vendor (see below). - Changes that belong in this repository are typically limited to the R/Rust interface (the
#[extendr]functions), input parsing, plotting, and the R-side API.
Workflow:
- Edit the
#[extendr]functions insrc/rust/src/lib.rsand regenerate the R-side wrappers withrextendr::document()(ortask extendr-document). Do not hand-editR/extendr-wrappers.Ror theextendr_module!block. - After bumping any dependency in
src/rust/Cargo.toml(includingeunoia), re-vendor the Rust dependencies (seetask vendor-pkgsinTaskfile.ymlfor the exact steps).
Documentation
- R documentation is managed with roxygen2. Edit the roxygen comments in
R/*.Rand rundevtools::document()to regenerateman/*.RdandNAMESPACE. -
README.mdis generated fromREADME.Rmd; edit the.Rmdand re-knit. - Long-form documentation lives in
vignettes/.
Style
- R code follows
air.toml: 80-character line width, 2-space indent. Format withair format(or the air LSP integration in your editor). - Combination names use
&as the delimiter (e.g.,"A&B&C") consistently across the R and Rust layers. - Plotting is implemented with grid grobs (
eulergram); preserve thesetup_geometry()→setup_grobs()separation when changing plotting behavior.
Checks before submitting
Before opening a pull request, please make sure:
-
devtools::test()passes. -
devtools::check()passes with no new errors, warnings, or notes. -
devtools::document()has been run if you changed roxygen comments or extendr functions, and any regenerated files are committed. - New user-facing changes have a corresponding entry in
NEWS.md.
License
By contributing, you agree that your contributions will be licensed under the MIT license that covers the project.