eccodes 2.46.0__tar.gz → 2.48.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 (129) hide show
  1. {eccodes-2.46.0 → eccodes-2.48.0}/CHANGELOG.rst +6 -0
  2. {eccodes-2.46.0 → eccodes-2.48.0}/PKG-INFO +7 -1
  3. {eccodes-2.46.0 → eccodes-2.48.0}/ci/requirements-docs.txt +3 -3
  4. {eccodes-2.46.0 → eccodes-2.48.0}/ci/requirements-tests.txt +1 -1
  5. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes.egg-info/PKG-INFO +7 -1
  6. {eccodes-2.46.0 → eccodes-2.48.0}/gribapi/bindings.py +1 -1
  7. {eccodes-2.46.0 → eccodes-2.48.0}/gribapi/grib_api.h +1 -0
  8. {eccodes-2.46.0 → eccodes-2.48.0}/gribapi/gribapi.py +7 -2
  9. {eccodes-2.46.0 → eccodes-2.48.0}/tests/test_eccodes.py +19 -0
  10. {eccodes-2.46.0 → eccodes-2.48.0}/tests/test_highlevel.py +1 -3
  11. {eccodes-2.46.0 → eccodes-2.48.0}/tox.ini +1 -1
  12. {eccodes-2.46.0 → eccodes-2.48.0}/.dockerignore +0 -0
  13. {eccodes-2.46.0 → eccodes-2.48.0}/CONTRIBUTING.rst +0 -0
  14. {eccodes-2.46.0 → eccodes-2.48.0}/Dockerfile +0 -0
  15. {eccodes-2.46.0 → eccodes-2.48.0}/LICENSE +0 -0
  16. {eccodes-2.46.0 → eccodes-2.48.0}/MANIFEST.in +0 -0
  17. {eccodes-2.46.0 → eccodes-2.48.0}/Makefile +0 -0
  18. {eccodes-2.46.0 → eccodes-2.48.0}/README.rst +0 -0
  19. {eccodes-2.46.0 → eccodes-2.48.0}/builder.py +0 -0
  20. {eccodes-2.46.0 → eccodes-2.48.0}/ci/requirements-dev.txt +0 -0
  21. {eccodes-2.46.0 → eccodes-2.48.0}/ci/requirements-docs.in +0 -0
  22. {eccodes-2.46.0 → eccodes-2.48.0}/ci/requirements-tests.in +0 -0
  23. {eccodes-2.46.0 → eccodes-2.48.0}/docs/_static/.gitkeep +0 -0
  24. {eccodes-2.46.0 → eccodes-2.48.0}/docs/conf.py +0 -0
  25. {eccodes-2.46.0 → eccodes-2.48.0}/docs/index.rst +0 -0
  26. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/__init__.py +0 -0
  27. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/__main__.py +0 -0
  28. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/eccodes.py +0 -0
  29. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/__init__.py +0 -0
  30. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/BUFR_Snippets.md +0 -0
  31. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/BUFR_Tour.md +0 -0
  32. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/__init__.py +0 -0
  33. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/coder.py +0 -0
  34. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/common.py +0 -0
  35. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/data.py +0 -0
  36. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/header.py +0 -0
  37. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/helpers.py +0 -0
  38. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/message.py +0 -0
  39. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/tables.py +0 -0
  40. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/tree.py +0 -0
  41. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/_bufr/view.py +0 -0
  42. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/message.py +0 -0
  43. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes/highlevel/reader.py +0 -0
  44. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes.egg-info/SOURCES.txt +0 -0
  45. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes.egg-info/dependency_links.txt +0 -0
  46. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes.egg-info/requires.txt +0 -0
  47. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes.egg-info/top_level.txt +0 -0
  48. {eccodes-2.46.0 → eccodes-2.48.0}/eccodes.egg-info/zip-safe +0 -0
  49. {eccodes-2.46.0 → eccodes-2.48.0}/gribapi/__init__.py +0 -0
  50. {eccodes-2.46.0 → eccodes-2.48.0}/gribapi/eccodes.h +0 -0
  51. {eccodes-2.46.0 → eccodes-2.48.0}/gribapi/errors.py +0 -0
  52. {eccodes-2.46.0 → eccodes-2.48.0}/setup.cfg +0 -0
  53. {eccodes-2.46.0 → eccodes-2.48.0}/setup.py +0 -0
  54. {eccodes-2.46.0 → eccodes-2.48.0}/tests/examples/__init__.py +0 -0
  55. {eccodes-2.46.0 → eccodes-2.48.0}/tests/examples/attributes.py +0 -0
  56. {eccodes-2.46.0 → eccodes-2.48.0}/tests/examples/items.py +0 -0
  57. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/acars.attributes +0 -0
  58. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/acars.bufr +0 -0
  59. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/acars.items +0 -0
  60. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/ahi-himawari-8.attributes +0 -0
  61. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/ahi-himawari-8.bufr +0 -0
  62. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/ahi-himawari-8.items +0 -0
  63. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amsu-a-noaa-19.attributes +0 -0
  64. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amsu-a-noaa-19.bufr +0 -0
  65. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amsu-a-noaa-19.items +0 -0
  66. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-goes-9.attributes +0 -0
  67. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-goes-9.bufr +0 -0
  68. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-goes-9.items +0 -0
  69. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-insat-3d.attributes +0 -0
  70. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-insat-3d.bufr +0 -0
  71. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-insat-3d.items +0 -0
  72. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-meteosat-9.attributes +0 -0
  73. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-meteosat-9.bufr +0 -0
  74. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-meteosat-9.items +0 -0
  75. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-noaa-20.attributes +0 -0
  76. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-noaa-20.bufr +0 -0
  77. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/amv-noaa-20.items +0 -0
  78. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/aura-omi-ak.attributes +0 -0
  79. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/aura-omi-ak.bufr +0 -0
  80. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/aura-omi-ak.items +0 -0
  81. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/buoy-drifting.attributes +0 -0
  82. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/buoy-drifting.bufr +0 -0
  83. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/buoy-drifting.items +0 -0
  84. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/era5-levels-members.grib +0 -0
  85. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/geos-abi-goes-16.attributes +0 -0
  86. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/geos-abi-goes-16.bufr +0 -0
  87. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/geos-abi-goes-16.items +0 -0
  88. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/geos-mviri-meteosat-7.attributes +0 -0
  89. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/geos-mviri-meteosat-7.bufr +0 -0
  90. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/geos-mviri-meteosat-7.items +0 -0
  91. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/hdob.attributes +0 -0
  92. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/hdob.bufr +0 -0
  93. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/hdob.items +0 -0
  94. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/rwp.attributes +0 -0
  95. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/rwp.bufr +0 -0
  96. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/rwp.items +0 -0
  97. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/rwp_jma.attributes +0 -0
  98. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/rwp_jma.bufr +0 -0
  99. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/rwp_jma.items +0 -0
  100. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/saral-altika.attributes +0 -0
  101. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/saral-altika.bufr +0 -0
  102. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/saral-altika.items +0 -0
  103. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/sral_sentinel_3a.attributes +0 -0
  104. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/sral_sentinel_3a.bufr +0 -0
  105. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/sral_sentinel_3a.items +0 -0
  106. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/synop.attributes +0 -0
  107. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/synop.bufr +0 -0
  108. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/synop.items +0 -0
  109. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/synop_multi_subset.attributes +0 -0
  110. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/synop_multi_subset.bufr +0 -0
  111. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/synop_multi_subset.items +0 -0
  112. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/temp.attributes +0 -0
  113. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/temp.bufr +0 -0
  114. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/temp.items +0 -0
  115. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/terra-modis-aerosol.attributes +0 -0
  116. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/terra-modis-aerosol.bufr +0 -0
  117. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/terra-modis-aerosol.items +0 -0
  118. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/tiggelam_cnmc_sfc.grib2 +0 -0
  119. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/wave.attributes +0 -0
  120. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/wave.bufr +0 -0
  121. {eccodes-2.46.0 → eccodes-2.48.0}/tests/sample-data/wave.items +0 -0
  122. {eccodes-2.46.0 → eccodes-2.48.0}/tests/test_20_main.py +0 -0
  123. {eccodes-2.46.0 → eccodes-2.48.0}/tests/test_20_messages.py +0 -0
  124. {eccodes-2.46.0 → eccodes-2.48.0}/tests/test_bufr_data.py +0 -0
  125. {eccodes-2.46.0 → eccodes-2.48.0}/tests/test_bufr_examples.py +0 -0
  126. {eccodes-2.46.0 → eccodes-2.48.0}/tests/test_bufr_header.py +0 -0
  127. {eccodes-2.46.0 → eccodes-2.48.0}/tests/test_bufr_helpers.py +0 -0
  128. {eccodes-2.46.0 → eccodes-2.48.0}/tests/test_bufr_message.py +0 -0
  129. {eccodes-2.46.0 → eccodes-2.48.0}/tests/test_bufr_workarounds.py +0 -0
