Collaboration
Step-by-step guidance for each exercise. The original exercise prompt is shown as the title — click to expand for detailed instructions.
Getting started
Check your email for an invitation from GitHub, or:
- Go to github.com/notifications
- Find the repository invitation and click Accept
You should now see the shared manuscript repository in your list of repositories.
- Go to the manuscript repository on GitHub
- Click the green Code button → click
Open with GitHub Desktop(or copy the URL and clone via terminal) - Follow the prompts to choose a local folder and clone the repository
- Open the cloned folder in your IDE (VSCode or RStudio)
Have a look at the folder structure. Things to look for compared to yesterday’s analysis folder:
- Is there a more detailed
README.md? - Are there separate folders for scripts, data, results, and manuscript files?
- Is there an environment file?
- Are there any code smells — hardcoded paths, commented-out code, missing documentation?
Issues
ISSUES.md, create at least one GitHub issue in the manuscript repository — include a label, title and description
- Open the manuscript repository on GitHub
- Click the
Issuestab →New issue - Give it a short, specific
title(copied fromISSUES.mdor your own) - In the
description, explain:- What the problem is
- Where it is (file name + line number if possible)
- What the expected behaviour should be
- On the right sidebar, click
Labelsand select an appropriate one (e.g.bug,enhancement) - Click
Submit new issue
analysis.py uses an absolute path — replace with a relative path” is.
Work through the pre-publication checklist from the slides:
- ❓ Does the repo structure make sense?
- ❓ Is there a clear README?
- ❓ Are there hardcoded paths, dead code, unused imports, or missing docstrings?
- ❓ Is there an up-to-date environment file?
- ❓ Is raw data or are credentials committed to the repo?
- ❓ Does the manuscript render correctly on GitHub or Quarto Pub?
- ❓ Are there any broken links or missing files?
- ❓ Are there typos?
Make notes on anything that looks off — you’ll log these as issues in the next step.
Using what you found in 3.5, create a second GitHub issue. Follow the same format as 3.4:
- Specific title
- Clear description of the problem and where it is
- Appropriate label
Try to pick something different from your first issue — variety helps the group fix more of the repository.
Branches
- Go to the
Issuestab in the manuscript repository - Click on an open issue that hasn’t been assigned yet
- On the right sidebar, click
Assignees→ select yourself - This signals to the rest of the team that you’re working on it
fix/<issue-number>-short-description
- Look at the bottom-left status bar — it shows the current branch (likely
main) - Click it →
Create new branch - Name it
fix/<issue-number>-short-description, e.g.fix/3-hardcoded-path - Press Enter — you’re now on the new branch
- On GitHub, click the
Codetab → click the branch dropdown (it saysmain) - Click
New branch - Name it
fix/<issue-number>-short-description, e.g.fix/3-hardcoded-path - Click
Create - In RStudio, click the
Gittab → click the branch dropdown → select your new branch to switch to it - You should now see your branch name in the Git tab and the bottom-right status bar
fix/3-hardcoded-path is immediately clear; my-changes is not.
- In your IDE, make the fix for your assigned issue
- Stage the changed file(s) and commit with a message that references the issue, e.g.:
Fix hardcoded path in analysis.py — closes #3 - Push the branch to GitHub in the
Source Controltab →Publish Branch
- In your IDE, make the fix for your assigned issue
- Stage the changed file(s) and commit with a message that references the issue, e.g.:
Fix hardcoded path in analysis.py — closes #3 - Push the branch to GitHub in the
Gittab → clickPush(↑)
Check GitHub to confirm your branch appears in the repository (look under the branches dropdown on the Code tab).
Pull requests
- Go to the repository on GitHub — you should see a yellow banner saying
"Compare & pull request"for your branch. Click it.- If the banner has disappeared, go to the
Pull requeststab →New pull request→ select your branch
- If the banner has disappeared, go to the
- Write a clear
title(e.g.Fix hardcoded path in analysis.py) - In the
description, type “Closes #3” (using your actual issue number) — this automatically links the PR to the issue and will close it when merged - On the right sidebar, click
Reviewers→ select a teammate - Click
Create pull request
- Go to the
Pull requeststab - Open the PR you’ve been assigned to review
- Click
Files changedto see the diff- Green lines = additions
- Red lines = deletions
- Click the
+icon next to any line to leave an inline comment - When you’ve reviewed everything, click
Review changes(top right):- ✅
Approve— looks good, ready to merge - 💬
Comment— feedback, but no verdict yet - ❌
Request changes— something needs fixing first
- ✅
- Submit your review
os.path.join() instead” is much more useful than “path is wrong”.
- Go to your PR on GitHub
- Once a reviewer has approved it, the
Merge pull requestbutton will be active - Click
Merge pull request→Confirm merge - Optionally, click
Delete branchto keep the repository tidy - The issue linked with
Closes #will automatically close
Watch the repository — the manuscript is set up with to re-render once your fix is applied.