SciPy 2023

Building MetPy for the Long Term: Working to Keep an Open Source Project Sustainable
07-13, 16:30–17:00 (America/Chicago), Zlotnik Ballroom

MetPy is an open-source Python package for meteorological and atmospheric science applications, leveraging significantly many other pieces of the scientific Python stack (e.g. numpy, matplotlib, scipy, etc.). With a focus on sustainability, Metpy extensively leverages GitHub Action to try to automate as much of the software development process as possible. Sustainability also extends to the growth of the community of developers, and we have been working to try to make that sustainable as well. Here we talk about our experiences, share our successes and lessons learned with trying to build a sustainable project.


MetPy is an open-source Python package for meteorological and atmospheric science applications, leveraging significantly many other pieces of the scientific Python stack (e.g. numpy, matplotlib, scipy, etc.). Its goal is to provide tested, reusable components suitable to a wide array of tasks, including scripted data visualization and analysis. The guiding principle is to make MetPy easy to use with any dataset that can be read into Python. MetPy’s general functionality breaks down into: reading data, meteorological calculations, interpolation, and meteorology-specific plotting. MetPy also has significant integration with XArray, as well as extended support for interpreting netCDF Climate and Forecasting Convention metadata.

As a scientific software project that has actively solicited users across the research and education spaces, MetPy has placed a heavy emphasis on the sustainability of the project. Too often core scientific libraries fall into disarray, with a heavy toll on the reproducibility of scientific results. Even given our strong institutional support, our goal with the MetPy project is to build the project with an eye to these potential problems and keep the project sustainable as much as possible.

One axis of sustainability for us lies on the side of technology and project infrastructure, which has been highly automated. This starts with our unit tests and test coverage, run automatically on GitHub, using its Actions service. These tests are run across a variety of OS, python version, and package manager combinations, as well as covering a wide array of sets of dependencies. This gives us great coverage of potential breakages. This also extends to automated documentation builds and publication, link checking, code quality checks, and, most importantly, making releases. This combination of processes, built heavily on the Github Actions service minimizes the need for humans in the loop of standard software development steps, allowing us to maximize the use of development time elsewhere.

Technological automation is important for sustainability, but it’s only one part of the equation; in order to have a truly sustainable open source project, you must also be solving the issue of people. MetPy follows open development practices to drive community participation as much as possible. We use Github issues, pull requests, discussions, and projects extensively to allow input from any interested user. We also hold regular, open developer calls to keep the project moving forward; we have also started holding community calls to try to give the community more of a voice and input into the direction of the project; these are also done with a goal to encourage more of the community to become involved directly with MetPy development.

This talk will share our lessons learned, both with technology and people, to help other projects who want to try to improve their overall sustainability.

Ryan May is a software engineer and deputy director for the Unidata program, part of the University Corporation for Atmospheric Research (UCAR) Community Programs, working on Python software and training for the atmospheric science community. Ryan began his meteorology career pursuing a B.S. in Meteorology at the University of Oklahoma in 1999. In 2014, Ryan started at Unidata, exchanging working on radar meteorology for working on open source tools for meteorology in Python. Currently, he is the Python team lead at Unidata and a core developer of the MetPy and Siphon Python packages, as well as a member of the steering committee for matplotlib and the core team for Conda Forge.