Conference site » Proceedings

Python vs. the pandemic: a case study in high-stakes software development

Cliff C. Kerr
Institute for Disease Modeling, Bill \& Melinda Gates Foundation, Seattle, USA
School of Physics, University of Sydney, Sydney, Australia

Robyn M. Stuart
Department of Mathematical Sciences, University of Copenhagen, Copenhagen, Denmark
Burnet Institute, Melbourne, Australia

Dina Mistry
Twitter, Seattle, USA

Romesh G. Abeysuriya
Burnet Institute, Melbourne, Australia

Jamie A. Cohen
Institute for Disease Modeling, Bill \& Melinda Gates Foundation, Seattle, USA

Lauren George
Microsoft, Seattle, USA

Michał Jastrzebski
GitHub, San Francisco, USA

Michael Famulare
Institute for Disease Modeling, Bill \& Melinda Gates Foundation, Seattle, USA

Edward Wenger
Institute for Disease Modeling, Bill \& Melinda Gates Foundation, Seattle, USA

Daniel J. Klein
Institute for Disease Modeling, Bill \& Melinda Gates Foundation, Seattle, USA

Abstract

When it became clear in early 2020 that COVID-19 was going to be a major public health threat, politicians and public health officials turned to academic disease modelers like us for urgent guidance. Academic software development is typically a slow and haphazard process, and we realized that business-as-usual would not suffice for dealing with this crisis. Here we describe the case study of how we built Covasim (covasim.org), an agent-based model of COVID-19 epidemiology and public health interventions, by using standard Python libraries like NumPy and Numba, along with less common ones like Sciris (sciris.org). Covasim was created in a few weeks, an order of magnitude faster than the typical model development process, and achieves performance comparable to C++ despite being written in pure Python. It has become one of the most widely adopted COVID models, and is used by researchers and policymakers in dozens of countries. Covasim's rapid development was enabled not only by leveraging the Python scientific computing ecosystem, but also by adopting coding practices and workflows that lowered the barriers to entry for scientific contributors without sacrificing either performance or rigor.

Keywords

COVID-19, SARS-CoV-2, Epidemiology, Mathematical modeling, NumPy, Numba, Sciris

DOI

10.25080/majora-212e5952-00e

Bibtex entry

Full text PDF