Contributing to estatr
Source:.github/CONTRIBUTING.md
Thanks for taking the time to contribute!
Ground rules
-
Never commit an appId. Tests run entirely offline against mocked responses; you do not need a real e-Stat key to work on the package or to get CI passing. If you record fixtures against the live API, the redactor in
tests/testthat/setup.Rscrubs theappId— verify it did before committing. - Keep package internals dependency-lean:
data.tablefor hot paths,httr2for HTTP,rlang/clifor conditions and messaging.dplyr/purrrare for vignette examples only, never package code. Use the base pipe (|>) and base regex overmagrittr/stringr. - Every exported function validates its arguments before hitting the network and surfaces e-Stat errors as classed conditions, not raw HTTP errors.
Development workflow
# Load the package for interactive work
pkgload::load_all()
# Run tests (offline, no key required)
devtools::test()
# Regenerate documentation after editing roxygen comments
devtools::document()
# Full check before opening a PR
devtools::check()Pull requests
- Fork and create a feature branch.
- Add tests for any behaviour change; keep them offline.
- Run
devtools::check()and make sure it is clean. - Update
NEWS.mdwith a user-facing summary.
Code of Conduct
Please note that this project is released with a Contributor Code of Conduct. By participating you agree to abide by its terms.