Contributing to rpspanel
Source:.github/CONTRIBUTING.md
Thank you for helping to improve rpspanel. Contributions of all sizes are welcome: bug reports, corrections to the RPS rule coding, documentation fixes and new features.
Please note that this project is released with a Contributor Code of Conduct. By participating you agree to abide by its terms.
Reporting a bug
Open an issue with:
- a minimal reproducible example, ideally made with the reprex package;
- the output of
sessionInfo(); - for download problems, the data source involved (EIA, BEA or Census) and the full error message. Never include your API keys.
Correcting the RPS coding
The RPS rules in inst/extdata/rps_rules.csv and inst/extdata/rps_targets.csv are hand-coded from statutes, DSIRE program pages and Berkeley Lab’s RPS & CES data. If you find an error, please open an issue that gives:
- the state and the field that is wrong (for example a target year, target level, coverage share or repeal year);
- the correct value; and
- a citable source: the statute, regulation or official program page.
Coding changes are recorded in the source and notes columns so every value stays auditable. After editing the CSV files, run source("data-raw/check_rps_rules.R") from the package root to check that the coding is still consistent.
Pull requests
- Fork the repository and create a branch for your change.
- Install the development dependencies with
remotes::install_deps(dependencies = TRUE). - Make your change. New functionality needs tests in
tests/testthat/and documentation with roxygen2; rundevtools::document()after editing roxygen comments. - Check the package with
devtools::check(). - Add a bullet to the top of
NEWS.mddescribing the change. - Open a pull request that explains what the change does and why.
Tests and API keys
The tests never access the network: all EIA, BEA and Census responses are mocked (see tests/testthat/helper-fixtures.R), so you do not need API keys to run them. Please keep it that way, and never commit API keys or downloaded data.
Style
The code follows the tidyverse style guide, with lines of at most 80 characters, and has as few dependencies as possible. User-facing messages and errors use cli, and errors from web services use the classes rpspanel_http_error and rpspanel_no_key.
Questions
For questions about using the package, open an issue on GitHub.