gavinfay / holo-deck-3

Space for miscellaneous projects
0 stars 0 forks source link

github workflow #1

Open gavinfay opened 3 years ago

gavinfay commented 3 years ago

The below is the github workflow used in the 2016-2019 COCA groundfish MSE project, with collaboration from GMRI, UMassD, NEFSC, & UDelaware. Project repo (is private)

The workflow documentation below was developed by @samtruesdell. Original posting (user on project permission required to view, hence duplication here)

This could be used as the basis for developing a @thefaylab standard template/guide for git based workflows for collaborative projects as part of our lab manual. Thanks to @ha0ye & @elainekearney for the idea!


GitHub workflow

The purpose of this document is to describe the intended workflow for updates to the groundfish-MSE code. This is important because we have multiple contributors.

If you are new to GitHub and are using RStudio, this is a pretty good tutorial: https://happygitwithr.com/index.html

Branches

Pull requests into Dev

Use a Pull Request when your changes to a branch are ready for prime time. This is the process to merge a branch you have been working on into the established model files. The philosophy behind the "request" is that the files get reviewed before they are integrated. To create a pull request, click on Pull Request in the list of branches on the GitHub site. You will then be taken to a page where you can describe the nature of the features and what in particular you would like to be evaluated by the reviewers. On the right-hand sidebar under reviewers choose at least one reviewer other than yourself to assign them the pull request to review.

image

Within a pull request (i.e., if you click on the pull request and open one to which you were assigned) there are some useful options including:

image

The comments you make will then appear under the Conversation tab along with a clip of the relevant lines of code.

image

Pull requests into Master

Pull requests from Dev into Master are ideally not direct. The idea is that it might take a while to review a pull request, but that shouldn't stop people from making changes to the Dev branch. The workflow to merge Dev into Master is:

  1. Create a Release branch directly from Dev
  2. Create a Pull Request and assign individuals to review changes to the code
  3. Once the code as been reviewed:
    • Merge Release into Master
    • Merge Release into Dev -- this is because while the Release branch was being reviewed, changes may have been made to Dev.

Workflow summary

Below is the summary of the intended workflow on GitHub:

image

ha0ye commented 3 years ago

Nice! I appreciate the branch-naming convention... using the author's initials helps to prevent branch name collisions!

elainekearney commented 3 years ago

Awesome! It's helpful to see how you've laid out the "ground rules" for each branch - what can be committed directly and what should be reviewed. Thanks for sharing!