-
Couldn't load subscription status.
- Fork 297
Closed
Labels
Description
Currently different CoordSystems are written and tested in an inconsistent manner, owing to methods improving over time. Since the addition of a coordinate system is uncommon and undocumented, it can take a long time to work out what needs to be written where, since the developer can only use existing CoordSystems as a guide. Formatting can be unified with the following changes:
- Transfer all CoordSystem checks and warnings (e.g. 'Rotated pole position is not fully specified') out of fc_rules_cf.krb and into the CoordSystem classes in coord_systems.py - if they stay where they are the warning will only be generated when loading the system, not if it is created from scratch. If a check is duplicated in both locations it should be removed from fc_rules_cf.krb and remain in the class definition.
- Transfer any CoordSystem-specific tests out of test_coordsystem.py and into CoordSystem-specific test files in test/unit/coord_systems/
- Create unit tests in the test_Saver.Test__create_cf_grid_mapping class for the following (these currently only have integration-style tests in test_Saver.test_write):
- Mercator
- Stereographic
- TransverseMercator
- Create unit test files in tests/unit/fileformats/pyke_rules/compiled_krb/fc_rules_cf_fc/ for the following (these currently only have integration-style tests in test_netcdf.TestNetCDFLoad):
- TransverseMercator
- GeogCS
- RotatedGeogCS
- LambertConformal
- LambertAzimuthalEqualArea
- AlbersEqualArea
- VerticalPerspective
- Geostationary