eccodes 2.42.0__tar.gz → 2.44.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. {eccodes-2.42.0 → eccodes-2.44.0}/CHANGELOG.rst +14 -0
  2. {eccodes-2.42.0 → eccodes-2.44.0}/PKG-INFO +64 -18
  3. {eccodes-2.42.0 → eccodes-2.44.0}/README.rst +48 -17
  4. {eccodes-2.42.0 → eccodes-2.44.0}/eccodes/eccodes.py +4 -0
  5. eccodes-2.44.0/eccodes/highlevel/__init__.py +3 -0
  6. eccodes-2.44.0/eccodes/highlevel/_bufr/__init__.py +15 -0
  7. eccodes-2.44.0/eccodes/highlevel/_bufr/coder.py +751 -0
  8. eccodes-2.44.0/eccodes/highlevel/_bufr/common.py +288 -0
  9. eccodes-2.44.0/eccodes/highlevel/_bufr/data.py +618 -0
  10. eccodes-2.44.0/eccodes/highlevel/_bufr/header.py +313 -0
  11. eccodes-2.44.0/eccodes/highlevel/_bufr/helpers.py +537 -0
  12. eccodes-2.44.0/eccodes/highlevel/_bufr/message.py +427 -0
  13. eccodes-2.44.0/eccodes/highlevel/_bufr/tables.py +267 -0
  14. eccodes-2.44.0/eccodes/highlevel/_bufr/tree.py +604 -0
  15. eccodes-2.44.0/eccodes/highlevel/_bufr/view.py +118 -0
  16. {eccodes-2.42.0 → eccodes-2.44.0}/eccodes/highlevel/message.py +2 -18
  17. {eccodes-2.42.0 → eccodes-2.44.0}/eccodes/highlevel/reader.py +11 -2
  18. {eccodes-2.42.0 → eccodes-2.44.0}/eccodes.egg-info/PKG-INFO +64 -18
  19. {eccodes-2.42.0 → eccodes-2.44.0}/eccodes.egg-info/SOURCES.txt +19 -0
  20. eccodes-2.44.0/eccodes.egg-info/requires.txt +7 -0
  21. {eccodes-2.42.0 → eccodes-2.44.0}/gribapi/__init__.py +2 -2
  22. {eccodes-2.42.0 → eccodes-2.44.0}/gribapi/bindings.py +2 -2
  23. {eccodes-2.42.0 → eccodes-2.44.0}/gribapi/errors.py +5 -0
  24. {eccodes-2.42.0 → eccodes-2.44.0}/gribapi/grib_api.h +4 -0
  25. {eccodes-2.42.0 → eccodes-2.44.0}/gribapi/gribapi.py +22 -0
  26. {eccodes-2.42.0 → eccodes-2.44.0}/setup.py +6 -1
  27. eccodes-2.44.0/tests/examples/__init__.py +0 -0
  28. eccodes-2.44.0/tests/examples/attributes.py +45 -0
  29. eccodes-2.44.0/tests/examples/items.py +49 -0
  30. eccodes-2.44.0/tests/test_bufr_data.py +334 -0
  31. eccodes-2.44.0/tests/test_bufr_examples.py +85 -0
  32. eccodes-2.44.0/tests/test_bufr_header.py +104 -0
  33. eccodes-2.44.0/tests/test_bufr_helpers.py +232 -0
  34. eccodes-2.44.0/tests/test_bufr_message.py +455 -0
  35. eccodes-2.44.0/tests/test_bufr_workarounds.py +117 -0
  36. {eccodes-2.42.0 → eccodes-2.44.0}/tests/test_eccodes.py +62 -6
  37. {eccodes-2.42.0 → eccodes-2.44.0}/tests/test_highlevel.py +64 -0
  38. {eccodes-2.42.0 → eccodes-2.44.0}/tox.ini +1 -0
  39. eccodes-2.42.0/eccodes/highlevel/__init__.py +0 -2
  40. eccodes-2.42.0/eccodes.egg-info/requires.txt +0 -4
  41. {eccodes-2.42.0 → eccodes-2.44.0}/.dockerignore +0 -0
  42. {eccodes-2.42.0 → eccodes-2.44.0}/CONTRIBUTING.rst +0 -0
  43. {eccodes-2.42.0 → eccodes-2.44.0}/Dockerfile +0 -0
  44. {eccodes-2.42.0 → eccodes-2.44.0}/LICENSE +0 -0
  45. {eccodes-2.42.0 → eccodes-2.44.0}/MANIFEST.in +0 -0
  46. {eccodes-2.42.0 → eccodes-2.44.0}/Makefile +0 -0
  47. {eccodes-2.42.0 → eccodes-2.44.0}/builder.py +0 -0
  48. {eccodes-2.42.0 → eccodes-2.44.0}/ci/requirements-dev.txt +0 -0
  49. {eccodes-2.42.0 → eccodes-2.44.0}/ci/requirements-docs.in +0 -0
  50. {eccodes-2.42.0 → eccodes-2.44.0}/ci/requirements-docs.txt +0 -0
  51. {eccodes-2.42.0 → eccodes-2.44.0}/ci/requirements-tests.in +0 -0
  52. {eccodes-2.42.0 → eccodes-2.44.0}/ci/requirements-tests.txt +0 -0
  53. {eccodes-2.42.0 → eccodes-2.44.0}/docs/_static/.gitkeep +0 -0
  54. {eccodes-2.42.0 → eccodes-2.44.0}/docs/conf.py +0 -0
  55. {eccodes-2.42.0 → eccodes-2.44.0}/docs/index.rst +0 -0
  56. {eccodes-2.42.0 → eccodes-2.44.0}/eccodes/__init__.py +0 -0
  57. {eccodes-2.42.0 → eccodes-2.44.0}/eccodes/__main__.py +0 -0
  58. {eccodes-2.42.0 → eccodes-2.44.0}/eccodes.egg-info/dependency_links.txt +0 -0
  59. {eccodes-2.42.0 → eccodes-2.44.0}/eccodes.egg-info/top_level.txt +0 -0
  60. {eccodes-2.42.0 → eccodes-2.44.0}/eccodes.egg-info/zip-safe +0 -0
  61. {eccodes-2.42.0 → eccodes-2.44.0}/gribapi/eccodes.h +0 -0
  62. {eccodes-2.42.0 → eccodes-2.44.0}/setup.cfg +0 -0
  63. {eccodes-2.42.0 → eccodes-2.44.0}/tests/sample-data/era5-levels-members.grib +0 -0
  64. {eccodes-2.42.0 → eccodes-2.44.0}/tests/sample-data/tiggelam_cnmc_sfc.grib2 +0 -0
  65. {eccodes-2.42.0 → eccodes-2.44.0}/tests/test_20_main.py +0 -0
  66. {eccodes-2.42.0 → eccodes-2.44.0}/tests/test_20_messages.py +0 -0
