🛣️ Week 09 - Lab Roadmap (90 min)

2023/24 Autumn Term

Author
This lab is part of the GENIAL project.

We won’t ask you to use ChatGPT/Copilot today, but we still want you to fill out the survey at the end!

If you end up using ChatGPT, please share the chat log as you did in the past labs.

🎯 Learning Objectives

Today’s main point is to practice working as a group on a data science project using GitHub. In a little more detail, we will learn how to:

  • accepting a Pull Request and merging it into the main branch
  • creating a website using GitHub Pages
  • add tasks (issues) to a GitHub project board
  • assign tasks to team members
  • create a new branch for each task
  • creating a Pull Request for when a task is done

📋 Lab Tasks

Part 1 - The ritual of a Pull Request review (30 min)

🎯 ACTION POINTS

This has to be done as a group.

  1. Make sure your repository can produce a website. Go to Settings and scroll down to the GitHub Pages section. Ensure the Source is set to the main branch and the directory is set to /docs. If not, change it and click Save. Wait a few seconds and refresh the page. You should see a green box with a link to your website. Click on it and check that it works.

  2. This is a 👨🏻‍🏫 TEACHING MOMENT. Your class teacher will open your group’s repository on GitHub and create a Pull Request with a new file.

    • The Pull Request will appear on your repository’s Pull requests tab.
    • You will also get an ✉️ e-mail notification.
    • Note: the file will not be visible on your main branch until you accept the Pull Request.
  3. Together, read the Pull Request description and see if you need to do something before accepting it. If you need to do something, do it.

    💡 TIP: The following GitHub documentation page might be helpful to you: Reviewing proposed changes in a pull request

  4. Accept and Merge the Pull Request. Return to your repository’s main page to see that your main branch now has the new docs/index.md file!

  5. Go to the ‘Actions’ tab and see if the website is being built. After a few minutes, you should see a green tick next to the latest build. You will find the URL there. Click on it and check that it works.

Part 2 - Your time to create a Pull Request (30 min)

🎯 ACTION POINTS

  1. Create a new Issue on your repository’s Issues tab. The title should be `👥 Add our names to the website’. The description should read:

    - [ ] Add a h2 heading called `Team Members` to the `docs/index.md` file.
    - [ ] Add a bullet points list with our names under the `Team Members` heading with the following format:
        - `<Name> <Surname> (<GitHub username>) | BSc in <Mysterious Sciences>`

    The < and > should not be included in the final text! They just indicate these are placeholders for you to fill in.

  2. Split the tasks:

    • one of you will play the role of the assigned to the Issue (the person who will do the task)
    • someone else will play the role of reviewer (the person who will check the task)
  3. The assigned person should go to their terminal and create a new branch called add-team-members by running each of the following commands:

    git fetch
    git checkout main
    git pull
    git checkout -b add-team-members
  4. The assigned person should now open the docs/index.md file in their text editor and add the required text. Save the file. (They can get help from the other team members. It’s not a race.)

  5. The assigned person should now go to their terminal and run the following commands:

    git add docs/index.md
    git commit -m "Add team members"

    Now, this is the point where you would normally just run git push. BUT, GitHub does not know about your new branch yet. So, you need to run the following command instead:

    git push --set-upstream origin add-team-members

    The next time you run it, you can just run git push.

  6. The assigned person should now go to their repository’s Pull requests tab and create a new Pull Request. The base branch should be main, and the compare branch should be add-team-members. The title should be 👥 Add our names to the website. Write a useful description similar to the one we did above. Click Create Pull Request and tag the reviewer.

  7. The person playing the role of reviewer should now check that they are happy with the changes. If they are, they should accept and merge the Pull Request. If they are not, they should add a comment to the Pull Request explaining what needs to be changed. The assigned person should then make the changes and push them to the same branch. The reviewer should then check again and accept and merge the Pull Request.

Part 3 - Decide on the next tasks for your project (30 min)

🎯 ACTION POINTS

  1. Go to your repository’s Projects tab and create a new project board using the ‘Board’ template. Name it DS105A Project Roadmap.

  2. Discuss the tasks you want to tackle in your group project next week and add them to your project board’s ‘To Do’ column.

    For example, here are a few ideas for you to consider:

    • ‘Add a new Jupyter Notebook with an initial scraping for website
    • ‘Define a directory structure for our project’
    • ‘Make our website look nicer by adding something called a Jekyll theme