UCL-COMP0233-2023-2024 / RSE-Classwork

3 stars 65 forks source link

Automating `git bisect` - part I #27

Open dpshelio opened 11 months ago

dpshelio commented 11 months ago

In your homework (#26), you've seen that even for just 24 commits (and there can be many more), you need to type quite a few, repetitive git bisect commands to find the commit you're looking for. It's therefore something that is useful to automate. The Solving automatically section in the notes may be useful. Given the same situation as in this week's homework.

Let's go through some steps in the next issues:

Step 0

🀩 If you've attempted the homework, your repository may be in a bisecting state.

Therefore, run the following to keep everyone in the same point:

git bisect reset # to make sure you are not in a bisecting state
git switch main  # to go back to Charlene's original point
git reset --hard HEAD # to remove any modifications done to the tracked files

πŸ™ˆ If you've not tried the homework yet, then clone Charlene's repository locally:

git clone git@github.com:UCL-COMP0233-23-24/sagittal_average.git

Step 1

In a new file (test_sagittal_brain.py) define an input and expected numpy arrays to test Charlene's code.

Take a look to the diagram on the previous issue (#26) to understand what Charlene is trying to do.

Think why the current input (brain_sample.csv) and output (brain_average.csv) files that Charlene's been using to test her code are not very useful, and create new ones that could highlight any common error in this type of data manipulation.

Hint Which array can you define that will produce different average values for each different row?

React to this issue (#27) with a πŸ‘€ when your team has completed the task.