Hi @bethanwhite,
I understand ants is an important module to work with the ACCESS models which have the UM as their atmospheric component.
Unfortunately, there are a few problems with the ants package that ACCESS-NRI can do very little to circumvent.
Issues with the ants package
- The package doesn’t have a list of dependencies in its pyproject.toml, so their dependencies must be “inferred” from the official installation instructions
- The official installation instructions consider
antsalmost as an “application” rather than a “package”, as it needs a proper set environment (often with dependencies pinned to the build version). However,antsis not an application and is supposed to be used also as a Python API. - Related to the above, the very strict dependency pinning (like
dask,iris, etc.), makeantsalmost impossible to be safely installed in environments such asconda/analysis3(but also in any other “multi-purpose” python environment) - While I did some testing for the conda packaging, I realised that many of the dependency pinnings are set to satisfy its unit-tests, which in my opinion is far too specific. It probably aims at ensuring absolute reproducibility, but this greatly limits the usability of
antstogether with other packages
In general, there is no easy work-around for the points above, and we cannot change any of them because ACCESS-NRI is not the package developer.
Possible solution
Given the above, I propose to release a dedicated environment for ants, which contains MetOffice packages (e.g., shumlib, mule, etc.) and some core “analysis” packages often used in conjunction with ants (e.g., xarray, dask, matplotlib, etc.).
Some of these packages are already a dependency (often pinned to the specific version or even build) of ants. In that case, they will have to be pinned to whatever ants prescribe. Otherwise , we can have more freedom and pick the latest version that solves the environment.
Note: All of the above is relevant for the ugants module as well.
What do you think?
Do you have any other suggestions?
Cheers
Davide