@@ -2,6 +2,20 @@
2
2
  Changelog for eccodes-python
3
3
  ============================
4
4
 
5
+ 2.44.0 (2025-10-03)
6
+ --------------------
7
+
8
+ - ECC-2102: Improved high-level interface for BUFR
9
+ - ECC-2108: Implement a way of switching off error output to stderr
10
+ - GitHub pull request #129: Update MemoryReader to read more than one field
11
+
12
+
13
+ 2.43.0 (2025-07-24)
14
+ --------------------
15
+
16
+ - ECC-2106: Use eccodeslib instead of own-built binaries
17
+
18
+
5
19
  2.42.0 (2025-06-25)
6
20
  --------------------
7
21
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eccodes
3
- Version: 2.42.0
3
+ Version: 2.44.0
4
4
  Summary: Python interface to the ecCodes GRIB and BUFR decoder/encoder
5
5
  Home-page: https://github.com/ecmwf/eccodes-python
6
6
  Author: European Centre for Medium-Range Weather Forecasts (ECMWF)
@@ -23,6 +23,7 @@ Requires-Dist: numpy
23
23
  Requires-Dist: attrs
24
24
  Requires-Dist: cffi
25
25
  Requires-Dist: findlibs
26
+ Requires-Dist: eccodeslib; platform_system != "Windows"
26
27
  Dynamic: author
27
28
  Dynamic: author-email
28
29
  Dynamic: classifier
@@ -60,8 +61,11 @@ Limitations:
60
61
  Installation
61
62
  ============
62
63
 
63
- **From version 2.37.0, the ecCodes Python bindings on PyPi additionally provide the ecCodes binary library, and will
64
- follow the version numbering of the ecCodes binary library. See below for details.**
64
+ **From version 2.43.0, the ecCodes Python bindings on PyPi will depend
65
+ on the PyPi package 'eccodeslib' on Linux and MacOS. This package provides
66
+ the binary ecCodes library. On Windows, the ecCodes Python bindings will
67
+ continue to directly provide the ecCodes binary library without a dependency
68
+ on eccodeslib. See below for details.**
65
69
 
