MetOffice / MetOffice/ANTS

Importing ants shouldn't change iris coordinate systems

Open
#41 0 comments 0 reactions 0 assignees View on GitHub
➡ medium priority 🐜 bug 🥇 good first issue
Dominant language
Python
Stars
7
Forks
10
Avg merge
1d 19h
Merged PRs (30d)
5

Description

# 🐜 Bug Report
Importing ants adds an [as_ants_crs](https://github.com/MetOffice/ANTS/blob/06fdecaeb3850d06cb3f2e50c6d12cae2040843a/lib/ants/coord_systems.py#L184) method to iris coordinate systems.

## How to reproduce
Step by step guide to reproduce the behaviour:

```
>>> import iris
>>> import iris.coord_systems
>>> iris_crs = dir(iris.coord_systems.CoordSystem)
>>> import ants
>>> ants_crs = dir(iris.coord_systems.CoordSystem)
>>> diff = set(ants_crs) - set(iris_crs)
>>> diff
{'as_ants_crs'}

```

## Version
This bug exists in ANTS head of main

## Additional Context
The solution here is probably to:

1. Add a function `as_ants_crs` somewhere in ANTS which performs a similar mapping as the existing method.
2. Replace usages of the method with the function.
3. Remove the method.

Contributor guide

Open the contributing guide

Research direction

Start with lib/ants/coord_systems.py at the linked as_ants_crs method, then locate its usages across ANTS. Check how the mapping can be exposed as a function without modifying iris.coord_systems.CoordSystem. Done means importing ants leaves iris coordinate-system attributes unchanged while existing ANTS behavior continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.