UCL-MPHY0021-21-22 / RSE-Classwork

7 stars 73 forks source link

Automating `git bisect` - part I #26

Open dpshelio opened 3 years ago

dpshelio commented 3 years ago

In your homework (#25), 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-MPHY0021-21-22/sagittal_average.git

Step 1

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

Take a look to the diagram on the previous issue (#25) 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 create that will produce different average values for each different row?

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