Example Code

Last updated on 2025-11-25 | Edit this page

Overview

Questions

  • What does a bad code repository look like?

Objectives

  • Obtain example code used for this lesson
  • Describe the purpose of the example code repository

Creating a Copy of the Example Code Repository


For this lesson we’ll need to create a new GitHub repository based on the contents of another repository.

  1. Once logged into GitHub in a web browser, go to https://github.com/UNIVERSE-HPC/review-example.
  2. Select ‘Use this template’, and then select ‘Create a new repository’ from the dropdown menu.
  3. On the next screen, ensure your personal GitHub account is selected in the Owner field, and fill in Repository name with review-example.
  4. Ensure the repository is set to Public.
  5. Select Create repository.

You should be presented with the new repository’s main page. For simplicity, we’ll be using the GitHub website interface to edit the repository’s contents, so there’s no need to clone it on your own machines.

Examining the Code


This repository contains code written in Python to analyse a dataset from the UK ResearchFish publication database. For the purposes of this training, we’ll be using this repository to make some high-level commits and create a pull request for review. It’s not necessary for us to delve deeper into how it works, but note that the repository contents have been modified to deliberately include many problem and errors!

Key Points
  • Encountering a “bad” code repository is an opportunity to learn what not to do!