ecmwf / eccodes-python

Python interface to the ecCodes GRIB/BUFR decoder/encoder
Apache License 2.0
113 stars 33 forks source link

Update min_recommended_version for eccodes #82

Closed zklaus closed 11 months ago

zklaus commented 1 year ago

What happened?

Version 1.6.0 added codes_bufr_key_is_coordinate in https://github.com/ecmwf/eccodes-python/commit/880855c00a1ec7da62d5c2d9af20fb94d36cfb39.

This was added to Eccodes only in version 2.31.0, c.f. ECC-1611.

Consequently, the min_recommended_version should be updated in https://github.com/ecmwf/eccodes-python/blob/66e7666b3cbc89cb60717741470c9a2061a5705b/gribapi/__init__.py#L17

With older versions installed, we get runtime linker errors such as

ImportError: /opt/conda/envs/esmvaltool/lib/python3.11/site-packages/gribapi/_bindings.cpython-311-x86_64-linux-gnu.so: undefined symbol: codes_bufr_key_is_coordinate

What are the steps to reproduce the bug?

Version

v1.6.0

Platform (OS and architecture)

Linux

Relevant log output

No response

Accompanying data

No response

Organisation

No response

shahramn commented 11 months ago

We do have some GitHub actions which use the ecCodes library as old as 2.27.0 and all the tests pass. No errors on import For example see https://github.com/ecmwf/eccodes-python/actions/runs/6235294400/job/16924240979

zklaus commented 11 months ago

Thanks for following up. Which test imports gribapi? I could not find any.

Note that it is the minimum recommended version for gribapi (after all, it is in gribapi/__init__.py) and that the error shows up when you do import gribapi (c.f. "[...] steps to reproduce [...]" above).

shahramn commented 11 months ago

OK I will update the minimum recommended version to 2.31.0 Many thanks