If we collect data about approximate timings for each section we can add this to the docs/directly into the notebooks.
Module 1: Introduction to Python
- Session 1 [45 mins]: Intro + Notebook 2 (started from "Variables")
- Session 2 [45 mins]: Notebooks 3 + 4
- Session 3 [45 mins]: Notebooks 5-7
- Session 4 [45 mins]: Notebooks 8 + 9
Module 2: Intermediate Python
- Session 1 [45 mins]: Notebook 00 and collaborative exercise
- Session 2 [45 mins]: Notebook 01
- Session 3 [45 mins]: Notebook 02, started notebook 03
- Session 4 [45 mins]: Finish notebook 03, Notebook 04
- Extra time [15 mins]: Notebook 05
I (Eric) was expecting Notebook 01 to take less time than it did due to a large number of questions about scope (which is discussed more in the advance programming notebooks), side effects and early return (or lack of a return statement), and args/kwargs. I have not taught this section before so cannot assess if I made a bad estimate or we were unlucky with a lot of questions that happened to fall in this one (which takes me on a tangent: I wonder if questions should be expected to follow a Poisson process?).
Module 3: Research Data in Python
- Session 1 [45 mins]: Notebooks 0 & 1 (fields & records; structured data)
- Session 2 [45 mins]: Notebook 2 (maze exercise, earthquakes exercise)
- Session 3 [45 mins]: Notebooks 3 & 4 (matplotlib, numpy)
- Session 4 [45 mins]: Notebook 01_01_data_analysis_example, 6, 5 (greengraph, greengraph + classes, boids)
Module 4: Version Control
- Session 1 [45 mins]: Notebook 0, 6 (introduction, git theory)
- Session 2 [60 mins]: Notebooks 1, 2, 3 (solo work, fixing mistakes, publishing)
- Session 3 [30 mins]: Notebooks 4, 5 (collaboration, fork & pull)
- Session 4 [45 mins]: Notebooks 7, 8, 10 (branches, stash, rebasing)
- SKIPPED: notebook 9 & 11
If rewriting, consider taking inspiration from here https://www.atlassian.com/git/tutorials or here https://product.hubspot.com/blog/git-and-github-tutorial-for-beginners
Module 5: Testing your code
- Session 1 [45 mins]: Notebooks 0 and 1 (introduction, how to test)
- Session 2 [45 mins]: Notebooks 2 and some of 3 (testing frameworks, energy example - we had 15 mins of group work on the exercise at the end of the session)
- Session 3 [45 mins]: More on notebook 3 (did a poll at the start of the session to see who needed more time for the exercise - roughly 50% wanted another 5 mins), notebooks 4 and 5 (mocking, using debugger).
- Session 4 [45 mins]: Notebook 6 (continuous integration). Not enough time to do notebook 7 (diffusion example) as a user exercise - went through the problem and solution directly.
For the debugging section, there is not much in the notebook but we did a demo of the debugging capabilities in Jupyter lab. Similarly for the Continuous Integration, there isn't much in the notebook, but we showed an example of a .travis.yml file and results page on travis-ci.com, and also did a live demo of a Github Action (checking for a README file) on a fork of the github-example
repo that was created in the previous day's course.
Module 6: Software Projects
- Session 1 [45 mins]: Notebooks 0, 1 (PyPI and Libraries)
- Session 2 [45 mins]: Notebooks 2, 3 (Argparse and Non-notebook Python)
- Session 3 [45 mins]: Notebooks 4, 5 (Packaging and Documentation)
- Session 4 [45 mins]: Notebooks 6, 7, 8 (Project management, Licensing, Software issues)
There were several questions about Virtual/Conda environments and using Poetry to manage dependencies instead of pip. Neither of the instructors had used Poetry enough to give an informed opinion (though we have heard positive things). Also some questions on how to ensure a minimal list of dependencies is specified when packaging, and differences between Python Eggs and Wheels (which we didn't know the answer to). They seemed to be evenly spread throughout the notebooks so nothing took more or less time than I (Eric) might have expected.
Module 7: Construction & Design
- Session 1 [60 mins]: Notebooks 0,1,2 (intro, conventions, comments)
- Session 2 [35 mins]: Notebook 3 (refactoring)
- Session 3 [75 mins]: Notebooks 4,5,6 (object-oriented design, classes, design patterns) - skipper over some aspects, particularly in design patterns
- Session 4 [5 mins before and after a break]: Notebook 7 (bad boids exercise) - some time for participants to start looking at it during a break if they wanted, but largely skipped. Stayed behind a bit longer to answer a few questions and linked to the better implementation available in the repo.
Most of the notebooks took us longer than expected, we hoped to be able to leave most of the last session for the refactoring exercise. In the end we ran out of time for participants to meaningfully do anything on the exercise (even after trying to get through the second half of the material a bit faster, skipping some parts). Also meant we ended up with a very long session 3 and essentially no session 4.
Module 8: Advanced Programming Techniques
- Session 1 [45 mins]: Notebooks 00, 01 (skipped last part)
- Session 2 [45 mins]: Notebook 02 (through context managers)
- Session 3 [45 mins]: Notebook 02 (decorators), Notebook 03 (through try/catch series of functions)
- Session 4 [45 mins]: Finish Notebook 03, Notebook 04
We thought that decorators would be more clear if the repeater function itself was a decorator, rather than the return value of a function. We skipped the final two advanced advanced notebooks due to lack of time.
Module 9: Programming for speed
- Session 1 [45 mins]: Notebooks 00, 01 and part of 02
- Session 2 [45 mins]: Remainder of Notebook 02
- Session 3 [45 mins]: Notebook 03
- Session 4 [45 mins]: Notebook 04
Module 10: Scientific file formats
- Session 1 [45 mins] Notebook 00
- Session 2 [45 mins] Notebook 01
- Session 3 [40 mins] Notebook 02
- Session 4 [50 mins] Notebooks 03, 04, 05
Went quickly through the last two notebooks, particularly 05, partly through lack of time, and partly through lack of understanding of the material by the instructor (me) :-/