eccodes 2.47.0__tar.gz → 2.49.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.47.0 → eccodes-2.49.0}/PKG-INFO +1 -1
  2. {eccodes-2.47.0 → eccodes-2.49.0}/ci/requirements-docs.txt +2 -2
  3. {eccodes-2.47.0 → eccodes-2.49.0}/ci/requirements-tests.txt +1 -1
  4. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/eccodes.py +2 -6
  5. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes.egg-info/PKG-INFO +1 -1
  6. {eccodes-2.47.0 → eccodes-2.49.0}/gribapi/bindings.py +1 -1
  7. {eccodes-2.47.0 → eccodes-2.49.0}/gribapi/grib_api.h +1 -0
  8. {eccodes-2.47.0 → eccodes-2.49.0}/gribapi/gribapi.py +7 -2
  9. {eccodes-2.47.0 → eccodes-2.49.0}/tests/test_eccodes.py +19 -0
  10. {eccodes-2.47.0 → eccodes-2.49.0}/.dockerignore +0 -0
  11. {eccodes-2.47.0 → eccodes-2.49.0}/CHANGELOG.rst +0 -0
  12. {eccodes-2.47.0 → eccodes-2.49.0}/CONTRIBUTING.rst +0 -0
  13. {eccodes-2.47.0 → eccodes-2.49.0}/Dockerfile +0 -0
  14. {eccodes-2.47.0 → eccodes-2.49.0}/LICENSE +0 -0
  15. {eccodes-2.47.0 → eccodes-2.49.0}/MANIFEST.in +0 -0
  16. {eccodes-2.47.0 → eccodes-2.49.0}/Makefile +0 -0
  17. {eccodes-2.47.0 → eccodes-2.49.0}/README.rst +0 -0
  18. {eccodes-2.47.0 → eccodes-2.49.0}/builder.py +0 -0
  19. {eccodes-2.47.0 → eccodes-2.49.0}/ci/requirements-dev.txt +0 -0
  20. {eccodes-2.47.0 → eccodes-2.49.0}/ci/requirements-docs.in +0 -0
  21. {eccodes-2.47.0 → eccodes-2.49.0}/ci/requirements-tests.in +0 -0
  22. {eccodes-2.47.0 → eccodes-2.49.0}/docs/_static/.gitkeep +0 -0
  23. {eccodes-2.47.0 → eccodes-2.49.0}/docs/conf.py +0 -0
  24. {eccodes-2.47.0 → eccodes-2.49.0}/docs/index.rst +0 -0
  25. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/__init__.py +0 -0
  26. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/__main__.py +0 -0
  27. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/__init__.py +0 -0
  28. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/BUFR_Snippets.md +0 -0
  29. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/BUFR_Tour.md +0 -0
  30. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/__init__.py +0 -0
  31. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/coder.py +0 -0
  32. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/common.py +1 -1
  33. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/data.py +0 -0
  34. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/header.py +0 -0
  35. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/helpers.py +0 -0
  36. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/message.py +0 -0
  37. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/tables.py +0 -0
  38. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/tree.py +0 -0
  39. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/_bufr/view.py +0 -0
  40. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/message.py +0 -0
  41. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes/highlevel/reader.py +0 -0
  42. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes.egg-info/SOURCES.txt +0 -0
  43. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes.egg-info/dependency_links.txt +0 -0
  44. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes.egg-info/requires.txt +0 -0
  45. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes.egg-info/top_level.txt +0 -0
  46. {eccodes-2.47.0 → eccodes-2.49.0}/eccodes.egg-info/zip-safe +0 -0
  47. {eccodes-2.47.0 → eccodes-2.49.0}/gribapi/__init__.py +0 -0
  48. {eccodes-2.47.0 → eccodes-2.49.0}/gribapi/eccodes.h +0 -0
  49. {eccodes-2.47.0 → eccodes-2.49.0}/gribapi/errors.py +0 -0
  50. {eccodes-2.47.0 → eccodes-2.49.0}/setup.cfg +0 -0
  51. {eccodes-2.47.0 → eccodes-2.49.0}/setup.py +0 -0
  52. {eccodes-2.47.0 → eccodes-2.49.0}/tests/examples/__init__.py +0 -0
  53. {eccodes-2.47.0 → eccodes-2.49.0}/tests/examples/attributes.py +0 -0
  54. {eccodes-2.47.0 → eccodes-2.49.0}/tests/examples/items.py +0 -0
  55. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/acars.attributes +0 -0
  56. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/acars.bufr +0 -0
  57. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/acars.items +0 -0
  58. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/ahi-himawari-8.attributes +0 -0
  59. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/ahi-himawari-8.bufr +0 -0
  60. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/ahi-himawari-8.items +0 -0
  61. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amsu-a-noaa-19.attributes +0 -0
  62. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amsu-a-noaa-19.bufr +0 -0
  63. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amsu-a-noaa-19.items +0 -0
  64. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-goes-9.attributes +0 -0
  65. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-goes-9.bufr +0 -0
  66. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-goes-9.items +0 -0
  67. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-insat-3d.attributes +0 -0
  68. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-insat-3d.bufr +0 -0
  69. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-insat-3d.items +0 -0
  70. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-meteosat-9.attributes +0 -0
  71. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-meteosat-9.bufr +0 -0
  72. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-meteosat-9.items +0 -0
  73. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-noaa-20.attributes +0 -0
  74. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-noaa-20.bufr +0 -0
  75. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/amv-noaa-20.items +0 -0
  76. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/aura-omi-ak.attributes +0 -0
  77. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/aura-omi-ak.bufr +0 -0
  78. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/aura-omi-ak.items +0 -0
  79. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/buoy-drifting.attributes +0 -0
  80. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/buoy-drifting.bufr +0 -0
  81. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/buoy-drifting.items +0 -0
  82. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/era5-levels-members.grib +0 -0
  83. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/geos-abi-goes-16.attributes +0 -0
  84. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/geos-abi-goes-16.bufr +0 -0
  85. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/geos-abi-goes-16.items +0 -0
  86. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/geos-mviri-meteosat-7.attributes +0 -0
  87. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/geos-mviri-meteosat-7.bufr +0 -0
  88. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/geos-mviri-meteosat-7.items +0 -0
  89. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/hdob.attributes +0 -0
  90. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/hdob.bufr +0 -0
  91. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/hdob.items +0 -0
  92. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/rwp.attributes +0 -0
  93. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/rwp.bufr +0 -0
  94. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/rwp.items +0 -0
  95. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/rwp_jma.attributes +0 -0
  96. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/rwp_jma.bufr +0 -0
  97. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/rwp_jma.items +0 -0
  98. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/saral-altika.attributes +0 -0
  99. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/saral-altika.bufr +0 -0
  100. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/saral-altika.items +0 -0
  101. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/sral_sentinel_3a.attributes +0 -0
  102. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/sral_sentinel_3a.bufr +0 -0
  103. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/sral_sentinel_3a.items +0 -0
  104. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/synop.attributes +0 -0
  105. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/synop.bufr +0 -0
  106. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/synop.items +0 -0
  107. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/synop_multi_subset.attributes +0 -0
  108. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/synop_multi_subset.bufr +0 -0
  109. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/synop_multi_subset.items +0 -0
  110. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/temp.attributes +0 -0
  111. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/temp.bufr +0 -0
  112. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/temp.items +0 -0
  113. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/terra-modis-aerosol.attributes +0 -0
  114. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/terra-modis-aerosol.bufr +0 -0
  115. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/terra-modis-aerosol.items +0 -0
  116. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/tiggelam_cnmc_sfc.grib2 +0 -0
  117. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/wave.attributes +0 -0
  118. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/wave.bufr +0 -0
  119. {eccodes-2.47.0 → eccodes-2.49.0}/tests/sample-data/wave.items +0 -0
  120. {eccodes-2.47.0 → eccodes-2.49.0}/tests/test_20_main.py +0 -0
  121. {eccodes-2.47.0 → eccodes-2.49.0}/tests/test_20_messages.py +0 -0
  122. {eccodes-2.47.0 → eccodes-2.49.0}/tests/test_bufr_data.py +0 -0
  123. {eccodes-2.47.0 → eccodes-2.49.0}/tests/test_bufr_examples.py +0 -0
  124. {eccodes-2.47.0 → eccodes-2.49.0}/tests/test_bufr_header.py +0 -0
  125. {eccodes-2.47.0 → eccodes-2.49.0}/tests/test_bufr_helpers.py +0 -0
  126. {eccodes-2.47.0 → eccodes-2.49.0}/tests/test_bufr_message.py +0 -0
  127. {eccodes-2.47.0 → eccodes-2.49.0}/tests/test_bufr_workarounds.py +0 -0
  128. {eccodes-2.47.0 → eccodes-2.49.0}/tests/test_highlevel.py +0 -0
  129. {eccodes-2.47.0 → eccodes-2.49.0}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eccodes
