Mr. Michael Milton1, HoChan Cheon1, Evan Thomas1, Pradeep Rajasekhar1, Lachlan Whitehead1, Jeffrey Kengsley1
1Walter and Eliza Hall Institute of Medical Research, Parkville, Australia
Biography:
Michael Milton has worked as a bioinformatician and research software engineer in Melbourne for the past 8 years, with an ongoing focus on developing high-quality open-source software. Michael is currently part of WEHI's Research Computing Platform, who aim to facilitate medical research software through project collaborations, developing software and providing training. https://orcid.org/0000-0002-8965-2595
Abstract:
Research software is full of unwritten rules, like the fact that an image’s Z axis should come before Y, that a Point Spread Function is actually an array, or that tally of 67.5 cells is not a mistake. Unless these rules are formalized in code, it can be difficult to avoid logic errors at runtime and difficult for a new developer to extend the application.
This presentation will look at two projects undertaken by WEHI Research Computing to improve research software quality by leveraging developments in Python’s type system and powerful libraries such as Pydantic, typer, fastapi and magicgui. Together, these make it possible to encode domain logic in Python programs, check for valid parameters at runtime, and even generate user interfaces automatically.
Napari-lattice, the first of these projects, processes the output of a Lattice Lightsheet microscope to prepare it for downstream analysis. The second project, called Cyton2, implements a model of immune cell population dynamics to estimate biological parameters such as division rate. One challenge for both of these applications was the need to share logic between multiple interfaces such as graphical plugin, web API server, command-line application and Python library.
With the completion of these two projects, both applications have become easy to modify. They now feature well documented classes, a library of reusable data types, guaranteed safety from type errors, excellent autocompletion support, and minimal redundancy. End users also benefit from clear errors, automatic documentation and a user-friendly Python interface.