66
70
  Installation from PyPI
67
71
  ----------------------
@@ -70,17 +74,38 @@ The package can be installed from PyPI with::
70
74
 
71
75
  $ pip install eccodes
72
76
 
73
- This installation will, by default, include the ecCodes binary library (as of version 2.37.0), meaning that no
74
- external ecCodes binary library is required. If you have an external ecCodes binary library that you wish to use,
75
- set the following environment variable before you import eccodes::
77
+ This installation will, by default, include the ecCodes binary library (either
78
+ supplied by the 'eccodes' package on Windows, or via the 'eccodeslib' package
79
+ on Linux and MacOS), meaning that no external ecCodes binary library is
80
+ required.
81
+
82
+
83
+ Bypassing the provided binary library
84
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85
+
86
+ Linux and MacOS
87
+ +++++++++++++++
88
+
89
+ If you have an external ecCodes binary library that you wish to use, consult the documentation
90
+ of the `findlibs <https://github.com/ecmwf/findlibs>`_ package, which is used by the ecCodes Python bindings to
91
+ locate the binary library. This allows the use of environment variables
92
+ to refine the search algorithm.
93
+
94
+
95
+ Windows
96
+ +++++++
97
+
98
+ If you have an external ecCodes binary library that you wish to use, set the
99
+ following environment variable before you import eccodes::
76
100
 
77
101
  $ export ECCODES_PYTHON_USE_FINDLIBS=1
78
102
 
79
103
  If this is set, the ecCodes' Python bindings will use the `findlibs <https://github.com/ecmwf/findlibs>`_ package
80
- to locate the binary library (findlibs was the only mechanism used before version 2.37.0).
81
-
82
- You may also install a version of ecCodes' Python interface that does not include a binary library at all,
83
- in which case the findlibs mechanism will be used as before::
104
+ to locate the binary library.
105
+
106
+ You may also install a version of ecCodes' Python interface that does not
107
+ include a binary library at all, in which case the findlibs mechanism will
108
+ be used as before::
84
109
 
85
110
  $ pip install eccodes --no-binary eccodes
86
111
 
@@ -94,15 +119,18 @@ ecCodes' Python bindings can be installed from the `conda-forge <https://conda-f
94
119
 
95
120
  $ conda install -c conda-forge python-eccodes
96
121
 
97
- This will install the Python bindings (`python-eccodes`) and also the ecCodes binary library (`eccodes`) on which they depend.
122
+ This will install the Python bindings (`python-eccodes`) and also the ecCodes
123
+ binary library (`eccodes`) on which they depend.
98
124
 
99
125
 
100
126
  System dependencies
101
127
  -------------------
102
128
 
103
- The Python module depends on the ECMWF *ecCodes* binary library. From version 2.37.0, this library is supplied with
104
- the Python module on both PyPi and conda, as described above. If you wish to install and use a separate binary library
105
- (see above), it must be installed on the system and accessible as a shared library.
129
+ The Python module depends on the ECMWF *ecCodes* binary library.
130
+ From version 2.37.0, this library is supplied with the Python
131
+ module on both PyPi and conda, as described above. If you wish
132
+ to install and use a separate binary library (see above), it must
133
+ be installed on the system and accessible as a shared library.
106
134
 
107
135
  On a MacOS with HomeBrew use::
108
136
 
@@ -116,18 +144,19 @@ As an alternative you may install the official source distribution
116
144
  by following the instructions at
117
145
  https://confluence.ecmwf.int/display/ECC/ecCodes+installation
118
146
 
119
- You may run a simple selfcheck command to ensure that your system is set up correctly::
147
+ You may run a simple selfcheck command to ensure that your system is set
148
+ up correctly::
120
149
 
121
150
  $ python -m eccodes selfcheck
122
- Found: ecCodes v2.39.0.
151
+ Found: ecCodes v2.42.0.
123
152
  Your system is ready.
124
153
 
125
154
 
126
155
  Debugging the library search
127
156
  ----------------------------
128
157
 
129
- In order to gain insights into the search for the binary library, set the following environment variable before
130
- importing eccodes::
158
+ In order to gain insights into the search for the binary library, set
159
+ the following environment variable before importing eccodes::
131
160
 
132
161
  $ export ECCODES_PYTHON_TRACE_LIB_SEARCH=1
133
162
 
@@ -135,6 +164,9 @@ importing eccodes::
135
164
  Usage
136
165
  -----
137
166
 