3
- Version: 2.47.0
3
+ Version: 2.49.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)
@@ -14,7 +14,7 @@ charset-normalizer==3.3.2
14
14
  # via requests
15
15
  docutils==0.14
16
16
  # via sphinx
17
- idna==3.7
17
+ idna==3.15
18
18
  # via requests
19
19
  imagesize==1.1.0
20
20
  # via sphinx
@@ -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
@@ -25,13 +25,9 @@ from gribapi import GRIB_MISSING_LONG as CODES_MISSING_LONG
25
25
  from gribapi import GRIB_NEAREST_SAME_DATA as CODES_GRIB_NEAREST_SAME_DATA
26
26
  from gribapi import GRIB_NEAREST_SAME_GRID as CODES_GRIB_NEAREST_SAME_GRID
27
27
  from gribapi import GRIB_NEAREST_SAME_POINT as CODES_GRIB_NEAREST_SAME_POINT
28
- from gribapi import (
29
- __version__,
30
- )
28
+ from gribapi import __version__
31
29
  from gribapi import any_new_from_file as codes_any_new_from_file
32
- from gribapi import (
33
- bindings_version,
34
- )
30
+ from gribapi import bindings_version
35
31
  from gribapi import bufr_new_from_file as codes_bufr_new_from_file
36
32
  from gribapi import (
37
33
  codes_any_new_from_samples,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: eccodes
3
- Version: 2.47.0
3
+ Version: 2.49.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,7 +23,7 @@ import sys
23
23
 
24
24
  import cffi
25
25
 
26
- __version__ = "2.47.0"
26
+ __version__ = "2.49.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")
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
@@ -33,8 +33,8 @@ import numpy as np
33
33
  from numpy.ma import MaskedArray # noqa
34
34
  from numpy.typing import DTypeLike, NDArray # noqa
35
35
 
36
- from eccodes.eccodes import KeyValueNotFoundError as NotFoundError
37
36
  from eccodes.eccodes import * # noqa
37
+ from eccodes.eccodes import KeyValueNotFoundError as NotFoundError
38
38
 
39
39
  from .tables import Element
40
40
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes