The schedule below was followed during a Software Carpentries Workshop, hosted at the TU Delft in October 2022
12:15 - Organizers/instructors/helpers in the Zoom meeting room to check last set ups, introductions etc
12:30 - Start workshop and let participants in! We should not need time to check installations as any remaining problems are addressed on day 3.
12:30 - Welcome and instructions of the day @ Paula
- Reminder Code of Conduct/How to get help.
- Programme of the day
- Ice breaker
12:40 - Recap of Python day 1 (5 minutes)
12:45 - Making Choices (20 minutes teaching + 5 minutes exercise)
Plenary Exercises:
-
Plenum: How many paths?
-
Together, inspect all datasets for suspicious data
13:15 - Creating Functions (20 minutes teaching + 5 minutes plenum exercises)
Plenary Exercises:
13:40 - Breakout Session 1 (20 min)
14:00: Coffee Break I
14:10: Modular coding
- Tidying-up
- Create script called
processing.py
- Copy functions (visualize, detect_problems) to script
- Create new notebook called
inflammation_analysis_refactored.ipynb
- Import (visualize, detect_problems) in the new notebook and place in for-loop to analyse for all files
- Questions in session:
a. Do we still need to import numpy and matplotlib when we are importing them in theprocessing.py
script?
No, this is handled in the script.
b. What happens to the savefig in the loop?
Currently, during each loop the fileinflammation.png
is overwritten. Solution for future sessions: We could add new savenames or leave the savefig out of the functions entirely for simplicity.
Resources on structuring python code:
- https://realpython.com/absolute-vs-relative-python-imports/
- http://cicero.xyz/v3/remark/0.14.0/github.com/coderefinery/modular-code-development/master/talk.md/#1
14:30: Errors and Exceptions (15 minutes teaching + 5 minutes exercise)
15:10: Breakout Session 2 (20 min)
15:30: Coffee Break II
15:40: Defensive Programming (30 min)
- Lesson 10
- Example for a pre-condition to find empty array
- Add precondition to
inflammation_analysis.ipynb
- Replace previous conditional statements in
inflammation_analysis.ipynb
by assertions
16:10: Debugging
- Lesson 11
- [Slides]
16:30: Breakout Session 3 (20 min)
16:50 - Wrap up, Questions, etc.
17:00 - End
17:00 - Sharing Feedback Instructors/Helpers