Open truth-quark opened 5 months ago
This requirement also relates to this issue: https://github.com/ACCESS-NRI/access-esm1.5-configs/issues/3
See also #65 / the Test Driven Repair strategy for further details.
This issue is being split into separate issues for the 3 core development steps.
This is a high level project management issue to outline general work to prepare a minimum
um2nc
utility foresm1.5
post-processing. For simplicity, this content is a GitHub issue, however can be a separate markdown document if required.The stages are intended as scaffolding, not a prescriptive approach (e.g. stage 2 & stage 3 may interleave).
Overview
Multiple versions of
um2nc
exist ongadi
, with uncertain provenance. This project is to create a single canonical version ofum2nc
to replace other copies, starting from Martin Dix's version copied from 16/6/2024.Background: the original
um2nc
code lacked unit tests & it is unclear what manual testing had been carried out (or the results). There was no way to determine if the code was functioning as intended. Additionally, no requirements documentation existed at the beginning of this project. Martin Dix knows project history & requirements, although this was not captured in documentation.An early review identified non-modular code as another primary concern. The code had been developed over several years, accumulating features across the module. The base version contained a mix of smaller, separate functions & several larger workflow functions. The larger workflow functions bundled several functional steps together, with the coupling making the code difficult or unwieldy to test isolated parts. The code lacked a consistent software architecture. Other smaller issues existed, including complicated logic, older features & missing checks.
Naming: different copies have different module names, depending on different authors & their customisations. In this repo, the name
um2nc
is considered synonymous withum2netcdf
, with the primary module beingum2netcdf.py
.Overarching Requirements & Goals
um2nc
copies with this canonical versionDevelopment Stage 1 - Retrofitting & Modularisation
The first dev stage focuses on rearranging the code & retrofitting unit tests. The goal is to substantially modularise the code base & provide a suite of tests to support future fixes & refactoring. Without tests, there is no safety net to determine if the changes are breaking or non-breaking.
NB: as this stage is uncertain, some loose work is perfectly acceptable. The goal is to decouple first, learn the code & then improve it. It is significantly easier working with smaller pieces due to reduced dependencies.
Tasks:
um2nc
with real data