167
+ See examples of how to use the high-level BUFR interface: `BUFR_Tour.md <eccodes/highlevel/_bufr/BUFR_Tour.md>`_
168
+ and `BUFR_Snippets.md <eccodes/highlevel/_bufr/BUFR_Snippets.md>`_.
169
+
138
170
  Refer to the *ecCodes* `documentation pages <https://confluence.ecmwf.int/display/ECC/Documentation>`_
139
171
  for usage.
140
172
 
@@ -210,6 +242,20 @@ does it submit to any jurisdiction.
210
242
  Changelog for eccodes-python
211
243
  ============================
212
244
 
245
+ 2.44.0 (2025-10-03)
246
+ --------------------
247
+
248
+ - ECC-2102: Improved high-level interface for BUFR
249
+ - ECC-2108: Implement a way of switching off error output to stderr
250
+ - GitHub pull request #129: Update MemoryReader to read more than one field
251
+
252
+
253
+ 2.43.0 (2025-07-24)
254
+ --------------------
255
+
256
+ - ECC-2106: Use eccodeslib instead of own-built binaries
257
+
258
+
213
259
  2.42.0 (2025-06-25)
214
260
  --------------------
215
261
 
@@ -24,8 +24,11 @@ Limitations:
24
24
  Installation
25
25
  ============
26
26
 
27
- **From version 2.37.0, the ecCodes Python bindings on PyPi additionally provide the ecCodes binary library, and will
28
- follow the version numbering of the ecCodes binary library. See below for details.**
27
+ **From version 2.43.0, the ecCodes Python bindings on PyPi will depend
28
+ on the PyPi package 'eccodeslib' on Linux and MacOS. This package provides
29
+ the binary ecCodes library. On Windows, the ecCodes Python bindings will
30
+ continue to directly provide the ecCodes binary library without a dependency
31
+ on eccodeslib. See below for details.**
29
32
 
30
33
  Installation from PyPI
31
34
  ----------------------
@@ -34,17 +37,38 @@ The package can be installed from PyPI with::
34
37
 
35
38
  $ pip install eccodes
36
39
 
37
- This installation will, by default, include the ecCodes binary library (as of version 2.37.0), meaning that no
38
- external ecCodes binary library is required. If you have an external ecCodes binary library that you wish to use,
39
- set the following environment variable before you import eccodes::
40
+ This installation will, by default, include the ecCodes binary library (either
41
+ supplied by the 'eccodes' package on Windows, or via the 'eccodeslib' package
42
+ on Linux and MacOS), meaning that no external ecCodes binary library is
43
+ required.
44
+
45
+
46
+ Bypassing the provided binary library
47
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
+
49
+ Linux and MacOS
50
+ +++++++++++++++
51
+
52
+ If you have an external ecCodes binary library that you wish to use, consult the documentation
53
+ of the `findlibs <https://github.com/ecmwf/findlibs>`_ package, which is used by the ecCodes Python bindings to
54
+ locate the binary library. This allows the use of environment variables
55
+ to refine the search algorithm.
56
+
57
+
58
+ Windows
59
+ +++++++
60
+
61
+ If you have an external ecCodes binary library that you wish to use, set the
62
+ following environment variable before you import eccodes::
40
63
 
41
64
  $ export ECCODES_PYTHON_USE_FINDLIBS=1
42
65
 
43
66
  If this is set, the ecCodes' Python bindings will use the `findlibs <https://github.com/ecmwf/findlibs>`_ package
44
- to locate the binary library (findlibs was the only mechanism used before version 2.37.0).
45
-
46
- You may also install a version of ecCodes' Python interface that does not include a binary library at all,
47
- in which case the findlibs mechanism will be used as before::
67
+ to locate the binary library.
68
+
69
+ You may also install a version of ecCodes' Python interface that does not
70
+ include a binary library at all, in which case the findlibs mechanism will
71
+ be used as before::
48
72
 
49
73
  $ pip install eccodes --no-binary eccodes
50
74
 
@@ -58,15 +82,18 @@ ecCodes' Python bindings can be installed from the `conda-forge <https://conda-f
58
82
 
59
83
  $ conda install -c conda-forge python-eccodes
60
84
 
61
- This will install the Python bindings (`python-eccodes`) and also the ecCodes binary library (`eccodes`) on which they depend.
85
+ This will install the Python bindings (`python-eccodes`) and also the ecCodes
86
+ binary library (`eccodes`) on which they depend.
62
87
 
63
88
 
64
89
  System dependencies
65
90
  -------------------
66
91
 
