Thank you for your interest in contributing to WHAM!
We welcome simple documentation and bug fixes as well as more substantive code contributions, such as new features. Our current ideas for improving WHAM are on the to do list. If you would like to tackle something larger than a bug fix, please file an Issue to discuss and make sure we are not working on it already.
We reserve the master branch for stable, tagged releases. The devel branch contains unstable but tested updates. We create additional, temporary branches to develop and test larger updates before merging them into devel. While working on a temporary branch, we semi-regularly pull updates from devel to deal with merge conflicts as soon as possible.
If you wish to contribute, please use the NOAA Fisheries Toolbox suggested workflow, summarized below. This page has further guidance and resources. The “fork-and-branch” workflow we follow is described in more detail here.
File an Issue describing the fix/feature you are planning.
Fork wham (create your own copy on GitHub by clicking “Fork”, top right of wham page)
Clone your fork (download your copy of wham so you can modify it locally, click green “Code” button)
Add the original wham repo as upstream so you can get future changes from devel (see here).
git remote add upstream https://github.com/timjmiller/wham.git
Checkout devel.
git checkout devel
Confirm you can fetch and merge changes from the original wham repo (see here).
git fetch upstream
git merge upstream/devel
Create a new branch for your change with a meaningful name, e.g. selftest
to add a function to simulate data from a fit model and refit.
git checkout -b <myfeature>
Confirm you can run and pass the automated tests
# install.packages("here")
library(here)
wham.source.dir <- here()
# confirm that the .cpp compiles and wham can be loaded
devtools::load_all(path = wham.source.dir)
# run all tests
devtools::test(pkg = wham.source.dir)
Work on your feature branch, making changes to your local wham files. Periodically merge in updates from the upstream devel branch (#6 above). Try to maintain the current wham coding style.
Add documentation, test(s), and a vignette if applicable.
When your feature is finished, rerun the tests and verify that they pass (#8). Helpful scripts for testing and debugging are in the inst/contribute/
folder.
Confirm your branch is up-to-date with the upstream devel.
Commit your changes, and push your local branch to your forked repo (origin, not upstream)
git commit -m "informative message"
git push origin <myfeature>
Submit your pull request, following these best practices.
Clean up / delete your feature branch and fork.