Contributing
Source:.github/CONTRIBUTING.md
We welcome contributions! This document provides guidelines for contributing to JournalAnalysis.
Submitting Bugs
Before Submitting
Before submitting a bug report, please do the following:
- Make sure you’re on the latest version. Your problem may have been solved already.
- Try older versions. If you’re on the latest release, try rolling back a few minor versions to help narrow down when the problem first arose.
- Search the project’s issue tracker to make sure it’s not a known issue.
Bug Report Contents
Make sure your report includes:
- Operating system: Windows? macOS? Linux? Include version details.
-
R version: Output from
R.version.stringorsessionInfo(). -
Package version: Output from
packageVersion("JournalAnalysis"). - RStudio version: If the addin is involved, include your RStudio build.
-
Installation method: r-universe, GitHub (
devtools::install_github), or source. - Steps to reproduce: Include a minimal example, the command or addin steps you used, and the full output or error message.
Contributing Changes
Licensing
By contributing to this project, you agree that your contributions will be licensed under the same terms as the rest of the project (see the LICENSE file in the repository root).
- Per-file copyright/license headers are typically not needed. Please don’t add your own copyright headers to new files unless the project’s license actually requires them.
Version Control
- Always make a new branch for your work, no matter how small.
- Don’t submit unrelated changes in the same branch/pull request.
-
Base your branch on
mainfor new features and most bug fixes. - If your PR has been sidelined for a while, rebase or merge to latest
mainbefore resubmitting.
Code Formatting
- Follow the style used in the repository. Consistency with the rest of the project always trumps other considerations.
- Use snake_case for functions and variables,
<-for assignment, and 2-space indentation.
Documentation
Documentation is required for all contributions:
- Roxygen2 comments must be created or updated for exported functions.
- README or pkgdown docs should be updated when user-facing behavior changes.
- Changelog entry should credit the contributor when the change is user-visible.
Tests
Tests are required for all contributions:
- Bug fixes must include a test proving the existence of the bug being fixed.
- New features must include tests proving they actually work.
- Run
devtools::test()locally before opening a pull request.
Workflow Example
Here’s an example workflow for contributing:
Preparing Your Fork
- Fork the repository on GitHub.
- Clone your fork:
git clone git@github.com:yourname/JournalAnalysis.git cd JournalAnalysis- Install development dependencies:
devtools::install_dev_deps() - Create a branch:
git checkout -b fix-description main
Making Your Changes
- Write tests expecting the correct/fixed functionality; make sure they fail initially.
- Implement your changes.
- Run tests again:
devtools::test() - Run a full check:
devtools::check() - Update documentation as needed.
- Commit your changes:
git commit -m "Brief description of changes"
Questions?
If you have questions about contributing, please open an issue or contact the maintainers.