NOAA-EMC / NCEPLIBS-g2c

This library contains C decoder/encoder routines for GRIB edition 2.
Other
18 stars 11 forks source link

adding testing for degrib2 internal functions formatting date/time and level information #377

Closed edwardhartnett closed 1 year ago

edwardhartnett commented 1 year ago

Part of #320.

More testing for the internal functions of g2c_degrib2().

edwardhartnett commented 1 year ago

These tests are ready to review and merge. More tests coming in future PRs...

edwardhartnett commented 1 year ago

WRT function names, all exposed names should start with some abbreviation of the library name, for exactly the reason you mention.

However we have a bunch of existing functions which we must keep for backward compatibility. Some of them start with "g2_", but many do not, like getdim(), which could certainly occur already in another library or user code. But we just have to live with that.

All new functions will start with "g2c_" unless they are static functions (i.e. only visible in the file where they are defined). This means that any function we want to test must be exposed, which is unfortunate, but we live with it.

We handle this with two header files, grib2,h, which contains the "public" API, and gtib2_int.h ("int" for internal), which contains the "private" API.