SciTools / iris-esmf-regrid

A collection of structured and unstructured ESMF regridding schemes for Iris.
https://iris-esmf-regrid.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
19 stars 17 forks source link

Introduce enums to replace free text user inputs. #270

Closed ESadek-MO closed 1 year ago

ESadek-MO commented 1 year ago

Closes #263.

The introduction of enums in place of user inputs makes future edits easier for developers, and lowers chance of user error.

The current intention is to include the enum classes as a Class Attribute, so that users aren't required to import them independently.

ESadek-MO commented 1 year ago

As it currently stands, the structured files are effectively done, excluding src/tgt for now. Most of the test failures come from not having done unstructured, which would require a touch more work than structured.

ESadek-MO commented 1 year ago

Note in current state of PR:

We'd agreed on a couple of string inputs to convert to enums, one of which being location. I kinda went a tad blazay, and as such stumbled upon the issue of it having (at least) two different use cases, and throws up a couple errors.

In discussion, we decided I'd get rid of location as an enum altogether, but I'd be open to the review asking for it to be put back in in the suitable use cases!