Thanks for helping out! This document covers the development workflow for the package itself. If you are here to use entropiaR, see the README.
- R >= 4.1; the package is tested with R 4.5.2.
- Windows: R is typically not on
PATH. Either addC:\Program Files\R\R-4.5.2\binto yourPATH, or invoke R by full path, e.g."C:\Program Files\R\R-4.5.2\bin\Rscript.exe" -e "...".
Install the development dependencies:
install.packages(c("devtools", "roxygen2", "testthat", "usethis", "lintr",
"styler", "covr", "pkgdown", "rmarkdown", "knitr", "spelling"))The full test suite also needs the optional Suggests:
install.packages(c("ggplot2", "arrow", "bit64", "vdiffr", "tidyr",
"lubridate", "forcats"))# Load the package in the current session
Rscript -e "devtools::load_all()"
# Run the testthat suite
Rscript -e "devtools::test()"
# Full package check (must finish with 0 errors / 0 warnings)
Rscript -e "devtools::check()"
# Lint
Rscript -e "lintr::lint_package()"
# Style check (verification only, no auto-commit)
Rscript -e "styler::style_pkg(dry = 'fail')"
# Spelling (English docs only; README.md is Spanish and intentionally skipped)
Rscript -e "spelling::spell_check_package(vignettes = TRUE)"
# Coverage
Rscript -e "covr::package_coverage(type = 'tests')"
# Build the documentation site
Rscript -e "pkgdown::build_site()"- Generated by
data-raw/make_fixtures.Rintotests/testthat/fixtures/. - Gitignored — regenerated in CI before tests run.
- Each test receives a temp copy (via
ent_fixture()), so tests never mutate the originals. - Never use
data-test/entropia.sqliteas a test fixture (reference only).
- Commits: Conventional Commits, e.g.
feat:,fix:,test:,docs:. No AI attribution lines. - Errors: all conditions go through
ent_abort()with a stableentropia_error_<kind>class — no barestop()/warning()inR/. - Docs: public API is documented with roxygen2; regenerate with
devtools::document().