From 67c514509b3f17659bab9cd6c58cdbbb4b8425dd Mon Sep 17 00:00:00 2001 From: Dan McGraw Date: Tue, 21 Apr 2026 14:53:18 -0600 Subject: [PATCH 1/2] Add CONTRIBUTING.md --- CONTRIBUTING.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ee04494 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# Contributing to rfaR + +Thank you for your interest in contributing to rfaR! We welcome bug reports, feature requests, validation results, and other feedback from the community. + +## Review Capacity + +rfaR is maintained by a small team within the U.S. Army Corps of Engineers Risk Management Center (USACE-RMC). **Our capacity to review external pull requests is very limited.** We prioritize issues and bug reports, which are always welcome and will be reviewed as resources permit. + +If you plan to submit a pull request, please open an issue first to discuss your proposed change. This helps avoid duplicated effort and ensures your contribution aligns with the project's direction. + +## How to Contribute + +### Report a Bug + +If you find a bug, please [open an issue](../../issues/new) and include: + +- Steps to reproduce the problem +- Input data and configuration (if applicable) +- Expected behavior vs. actual behavior +- R version, rfaR version (`packageVersion("rfaR")`), and operating system +- Any relevant error messages or screenshots +- A minimal reproducible example (`reprex`) when possible + +### Request a Feature + +Feature requests are welcome. Please [open an issue](../../issues/new) describing: + +- The use case or problem you are trying to solve +- How you envision the feature working +- Any references to statistical or hydrologic methods or published literature + +### Report Validation Results + +Given the life-safety applications of this software, independent validation is especially valuable. If you have compared rfaR results against other software (e.g., RMC-RFA, HEC-HMS, HEC-WAT, published tables, or analytical solutions), we would appreciate hearing about it through an issue. + +### Submit a Pull Request + +Pull requests may take several weeks or longer to review. Before submitting code: + +1. **Open an issue first** to discuss the proposed change +2. **Follow the coding standards**, including roxygen2 documentation on all exported functions +3. **Include unit tests** using `testthat` that validate against known results (RMC-RFA, HEC-HMS, published tables, or analytical solutions) +4. **Ensure a clean `R CMD check`** with zero errors, zero warnings, and zero notes (run via `devtools::check()`) +5. **Rebuild documentation** with `devtools::document()` before committing +6. **Follow existing code style** (explicit `package::function()` namespacing, positional column access where appropriate, and the package's established plotting conventions) + +## Developer Certificate of Origin + +By submitting a pull request, you certify under the [Developer Certificate of Origin (DCO) Version 1.1](https://developercertificate.org/) that you have the right to submit the work under the license associated with this project and that you agree to the DCO. + +All contributions will be released under the same license as the project (see [LICENSE](LICENSE)). + +## Federal Government Contributors + +U.S. Federal law prevents the government from accepting gratuitous services unless certain conditions are met. By submitting a pull request, you acknowledge that your services are offered without expectation of payment and that you expressly waive any future pay claims against the U.S. Federal government related to your contribution. + +If you are a U.S. Federal government employee and use a `*.mil` or `*.gov` email address, your contribution is understood to have been created in whole or in part as part of your official duties and is not subject to domestic copyright protection under 17 USC 105. + +## Security + +If you discover a security vulnerability, please do **not** open a public issue. Instead, contact the RMC team directly through official USACE-RMC channels. + +## License + +See [LICENSE](LICENSE) for details. This software is provided by USACE-RMC under a BSD-3-Clause license with a no-endorsement clause. From 00b1913cc0c9a955a44e99433570179eb38bbd5b Mon Sep 17 00:00:00 2001 From: Dan McGraw Date: Tue, 21 Apr 2026 15:09:24 -0600 Subject: [PATCH 2/2] Add bug report issue template and PR template --- .github/ISSUE_TEMPLATE/bug_report.md | 35 ++++++++++++++++++++++++++++ .github/pull_request_template.md | 20 ++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/pull_request_template.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..649b4ca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Report a problem with rfaR +title: '' +labels: bug +assignees: '' +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior. A minimal reproducible example (reprex) is strongly preferred — see https://reprex.tidyverse.org/. + +**Expected behavior** +What you expected to happen. + +**Actual behavior** +What actually happened, including any error messages or warnings (copy the full text). + +**Input data and configuration** +If applicable, describe the input data (hydrograph, reservoir table, frequency curve parameters, etc.) and the rfaR function call that triggered the issue. + +**Session info** +Please paste the output of `sessionInfo()` and `packageVersion("rfaR")`: + +``` +# paste here +``` + +**Operating system** +e.g., Windows 10, Windows 11, macOS 14, Ubuntu 22.04 + +**Additional context** +Screenshots, plots, or any other information that might help. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..4f32043 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,20 @@ +## Description +Brief summary of the change and the motivation for it. + +## Related Issue +Closes #, or "Discussed in #" + +## Type of change +- [ ] Bug fix +- [ ] New feature +- [ ] Documentation update +- [ ] Refactor / internal cleanup +- [ ] Other (describe): + +## Checklist +- [ ] I opened an issue to discuss this change before submitting +- [ ] `devtools::document()` has been run +- [ ] `devtools::check()` passes with zero errors, warnings, and notes +- [ ] Unit tests have been added or updated (`testthat`) +- [ ] `NEWS.md` has been updated (if user-facing) +- [ ] I agree to the Developer Certificate of Origin (see CONTRIBUTING.md)