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

Use `enum` around the codebase #263

Closed trexfeathers closed 10 months ago

trexfeathers commented 1 year ago

There are several examples in iris-esmf-regrid of 'modes', e.g. conservative/bilinear, source/target. So there are lots of checks for == "conservative" etcetera. These are vulnerable to spelling mistakes, and force object signatures to accept free text when there are only a few valid values.

These are prime cases for using Python's enum module instead. Once in place, code will be easier to follow and to modify, with fewer mistakes.

github-actions[bot] commented 1 year ago

@SciTools-incubator/esmf-regrid-devs This issue is stale due to a lack of activity in the last 90 days. Remove stale label or comment, otherwise this issue will close automatically in 7 days time.

github-actions[bot] commented 1 year ago

@SciTools-incubator/esmf-regrid-devs This stale issue has been automatically closed due to no community activity