We welcome contributions from DUNE collaborators. Here's what you should know.
It's important to coordinate so you don't waste time implementing a feature that someone else is already working on, or that we've already decided not to use. Reach out to us so we can stay coordinated:
- Open an issue on GitHub
- Post on the #larpix channel on DUNE Slack
- Email Dan Dwyer or Peter Madigan
Make sure to include your name, institution, and how you'd like to help.
We use a version of the OneFlow Git branching model. It is summarized here, with the appropriate commands to use:
-
Make a fork of larpix/larpix-control on GitHub and work from there
-
Clone the fork to your local computer and checkout the
latestbranch withgit checkout latest. Optionally, create a new feature branch if you plan on working on multiple independent features at the same time. The branch name format we use isissue/XXX-ABCDwhereXXXis the GitHub issue number andABCDis a one-or-two-word name for the issue. The command to create the branch isgit checkout -b issue/XXX-ABCD. -
Make your changes and commit them (possibly in multiple commits).
- Each commit should make a logical change
- The commit message should consist of a short (50-ish characters, definitely less than 80) summary message on one line, followed optionally by a longer paragraph-form description (separated from the summary by a blank line)
- The commit message summary should be descriptive and usually should
start with a verb. "Updates" and "Fixed bugs" are not good commit
messages. Examples from our repository:
- Add script to generate controller config files
- Add TimestampPacket to handle global timestamp synchronization
- Create an explicit specification for larpix.logger.Logger objects
- Fix bug in TimestampPacket.export
-
Push to your fork with
git pushif you're on master or this is not your first time pushing this branch, orgit push -u origin issue/issue#-feature-nameif it's your first time pushing this feature branch. -
To update your branch in response to new code in the central repository:
git remote add upstream https://github.com/larpix/larpix-control.git(do this once)git fetch upstream latestgit rebase upstream/latest(preferred) orgit merge upstream/latest(if you insist)- You will have to force-push to your personal fork if you rebased
in step 3. First do a dry run:
git push --force --dry-runand verify that the branch and remote address are correct. Then delete--dry-runand rungit push --force.
-
When your new feature is complete, or to solicit feedback on in-progress work, open a pull request. :bangbang: Be sure to select a base repository of
larpix/larpix-controland a base oflatest. The default will bestablebut you should change it tolatest! Cite the issue number you're working on in the body of the pull request. Select as a "reviewer" whoever you were communicating with about the feature you developed. We might suggest or require changes to be made before we (or you) merge in your work. -
We use the "Merge Pull Request" button on the pull request page.
-
To update your fork to reflect your new changes:
git checkout latestgit fetch upstream latestgit merge upstream/latest- Once you're satisfied, you can delete your feature branch with
git branch -d issue/issue#-feature-name. Delete the remote branch on GitHub by navigating to the "branches" page under the "Code" tab on your fork. Then remove your local reference to the branch withgit remote prune origin. - Push your updated master to your fork with
git push.