Skip to content

Commit b55eb1b

Browse files
committed
Release 2.41.0
2 parents a5fe1ff + b4e52b0 commit b55eb1b

File tree

17 files changed

+89
-23
lines changed

17 files changed

+89
-23
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ jobs:
2929
secrets: inherit
3030
pypi:
3131
needs: [wheel-linux, wheel-macos, wheel-windows]
32-
uses: ecmwf-actions/reusable-workflows/.github/workflows/cd-pypi.yml@v2
32+
uses: ecmwf/reusable-workflows/.github/workflows/cd-pypi.yml@v2
3333
secrets: inherit
3434

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
downstream-ci:
2929
name: downstream-ci
3030
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
31-
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci.yml@main
31+
uses: ecmwf/downstream-ci/.github/workflows/downstream-ci.yml@main
3232
with:
3333
eccodes-python: ecmwf/eccodes-python@${{ github.event.pull_request.head.sha || github.sha }}
3434
codecov_upload: true
@@ -39,7 +39,7 @@ jobs:
3939
downstream-ci-hpc:
4040
name: downstream-ci-hpc
4141
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
42-
uses: ecmwf-actions/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
42+
uses: ecmwf/downstream-ci/.github/workflows/downstream-ci-hpc.yml@main
4343
with:
4444
eccodes-python: ecmwf/eccodes-python@${{ github.event.pull_request.head.sha || github.sha }}
4545
secrets: inherit

.github/workflows/label-public-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ on:
77

88
jobs:
99
label:
10-
uses: ecmwf-actions/reusable-workflows/.github/workflows/label-pr.yml@v2
10+
uses: ecmwf/reusable-workflows/.github/workflows/label-pr.yml@v2

.github/workflows/reusable-ci-hpc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
jobs:
1414
ci-hpc:
1515
name: ci-hpc
16-
uses: ecmwf-actions/reusable-workflows/.github/workflows/ci-hpc.yml@v2
16+
uses: ecmwf/reusable-workflows/.github/workflows/ci-hpc.yml@v2
1717
with:
1818
name-prefix: eccodes-python-
1919
build-inputs: |

.github/workflows/sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# It will correctly handle addition of any new and removal of existing Git objects.
1818
sync:
1919
name: sync
20-
uses: ecmwf-actions/reusable-workflows/.github/workflows/sync.yml@v2
20+
uses: ecmwf/reusable-workflows/.github/workflows/sync.yml@v2
2121
secrets:
2222
target_repository: eccodes/eccodes-python
2323
target_username: ClonedDuck

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
Changelog for eccodes-python
33
============================
44

5+
2.41.0 (2025-04-10)
6+
--------------------
7+
8+
- ECC-2034: GRIB encoding: Data quality checks via the API
9+
- GitHub pull request #124: Add basic BUFR support (high-level interface)
10+
11+
512
2.40.1 (2025-03-17)
613
--------------------
714

ci/requirements-docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ idna==3.7
1818
# via requests
1919
imagesize==1.1.0
2020
# via sphinx
21-
jinja2==3.1.5
21+
jinja2==3.1.6
2222
# via sphinx
2323
markupsafe==2.1.5
2424
# via jinja2

eccodes/eccodes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
from gribapi import grib_release as codes_release
133133
from gribapi import grib_set as codes_set
134134
from gribapi import grib_set_array as codes_set_array
135+
from gribapi import grib_set_data_quality_checks as codes_set_data_quality_checks
135136
from gribapi import grib_set_debug as codes_set_debug
136137
from gribapi import grib_set_definitions_path as codes_set_definitions_path
137138
from gribapi import grib_set_double as codes_set_double
@@ -348,6 +349,7 @@
348349
"codes_samples_path",
349350
"codes_dump",
350351
"codes_set_array",
352+
"codes_set_data_quality_checks",
351353
"codes_set_debug",
352354
"codes_set_definitions_path",
353355
"codes_set_double_array",

eccodes/highlevel/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
from .message import GRIBMessage, Message # noqa
1+
from .message import BUFRMessage, GRIBMessage, Message # noqa
22
from .reader import FileReader, MemoryReader, StreamReader # noqa

eccodes/highlevel/message.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __del__(self):
3333

3434
def copy(self):
3535
"""Create a copy of the current message"""
36-
return Message(eccodes.codes_clone(self._handle))
36+
return self.__class__(eccodes.codes_clone(self._handle))
3737

3838
def __copy__(self):
3939
return self.copy()
@@ -242,6 +242,24 @@ def get_buffer(self):
242242
return eccodes.codes_get_message(self._handle)
243243

244244

245+
class BUFRMessage(Message):
246+
def __init__(self, handle):
247+
super().__init__(handle)
248+
249+
def pack(self):
250+
"""Pack the underlying data"""
251+
self.set("pack", 1, check_values=False)
252+
253+
def unpack(self):
254+
"""Unpack the underlying data"""
255+
self.set("unpack", 1, check_values=False)
256+
257+
@classmethod
258+
def from_samples(cls, name):
259+
"""Create a message from a sample"""
260+
return cls(eccodes.codes_bufr_new_from_samples(name))
261+
262+
245263
class GRIBMessage(Message):
246264
def __init__(self, handle):
247265
super().__init__(handle)

0 commit comments

Comments
 (0)