Closed charles-turner-1 closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.17%. Comparing base (
761e7f4
) to head (d8dfe1e
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Closes #186, and builds on #221 .
Changes:
Added two new dataclasses to
src/access_nri_intake/source/utils.py
:_VarInfo
: Dataclass that holds information related to a single variable in a given netCDF file: lists of variable names, cell methods, units ,etc, which default to empty lists. It also contains a method to append to these lists (append_attrs
), and a method to dump its contents to a dictionary (to_var_info_dict
), which is used in the constructor of_AccessNCFileInfo
._AccessNCFileInfo
: Dataclass to hold information from the netCDF file, containing information about all fields in the netCDF, as well as filename, path, etc. It also has ato_dict
method which dumps the dataclass to a dictionary, following patterns previously used in parser methods of the different builers.