MetPy 1.1.0 Milestones: Code Fixes and Verification

Editor's Note:
Due to the COVID-19 pandemic, Unidata's 2021 summer interns did not travel to Boulder to work on their projects in person. Instead, they interacted with Unidata developers through Slack, Zoom, and other electronic means.

Lydia Bunting
Lydia Bunting

This summer I worked with the Unidata tech team on addressing the MetPy 1.1.0 milestones we prepared for it to update from version 1.0.0. Throughout this process of learning how to navigate GitHub and MetPy and how to implement new code, code verification and testing played a large role.

MetPy is a collection of tools in python that is used for understanding weather data through the use of calculations, visualizations, and other functions. The development of this project is supported by the National Science Foundation, and its primary usage is for meteorological research and understanding of the atmosphere. Most of my work this summer has been dedicated to understanding and addressing the 1.1.0 Milestones, which are a list of code enhancements or bug fixes that are to be addressed for the 1.1.0 update to MetPy.

Software engineering process
A software issue-resolution process
(click to enlarge)

Although I studied several of these issues, the one that took up the majority of my time was issue number 1844. For this issue, the initial problem was that climate and forecasting data were not being accepted by the function used to assign a coordinate reference system to the data. This problem was initially fixed by adding an attribute for the earth’s radius to the input dictionary, but this led to a new problem in the code. Now, the center of the projection was missing in the climate and forecasting listing, resulting in incorrect projections and missing data. To fix this issue, I rewrote a portion of the code such that this missing value is seen as a reference point for the projection and is not passed on to the remainder of the code.

An important part of code maintenance and writing code in general is code verification. This verification is primarily done through a process called unit testing, which “activates” each piece of code to ensure it’s working as expected. This is an important step to take when writing new code, especially code that is used by other people, for several reasons. First, the process of code verification identifies problems early in the code development process, rather than allowing them to go undetected and affect the rest of the code. Second, the process of code verification ensures code developers are thoroughly thinking through the code they write. Third, neglecting the code verification process can lead to code that is ineffective or inoperable, which causes problems for users.

After the new code has been tested and is operating as expected, the code can be submitted to undergo a wide variety of automated tests in order to identify anything that might have been overlooked by manual unit testing. These tests also check for places where code does not adhere to MetPy’s style standards, or where it may adversely affect other code. Once these automated tests are passed, the code undergoes review by Unidata staff, and when deemed ready it can be then merged with the rest of MetPy.

This internship was a very valuable experience, as it allowed me to look behind the scenes of software development and the code testing process. I am excited to take what I have learned and integrate it into my own research and code writing processes.

Comments:

Post a Comment:
Comments are closed for this entry.
Unidata Developer's Blog
A weblog about software development by Unidata developers*
Unidata Developer's Blog
A weblog about software development by Unidata developers*

Welcome

FAQs

News@Unidata blog

Take a poll!

What if we had an ongoing user poll in here?

Browse By Topic
Browse by Topic
« December 2024
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy