Building Better Scientific Software in Python


This website provides a tutorial on building better scientific software in Python. It was developed over time, by multiple people, and has been delivered in multiple formats and venues.


About

Scientists and researchers are increasingly put in the position of also being software developers. Writing code in the pursuit of science and data analysis brings with it the challenge of making that code deployable and accessible to collaborators. Novice programmers often find themselves writing difficult to maintain, difficult to manage code that their peers and collaborators have trouble using.

The goal of this tutorial is to expose researchers to several best practices in scientific software engineering that may otherwise take several years to become acquainted with. Though the implementation of these lessons is Python-specific, the essential ideas can be exported to other languages or platforms.

The code for this website and the final resulting package are available on GitHub. Feedback is welcome in the form of Issues or Pull Requests.


Tutorial

The content presented in the Tutorial can stand on its own as a reference. It can also be delivered as a hands-on workshop by a qualified instructor, with the materials presented alongside a live demonstration. A simple example bit of code is used to interactively build up a full featured Python package, complete with documentation and automated testing.

The following topics do not complete an exhaustive set of what could be included; however, they cover some of the many import elements of good scientific software.


Getting Started

Proceed to the setup page to read about the prerequisites for this tutorial. The content itself is in the Tutorial section. Some experience of working in an interactive terminal (either a Windows/Linux/Mac terminal or a Python console) is required. This tutorial is designed for a novice Python developer; if you can write a loop and a function in Python, and if you know how to run a .py script, you should be able to follow along comfortably.



Table of Contents