The information in this document outlines how to contribute to this project.
In order to contribute new code you will need to fork the repository and create a local clone with the steps below:
All development should be performed on a development branch. The default branch (main) should be reserved for receiving updates from the upstream repository. To get updates from the upstream perform the following commands:
- Get updates to main:
git checkout main
git pull --ff-only upstream main
git push origin main
(might require the--force
flag)- Either check out a new branch (
git checkout -b <new branch name>
) or rebase an existing branch (git checkout <existing branch>
thengit rebase main
)
If an issue has not been created for your change, please submit one, then assign yourself to the issue and perform the following steps:
-
Ensure that the steps Forking the Repository and Getting Updates from the Upstream Repository have already been performed
-
From the main branch checkout a branch with a name starting with the issue number:
git checkout -b <issue #>-<issue description>
-
On that branch make changes and commit them
-
Submit a merge request from your branch to the upstream main branch
- If your branch name starts with the issue number, the merge request description should automatically say
Closes #<issue #>
. If it does not, add the close statement so that the issue will be closed when the merge is completed.
- If your branch name starts with the issue number, the merge request description should automatically say
-
Assign a reviewer to the merge request
-
Address any reviewer comments (See Creating/Addressing Comments)
If you have been assigned (or have assigned yourself) as a reviewer on a merge request perform the following steps prior to merging:
- Perform an administrative/security review on the code and each new commit in the history to ensure no PII is contributed to the project
- Analyze the code and add comments as a review (See Creating/Addressing Comments)
- Make sure that the tests pass. If the changes are minimal and/or do not affect fortran code, green's functions, inversion then the pipeline tests are sufficient. Otherwise, check out the merge request locally and run test with the environment variables
RUN_ALL
andRUN_END_TO_END
set to "true". - Submit a review
- Upon receiving updates to the code (should be submitted as the developer's response review) repeat steps 1-5 until satisfactory
- Complete the merge
- If there are a substantial number of commits (5+) in the merge request, consider using the "Squash Commits" option
Adding comments and addressing comments in a merge request should both be performed as a review to avoid spamming contributor with multiple emails. A review being completed also signals to the contributor that the merge request is ready to be looked at.
As part of Reviewing a Merge Request, you may have comments on a merge request that need to be addressed. To start a review complete the following steps:
- Open the Changes tab on the merge request
- Click the add comment button that appears as you hover over the black space next to the line number
- Add text
- Click "Start a review"
- For additional comments repeat steps 2-3 and click "Add to review"
- Submit the review at the bottom
Any subsequent reviews after the initial review is created will follow the process outline by Developer Role: Submitting a Response Review
As part of Reviewing a Merge Request, you may have comments on a merge request that need to be addressed. To start a review complete the following steps:
- Open the comment
- (if applicable) Make changes to your local branch, commit, and push the changes
- Add text to the comment (if useful include the commit number and link)
- Click "Resolve comment" if you think the comment was addressed, leave open if there is more clarification/discussion needed, or click "Resolve to issue" if the comment merits a separate merge request
- Repeat 1-4 until all comments have been addressed
- Submit the review