67
- The Python module depends on the ECMWF *ecCodes* binary library. From version 2.37.0, this library is supplied with
68
- the Python module on both PyPi and conda, as described above. If you wish to install and use a separate binary library
69
- (see above), it must be installed on the system and accessible as a shared library.
92
+ The Python module depends on the ECMWF *ecCodes* binary library.
93
+ From version 2.37.0, this library is supplied with the Python
94
+ module on both PyPi and conda, as described above. If you wish
95
+ to install and use a separate binary library (see above), it must
96
+ be installed on the system and accessible as a shared library.
70
97
 
71
98
  On a MacOS with HomeBrew use::
72
99
 
@@ -80,18 +107,19 @@ As an alternative you may install the official source distribution
80
107
  by following the instructions at
81
108
  https://confluence.ecmwf.int/display/ECC/ecCodes+installation
82
109
 
83
- You may run a simple selfcheck command to ensure that your system is set up correctly::
110
+ You may run a simple selfcheck command to ensure that your system is set
111
+ up correctly::
84
112
 
85
113
  $ python -m eccodes selfcheck
86
- Found: ecCodes v2.39.0.
114
+ Found: ecCodes v2.42.0.
87
115
  Your system is ready.
88
116
 
89
117
 
90
118
  Debugging the library search
91
119
  ----------------------------
92
120
 
93
- In order to gain insights into the search for the binary library, set the following environment variable before
94
- importing eccodes::
121
+ In order to gain insights into the search for the binary library, set
122
+ the following environment variable before importing eccodes::
95
123
 
96
124
  $ export ECCODES_PYTHON_TRACE_LIB_SEARCH=1
97
125
 
@@ -99,6 +127,9 @@ importing eccodes::
99
127
  Usage
100
128
  -----
101
129
 
130
+ See examples of how to use the high-level BUFR interface: `BUFR_Tour.md <eccodes/highlevel/_bufr/BUFR_Tour.md>`_
131
+ and `BUFR_Snippets.md <eccodes/highlevel/_bufr/BUFR_Snippets.md>`_.
132
+
102
133
  Refer to the *ecCodes* `documentation pages <https://confluence.ecmwf.int/display/ECC/Documentation>`_
103
134
  for usage.
104
135
 
@@ -61,6 +61,7 @@ from gribapi import (
61
61
  )
62
62
  from gribapi import grib_clone as codes_clone
63
63
  from gribapi import grib_context_delete as codes_context_delete
64
+ from gribapi import grib_context_set_logging as codes_context_set_logging
64
65
  from gribapi import grib_copy_namespace as codes_copy_namespace
65
66
  from gribapi import grib_count_in_file as codes_count_in_file
66
67
  from gribapi import grib_find_nearest as codes_grib_find_nearest
@@ -211,6 +212,7 @@ from gribapi.errors import (
211
212
  OutOfRangeError,
212
213
  PrematureEndOfFileError,
213
214
  ReadOnlyError,
215
+ RuntimeError,
214
216
  StringTooSmallError,
215
217
  SwitchNoMatchError,
216
218
  TooManyAttributesError,
@@ -371,6 +373,7 @@ __all__ = [
371
373
  "codes_skip_read_only",
372
374
  "codes_write",
373
375
  "codes_context_delete",
376
+ "codes_context_set_logging",
374
377
  "CodesInternalError",
375
378
  "ConceptNoMatchError",
376
379
  "ConstantFieldError",
@@ -420,6 +423,7 @@ __all__ = [
420
423
  "OutOfRangeError",
421
424
  "PrematureEndOfFileError",
422
425
  "ReadOnlyError",
426
+ "RuntimeError",
423
427
  "StringTooSmallError",
424
428
  "SwitchNoMatchError",
425
429
  "TooManyAttributesError",
@@ -0,0 +1,3 @@
1
+ from ._bufr import BUFRMessage # noqa
2
+ from .message import GRIBMessage, Message # noqa
3
+ from .reader import FileReader, MemoryReader, StreamReader # noqa
@@ -0,0 +1,15 @@
1
+ """
2
+ A High-level interface for en/decoding of BUFR files.
3
+ """
4
+
5
+ from .common import change_behaviour, get_behaviour, set_behaviour
6
+ from .helpers import missing_of
7
+ from .message import BUFRMessage
8
+
9
+ __all__ = [
10
+ "change_behaviour",
11
+ "get_behaviour",
12
+ "set_behaviour",
13
+ "missing_of",
14
+ "BUFRMessage",
15
+ ]