ECC-2102: Improved high-level interface for BUFR - #134
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #134 +/- ##
===========================================
- Coverage 33.93% 29.55% -4.39%
===========================================
Files 16 34 +18
Lines 2705 6101 +3396
Branches 201 734 +533
===========================================
+ Hits 918 1803 +885
- Misses 1768 4276 +2508
- Partials 19 22 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@tomas-kral But if the environment variable ECCODES_DEFINITION_PATH is defined then this would fail. The function So if you want to the get the full file path of a given BUFR element.def file, you should call Where the first argument can be NULL and the basename argument would be: |
|
Ah, I see, haven't thought of that. Okay, no problem, let me try calling the other function then. Thanks for the tip by the way! |
Description
This PR is an overhaul of the high-level interface for working with BUFR files.
Some of the highlights of this new implementation are:
as_dict()for inspecting the contents of BUFR messages,get_datetime()which combines values date/time-related keys intonp.datetime64objects,copy(subsets=...)to extract subsets from messages based on different criteria, etc.Also, you may notice that there are several workarounds (especially in the Coder class) for some of the known (and documented) shortcomings of the ecCodes library when it comes to BUFR en/decoding. These workarounds were necessary in order to provide more consistent behaviour and get rid of some of the wards in the low-level API.