@@ -2,6 +2,12 @@
2
2
  Changelog for eccodes-python
3
3
  ============================
4
4
 
5
+ 2.47.0 (2026-04-21)
6
+ --------------------
7
+
8
+ - Bump pygments from 2.15.0 to 2.20.0 in /ci (#164)
9
+ - Bump requests from 2.32.4 to 2.33.0 in /ci (#163)
10
+
5
11
  2.46.0 (2026-02-24)
6
12
  --------------------
7
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eccodes
3
- Version: 2.46.0
3
+ Version: 2.48.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)
@@ -243,6 +243,12 @@ does it submit to any jurisdiction.
243
243
  Changelog for eccodes-python
244
244
  ============================
245
245
 
246
+ 2.47.0 (2026-04-21)
247
+ --------------------
248
+
249
+ - Bump pygments from 2.15.0 to 2.20.0 in /ci (#164)
250
+ - Bump requests from 2.32.4 to 2.33.0 in /ci (#163)
251
+
246
252
  2.46.0 (2026-02-24)
247
253
  --------------------
248
254
 
@@ -24,7 +24,7 @@ markupsafe==2.1.5
24
24
  # via jinja2
25
25
  packaging==19.0
26
26
  # via sphinx
27
- pygments==2.15.0
27
+ pygments==2.20.0
28
28
  # via sphinx
29
29
  pyparsing==2.3.1
30
30
  # via packaging
@@ -32,7 +32,7 @@ pytest-runner==4.4
32
32
  # via -r requirements-docs.in
33
33
  pytz==2018.9
34
34
  # via babel
35
- requests==2.32.4
35
+ requests==2.33.0
36
36
  # via sphinx
37
37
  six==1.12.0
38
38
  # via
@@ -44,5 +44,5 @@ sphinx==1.8.5
44
44
  # via -r requirements-docs.in
45
45
  sphinxcontrib-websupport==1.1.0
46
46
  # via sphinx
47
- urllib3==2.6.3
47
+ urllib3==2.7.0
48
48
  # via requests
@@ -24,7 +24,7 @@ pluggy==0.9.0
24
24
  # via pytest
25
25
  pyflakes==2.1.1
26
26
  # via pytest-flakes
27
- pytest==4.3.1
27
+ pytest==9.0.3
28
28
  # via
29
29
  # -r requirements-tests.in
30
30
  # pytest-cache
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eccodes
3
- Version: 2.46.0
3
+ Version: 2.48.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)
@@ -243,6 +243,12 @@ does it submit to any jurisdiction.
243
243
  Changelog for eccodes-python
244
244
  ============================
245
245
 
246
+ 2.47.0 (2026-04-21)
247
+ --------------------
248
+
249
+ - Bump pygments from 2.15.0 to 2.20.0 in /ci (#164)
250
+ - Bump requests from 2.32.4 to 2.33.0 in /ci (#163)
251
+
246
252
  2.46.0 (2026-02-24)
247
253
  --------------------
248
254
 
@@ -23,7 +23,7 @@ import sys
23
23
 
24
24
  import cffi
25
25
 
26
- __version__ = "2.46.0"
26
+ __version__ = "2.48.0"
27
27
 
28
28
  LOG = logging.getLogger(__name__)
29
29
 
@@ -73,6 +73,7 @@ void grib_index_delete(grib_index* index);
73
73
  int grib_count_in_file(grib_context* c, FILE* f,int* n);
74
74
  grib_handle* grib_handle_new_from_file(grib_context* c, FILE* f, int* error);
75
75
  grib_handle* grib_handle_new_from_message_copy(grib_context* c, const void* data, size_t data_len);
76
+ grib_handle* grib_handle_new_from_partial_message_copy(grib_context* c, const void* data, size_t data_len);
76
77
  grib_handle* grib_handle_new_from_samples (grib_context* c, const char* sample_name);
77
78
  grib_handle* grib_handle_clone(const grib_handle* h);
78
79
  grib_handle* grib_handle_clone_headers_only(const grib_handle* h);
@@ -2403,7 +2403,7 @@ def grib_get_message(msgid):
2403
2403
 
2404
2404
 
2405
2405
  @require(message=(bytes, str, memoryview))
2406
- def grib_new_from_message(message):
2406
+ def grib_new_from_message(message, partial=False):
2407
2407
  """
2408
2408
  @brief Create a handle from a message in memory.
2409
2409
 
@@ -2421,7 +2421,12 @@ def grib_new_from_message(message):
2421
2421
  if isinstance(message, str):
2422
2422
  message = message.encode(ENC)
2423
2423
 
2424
- h = lib.grib_handle_new_from_message_copy(ffi.NULL, message, len(message))
2424
+ if partial:
2425
+ h = lib.grib_handle_new_from_partial_message_copy(
2426
+ ffi.NULL, message, len(message)
2427
+ )
2428
+ else:
2429
+ h = lib.grib_handle_new_from_message_copy(ffi.NULL, message, len(message))
2425
2430
  if h == ffi.NULL:
2426
2431
  raise errors.MessageInvalidError("new_from_message failed")
2427
2432
  return put_handle(h)
@@ -199,6 +199,25 @@ def test_new_from_message():
199
199
  # eccodes.codes_release(newgid)
200
200
 
201
201
 
202
+ def test_new_from_partial_message():
203
+ fpath = get_sample_fullpath("gg_sfc_grib2.tmpl")
204
+ if fpath is None:
205
+ return
206
+ with open(fpath, "rb") as f:
207
+ # Num bytes to read just for the meta-data
208
+ # SECTION_1 ( length = 21 )
209
+ # SECTION_2 ( length = 17 )
210
+ # SECTION_3 ( length = 264 )
211
+ # SECTION_4 ( length = 34 )
212
+ data = f.read(400)
213
+ newgid = eccodes.codes_new_from_message(data, partial=True)
214
+ assert eccodes.codes_get(newgid, "longitudeOfLastGridPoint") == 358125000
215
+ assert eccodes.codes_get(newgid, "gridType") == "reduced_gg"
216
+ assert eccodes.codes_get(newgid, "N") == 48
217
+ assert eccodes.codes_get(newgid, "Nj") == 96
218
+ eccodes.codes_release(newgid)
219
+
220
+
202
221
  def test_new_from_message_memoryview():
203
222
  # ECC-2081
204
223
  fpath = get_sample_fullpath("gg_sfc_grib1.tmpl")
@@ -46,9 +46,7 @@ def test_message_get():
46
46
  assert message["gridType:int"] == 0
47
47
  with pytest.raises(KeyError):
48
48
  message["invalid"]
49
- with pytest.raises(KeyError):
50
- message["gridSpec"]
51
- assert message.get("gridSpec", dummy_default) is dummy_default
49
+ # assert message.get("gridSpec", dummy_default) is dummy_default
52
50
  # keys set as MISSING
53
51
  assert message.is_missing(known_missing)
54
52
  assert message.get(known_missing) is None
@@ -2,7 +2,7 @@
2
2
  envlist = docs, py38, py37, py36, py35, pypy3, deps
3
3
 
4
4
  [testenv]
5
- passenv = WHEELHOUSE PIP_FIND_LINKS PIP_WHEEL_DIR PIP_INDEX_URL
5
+ passenv = WHEELHOUSE,PIP_FIND_LINKS,PIP_WHEEL_DIR,PIP_INDEX_URL
6
6
  setenv = PYTHONPATH = {toxinidir}
7
7
  deps = -r{toxinidir}/ci/requirements-tests.txt
8
8
  commands = pytest -v --flakes --cache-clear --basetemp={envtmpdir} {posargs}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes