Pull Requests and Code Review

Megumi Oshima & Nicholas Ducharme-Barth

January 2025

Let’s review!

So far we have:

  • Created branches for each group to work separately
  • Each group has modified the Stock Synthesis models

Next we want to:

  • Aggregate all of the model runs into the main branch
  • Produce some visualizations of the results

Pull Requests

mainbuild_modelgrowth_curveAdd initial filesDevelop base modelFinalize base modelChange growth curveCheck new growth curveFinal model report

Pull Requests

In the repository go to “Pull requests” and select which branches you want to merge

Pull Requests

Can see the dif view of changes in the file, if the code passes checks and tests set up, what commits are associated with this PR, add comments to the PR

Red lines show deleted code
Green lines show added code

Can add a review of the changes

More complicated situation: Merge Conflicts

Merge conflicts happen when you merge 2 branches that have competing commits

Merge Conflicts

2 ways to resolve them

  1. GitHub
  1. Locally

Let’s try it!