IFI/UZH Summer School: From Scripts to Reusable Software and Reproducible Research
Summer school at the University of Zurich: actionable guidelines for turning non-reproducible scripts with hard-coded parameters into reusable software, with examples in Python.
One of the key principles of proper scientific procedure is the act of repeating an experiment or analysis and being able to reach similar conclusions. In the optimal case, researchers should be able to reproduce results from papers that they read with very little effort. The reality is, however, often different. Most authors do not provide any source code leading to their findings, and even when they do, information is incomplete or does not reproduce the results from related works. The course provides actionable guidelines on how to convert non-reproducible scripts with hard-coded parameters into reusable software. Topics such as version control, documentation, unit testing and packaging are exercised. While most of the concepts are independent of the programming language, examples are provided in Python.
Program
- Motivation and introduction (20 minutes, 5 minutes Q&A)
- Workflow for code organisation and extensibility (30 minutes, 10 minutes Q&A): disentangling score production from analysis (tabbing and plotting)
- Command-line parameters, after MIT CSAIL’s “The Missing Semester” (30 minutes
of talk, 30 minutes of hands-on and Q&A): argument parsing with
argparse, configuration files in YAML, producing tables withtabulate, producing plots withmatplotlib - Version control with Git and GitHub (30 minutes of talk, 10 minutes of hands-on and Q&A)
- Deployment: Python packaging for sharing (30 minutes of talk, 30 minutes of hands-on and Q&A)
- Software documentation (30 minutes of talk, 30 minutes of hands-on)
- Unit testing (20 minutes of talk)
Materials
- Course slides (PDF)
- Summer school page at the Department of Informatics, University of Zurich