-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to read "step" with ecCodes 2.34.0 #370
Comments
I have created a PR that should resolve this issue. Due to the already present support in cfgrib for dealing with various units for "endStep", I believe no further changes are required at this point to be compatible with ecCodes' new sub-hourly support. Note that requesting "endStep" as an integer does not lose any information regarding its unit, as the accompanying unit is requested as well ("stepUnits"). Also note that while ecCodes may expose "endStep" in a different unit than the one encoded in the GRIB file, the accompanying "stepUnits" value is changed accordingly, preventing any issues. To get the original time unit, "indicatorOfUnitOfTimeRange" should be read instead. To get the original time value, "forecastTime" should be read. |
…391) Bumps the python-dependencies group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [xarray](https://github.com/pydata/xarray) | `2024.3.0` | `2024.6.0` | | [netcdf4](https://github.com/Unidata/netcdf4-python) | `1.6.5` | `1.7.1.post1` | | [cfgrib](https://github.com/ecmwf/cfgrib) | `0.9.11.0` | `0.9.13.0` | | [couchbase](https://github.com/couchbase/couchbase-python-client) | `4.2.1` | `4.3.0` | | [numpy](https://github.com/numpy/numpy) | `1.26.4` | `2.0.0` | | [pytest](https://github.com/pytest-dev/pytest) | `8.2.0` | `8.2.2` | | [ruff](https://github.com/astral-sh/ruff) | `0.4.3` | `0.5.1` | | [coverage](https://github.com/nedbat/coveragepy) | `7.5.1` | `7.6.0` | Updates `xarray` from 2024.3.0 to 2024.6.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pydata/xarray/releases">xarray's releases</a>.</em></p> <blockquote> <h2>v2024.06.0</h2> <p>This release brings compatibility with numpy 2 and various performance optimizations.</p> <p>Thanks to the 22 contributors to this release: Alfonso Ladino, David Hoese, Deepak Cherian, Eni Awowale, Ilan Gold, Jessica Scheick, Joe Hamman, Justus Magin, Kai Mühlbauer, Mark Harfouche, Mathias Hauser, Matt Savoie, Maximilian Roos, Mike Thramann, Nicolas Karasiak, Owen Littlejohns, Paul Ockenfuß, Philippe THOMY, Scott Henderson, Spencer Clark, Stephan Hoyer and Tom Nicholas</p> <h2>What's Changed</h2> <ul> <li>attempt to get colour output in CI by <a href="https://github.com/keewis"><code>@keewis</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9031">pydata/xarray#9031</a></li> <li>[skip-ci] min_deps_check: show age of required pkg on error by <a href="https://github.com/mathause"><code>@mathause</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9025">pydata/xarray#9025</a></li> <li>TEST: Fix numbagg or bottlekneck skip by <a href="https://github.com/hmaarrfk"><code>@hmaarrfk</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9034">pydata/xarray#9034</a></li> <li>Use ME in test_plot instead of M by <a href="https://github.com/hmaarrfk"><code>@hmaarrfk</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9035">pydata/xarray#9035</a></li> <li>Bump codecov/codecov-action from 4.3.1 to 4.4.0 in the actions group by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9036">pydata/xarray#9036</a></li> <li>(fix): equality check against singleton <code>PandasExtensionArray</code> by <a href="https://github.com/ilan-gold"><code>@ilan-gold</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9032">pydata/xarray#9032</a></li> <li>array api-related upstream-dev failures by <a href="https://github.com/keewis"><code>@keewis</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/8854">pydata/xarray#8854</a></li> <li>Bump codecov/codecov-action from 4.4.0 to 4.4.1 in the actions group by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9047">pydata/xarray#9047</a></li> <li>User-guide - pandas : Add alternative to xarray.Dataset.from_dataframe by <a href="https://github.com/loco-philippe"><code>@loco-philippe</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9020">pydata/xarray#9020</a></li> <li>pin nightly <code>zarr</code> to v2 by <a href="https://github.com/keewis"><code>@keewis</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9050">pydata/xarray#9050</a></li> <li>Clarify <strong>matmul</strong> does xarray.dot by <a href="https://github.com/mthramann"><code>@mthramann</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9060">pydata/xarray#9060</a></li> <li>Run tests on changes to root dotfiles by <a href="https://github.com/max-sixty"><code>@max-sixty</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9062">pydata/xarray#9062</a></li> <li>Speed up netCDF4, h5netcdf backends by <a href="https://github.com/dcherian"><code>@dcherian</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9067">pydata/xarray#9067</a></li> <li>Remove empty code cell in examples/multidimensional-coords.ipynb by <a href="https://github.com/kmuehlbauer"><code>@kmuehlbauer</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9071">pydata/xarray#9071</a></li> <li>citation / orcid by <a href="https://github.com/keewis"><code>@keewis</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9082">pydata/xarray#9082</a></li> <li>Always run code tests by <a href="https://github.com/dcherian"><code>@dcherian</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9083">pydata/xarray#9083</a></li> <li>fixes for the <code>pint</code> tests by <a href="https://github.com/keewis"><code>@keewis</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/8983">pydata/xarray#8983</a></li> <li>[pre-commit.ci] pre-commit autoupdate by <a href="https://github.com/pre-commit-ci"><code>@pre-commit-ci</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9061">pydata/xarray#9061</a></li> <li>Address latest pandas-related upstream test failures by <a href="https://github.com/spencerkclark"><code>@spencerkclark</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9081">pydata/xarray#9081</a></li> <li>Add scottyhq to CITATION.cff by <a href="https://github.com/scottyhq"><code>@scottyhq</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9089">pydata/xarray#9089</a></li> <li>Fix Typo in Bfill benchmark by <a href="https://github.com/Ockenfuss"><code>@Ockenfuss</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9087">pydata/xarray#9087</a></li> <li>add link to CF conventions on packed data in doc/user-guide/io.rst by <a href="https://github.com/kmuehlbauer"><code>@kmuehlbauer</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9045">pydata/xarray#9045</a></li> <li>add order for polynomial interpolation, fixes <a href="https://redirect.github.com/pydata/xarray/issues/8762">#8762</a> by <a href="https://github.com/nkarasiak"><code>@nkarasiak</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9079">pydata/xarray#9079</a></li> <li>Fix upcasting with python builtin numbers and numpy 2 by <a href="https://github.com/djhoese"><code>@djhoese</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/8946">pydata/xarray#8946</a></li> <li>Add Eni to CITATION.cff by <a href="https://github.com/eni-awowale"><code>@eni-awowale</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9095">pydata/xarray#9095</a></li> <li>add Jessica to citation by <a href="https://github.com/JessicaS11"><code>@JessicaS11</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9096">pydata/xarray#9096</a></li> <li>(fix): don't handle time-dtypes as extension arrays in <code>from_dataframe</code> by <a href="https://github.com/ilan-gold"><code>@ilan-gold</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9042">pydata/xarray#9042</a></li> <li>Micro optimizations to improve indexing by <a href="https://github.com/hmaarrfk"><code>@hmaarrfk</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9002">pydata/xarray#9002</a></li> <li>DAS-2067 - Migrate datatree io.py and common.py by <a href="https://github.com/owenlittlejohns"><code>@owenlittlejohns</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9011">pydata/xarray#9011</a></li> <li>open_datatree performance improvement on NetCDF, H5, and Zarr files by <a href="https://github.com/aladinor"><code>@aladinor</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9014">pydata/xarray#9014</a></li> <li>[skip-ci] Fix skip-ci for hypothesis by <a href="https://github.com/dcherian"><code>@dcherian</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9102">pydata/xarray#9102</a></li> <li>Adds Matt Savoie to CITATION.cff by <a href="https://github.com/flamingbear"><code>@flamingbear</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9103">pydata/xarray#9103</a></li> <li>skip the <code>pandas</code> datetime roundtrip test with <code>pandas=3.0</code> by <a href="https://github.com/keewis"><code>@keewis</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9104">pydata/xarray#9104</a></li> <li>Add user survey announcement to docs by <a href="https://github.com/jhamman"><code>@jhamman</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9101">pydata/xarray#9101</a></li> <li>add remaining core-dev citations by <a href="https://github.com/keewis"><code>@keewis</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9110">pydata/xarray#9110</a></li> <li>Undo custom padding-top. by <a href="https://github.com/dcherian"><code>@dcherian</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9107">pydata/xarray#9107</a></li> <li>[skip-ci] Try fixing hypothesis CI trigger by <a href="https://github.com/dcherian"><code>@dcherian</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9112">pydata/xarray#9112</a></li> <li>release notes for 2024.06.0 by <a href="https://github.com/keewis"><code>@keewis</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9092">pydata/xarray#9092</a></li> <li>release v2024.06.0 by <a href="https://github.com/keewis"><code>@keewis</code></a> in <a href="https://redirect.github.com/pydata/xarray/pull/9113">pydata/xarray#9113</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/loco-philippe"><code>@loco-philippe</code></a> made their first contribution in <a href="https://redirect.github.com/pydata/xarray/pull/9020">pydata/xarray#9020</a></li> <li><a href="https://github.com/mthramann"><code>@mthramann</code></a> made their first contribution in <a href="https://redirect.github.com/pydata/xarray/pull/9060">pydata/xarray#9060</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pydata/xarray/commit/bef04067dd87f9f0c1a3ae7840299e0bbdd595a8"><code>bef0406</code></a> release v2024.06.0 (<a href="https://redirect.github.com/pydata/xarray/issues/9113">#9113</a>)</li> <li><a href="https://github.com/pydata/xarray/commit/b31a495f828384c8d40b220b426c1065abdfe3ac"><code>b31a495</code></a> release notes for 2024.06.0 (<a href="https://redirect.github.com/pydata/xarray/issues/9092">#9092</a>)</li> <li><a href="https://github.com/pydata/xarray/commit/65548556029749a8b22ae96c070eef980cfe8ea1"><code>6554855</code></a> [skip-ci] Try fixing hypothesis CI trigger (<a href="https://redirect.github.com/pydata/xarray/issues/9112">#9112</a>)</li> <li><a href="https://github.com/pydata/xarray/commit/ce196d56f730ac8f3824f2ab85f62142be2a2a89"><code>ce196d5</code></a> Undo custom padding-top. (<a href="https://redirect.github.com/pydata/xarray/issues/9107">#9107</a>)</li> <li><a href="https://github.com/pydata/xarray/commit/cea4dd101a4683a17518626f4016ceae8e5a301d"><code>cea4dd1</code></a> add remaining core-dev citations [skip-ci][skip-rtd] (<a href="https://redirect.github.com/pydata/xarray/issues/9110">#9110</a>)</li> <li><a href="https://github.com/pydata/xarray/commit/2e0dd6f2779756c9c1c04f14b7937c3b214a0fc9"><code>2e0dd6f</code></a> Add user survey announcement to docs (<a href="https://redirect.github.com/pydata/xarray/issues/9101">#9101</a>)</li> <li><a href="https://github.com/pydata/xarray/commit/b221808a1c0fc479006056df936c377afff66190"><code>b221808</code></a> skip the <code>pandas</code> datetime roundtrip test with <code>pandas=3.0</code> (<a href="https://redirect.github.com/pydata/xarray/issues/9104">#9104</a>)</li> <li><a href="https://github.com/pydata/xarray/commit/7ec09529e78bef1c716bec3089da415b50b53aac"><code>7ec0952</code></a> Adds Matt Savoie to CITATION.cff (<a href="https://redirect.github.com/pydata/xarray/issues/9103">#9103</a>)</li> <li><a href="https://github.com/pydata/xarray/commit/aacfeba710b22a127bcd1af5e77764d9af3021a0"><code>aacfeba</code></a> [skip-ci] Fix skip-ci for hypothesis (<a href="https://redirect.github.com/pydata/xarray/issues/9102">#9102</a>)</li> <li><a href="https://github.com/pydata/xarray/commit/3967351ee61a8d4c7ce32dfb9255290c362ba551"><code>3967351</code></a> open_datatree performance improvement on NetCDF, H5, and Zarr files (<a href="https://redirect.github.com/pydata/xarray/issues/9014">#9014</a>)</li> <li>Additional commits viewable in <a href="https://github.com/pydata/xarray/compare/v2024.03.0...v2024.06.0">compare view</a></li> </ul> </details> <br /> Updates `netcdf4` from 1.6.5 to 1.7.1.post1 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Unidata/netcdf4-python/blob/master/Changelog">netcdf4's changelog</a>.</em></p> <blockquote> <h1>version 1.7.2 (tag v1.7.2rel)</h1> <ul> <li>add static type hints (PR <a href="https://redirect.github.com/Unidata/netcdf4-python/issues/1302">#1302</a>)</li> </ul> <h1>version 1.7.1 (tag v1.7.1rel)</h1> <ul> <li>include nc_complex source code from v0.2.0 tag (instead of using submodule).</li> <li>add aarch64 wheels.</li> </ul> <h1>version 1.7.0 (tag v1.7.0rel)</h1> <ul> <li>add support for complex numbers via <code>auto_complex</code> keyword to <code>Dataset</code> (PR <a href="https://redirect.github.com/Unidata/netcdf4-python/issues/1295">#1295</a>)</li> <li>fix for deprecated Cython <code>DEF</code> and <code>IF</code> statements using compatibility header with shims for unavailable functionality (PR <a href="https://redirect.github.com/Unidata/netcdf4-python/issues/1277">#1277</a>)</li> <li>use <code>szip</code> as the library name on Windows (PR <a href="https://redirect.github.com/Unidata/netcdf4-python/issues/1304">#1304</a>)</li> <li>add support for MS-MPI <code>MPI_Message</code> detection (PR <a href="https://redirect.github.com/Unidata/netcdf4-python/issues/1305">#1305</a>)</li> <li>fix for issue <a href="https://redirect.github.com/Unidata/netcdf4-python/issues/1306">#1306</a> - surprising result when indexing vlen str with non-contiguous indices.</li> <li>Fix bug in set_collective introduced in PR <a href="https://redirect.github.com/Unidata/netcdf4-python/issues/1277">#1277</a> (collective mode was always set).</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/Unidata/netcdf4-python/commits/v1.7.1.post1">compare view</a></li> </ul> </details> <br /> Updates `cfgrib` from 0.9.11.0 to 0.9.13.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/ecmwf/cfgrib/releases">cfgrib's releases</a>.</em></p> <blockquote> <p>0.9.13.0</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/ecmwf/cfgrib/blob/master/CHANGELOG.rst">cfgrib's changelog</a>.</em></p> <blockquote> <h2>0.9.13.0 (2024-06-27)</h2> <ul> <li> <p>Allow users to pass of list of values to filter a key by. See <code>[#384](https://github.com/ecmwf/cfgrib/issues/384) <https://github.com/ecmwf/cfgrib/pull/384></code>_.</p> </li> <li> <p>Functionality to ignore keys when reading a grib file See <code>[#382](https://github.com/ecmwf/cfgrib/issues/382) <https://github.com/ecmwf/cfgrib/pull/382></code>_.</p> </li> <li> <p>Preserve coordinate encoding in cfgrib.open_datasets See <code>[#381](https://github.com/ecmwf/cfgrib/issues/381) <https://github.com/ecmwf/cfgrib/pull/381></code>_.</p> </li> </ul> <h2>0.9.12.0 (2024-05-26)</h2> <ul> <li>fixed issue where GRIB messages with non-hourly steps could not be read See <code>[#370](https://github.com/ecmwf/cfgrib/issues/370) <https://github.com/ecmwf/cfgrib/pull/370></code>_.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/ecmwf/cfgrib/commit/c6cff34bb24b2e39034e28682eb62ee37156be46"><code>c6cff34</code></a> Merge pull request <a href="https://redirect.github.com/ecmwf/cfgrib/issues/387">#387</a> from ecmwf/feature/release-0.9.13.0</li> <li><a href="https://github.com/ecmwf/cfgrib/commit/c3896dcaa5d647274ec42d83e139bca7b318d599"><code>c3896dc</code></a> Release 0.9.13.0</li> <li><a href="https://github.com/ecmwf/cfgrib/commit/011a5d155c1e1a9c66f9ef07de7cd3697920c1ce"><code>011a5d1</code></a> Merge pull request <a href="https://redirect.github.com/ecmwf/cfgrib/issues/384">#384</a> from ecmwf/filter-by-keys-list</li> <li><a href="https://github.com/ecmwf/cfgrib/commit/151037bf618c48cb822242d45b545facbb7c8452"><code>151037b</code></a> Merge branch 'master' into filter-by-keys-list</li> <li><a href="https://github.com/ecmwf/cfgrib/commit/b098bc57a1a44607fc285ad7c0557eae62fc5112"><code>b098bc5</code></a> Merge pull request <a href="https://redirect.github.com/ecmwf/cfgrib/issues/382">#382</a> from ecmwf/ignore_keys</li> <li><a href="https://github.com/ecmwf/cfgrib/commit/0fd4cd973dd7597f257ddb804090a515233342e3"><code>0fd4cd9</code></a> Merge branch 'master' into ignore_keys</li> <li><a href="https://github.com/ecmwf/cfgrib/commit/daf975f18eca29c9cfa2d6c3827127b45723be74"><code>daf975f</code></a> name change for test</li> <li><a href="https://github.com/ecmwf/cfgrib/commit/0ec25c0a4ecdfcd0b55462976262f8defebd2460"><code>0ec25c0</code></a> QA</li> <li><a href="https://github.com/ecmwf/cfgrib/commit/c8c415dc10bdd516ca87446b8c35cbaf2e46efc8"><code>c8c415d</code></a> tests</li> <li><a href="https://github.com/ecmwf/cfgrib/commit/e325b4fd318a0dfcb5a642a8684d9de49531e920"><code>e325b4f</code></a> QA</li> <li>Additional commits viewable in <a href="https://github.com/ecmwf/cfgrib/compare/0.9.11.0...0.9.13.0">compare view</a></li> </ul> </details> <br /> Updates `couchbase` from 4.2.1 to 4.3.0 <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/couchbase/couchbase-python-client/commit/b92c82d8008d2d166a60413d92c418d46a32d99a"><code>b92c82d</code></a> Update C++ core to 1.0.0</li> <li><a href="https://github.com/couchbase/couchbase-python-client/commit/12078803fecf7bfb864797290c537ab21ee765ee"><code>1207880</code></a> PYCBC-1588: Add support for importing FTS index from JSON</li> <li><a href="https://github.com/couchbase/couchbase-python-client/commit/11a2040c6b84418b45981035fcbdf581480c8be8"><code>11a2040</code></a> Bump Vector Search to committed stability level.</li> <li><a href="https://github.com/couchbase/couchbase-python-client/commit/388682beb42f64cdca806e551c71a53018575616"><code>388682b</code></a> Update pre-commit hooks and clang-format</li> <li><a href="https://github.com/couchbase/couchbase-python-client/commit/c3e29d68fddc160f72a861c723991be073d34744"><code>c3e29d6</code></a> Update C++ core</li> <li><a href="https://github.com/couchbase/couchbase-python-client/commit/4e0beea1f4d2348390b88a3b00581eabcc6c2886"><code>4e0beea</code></a> PYCBC-1603: Handle empty VectorQuery field name</li> <li><a href="https://github.com/couchbase/couchbase-python-client/commit/f630b0447056b9dcd55065ff7ca29a9d9563a5b9"><code>f630b04</code></a> PYCBC-1597: Support for base64 encoded vector types</li> <li><a href="https://github.com/couchbase/couchbase-python-client/commit/d7391bc2b26ef8a2ed45cf27b4df34846fc2c802"><code>d7391bc</code></a> Update C++ core</li> <li><a href="https://github.com/couchbase/couchbase-python-client/commit/539679df0d293c218d49ffae2394d2c1c984fdc4"><code>539679d</code></a> PYCBC-1583: Fix BucketType.COUCHBASE being ignored from bucket settings</li> <li><a href="https://github.com/couchbase/couchbase-python-client/commit/e86af1ca4aca03ca5fccc3b05a073a0273428d66"><code>e86af1c</code></a> PYCBC-1596: Fix AnalyticsStatus Enum values</li> <li>Additional commits viewable in <a href="https://github.com/couchbase/couchbase-python-client/compare/4.2.1...4.3.0">compare view</a></li> </ul> </details> <br /> Updates `numpy` from 1.26.4 to 2.0.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/numpy/numpy/releases">numpy's releases</a>.</em></p> <blockquote> <h2>v2.0.0</h2> <h1>NumPy 2.0.0 Release Notes</h1> <p>NumPy 2.0.0 is the first major release since 2006. It is the result of 11 months of development since the last feature release and is the work of 212 contributors spread over 1078 pull requests. It contains a large number of exciting new features as well as changes to both the Python and C APIs.</p> <p>This major release includes breaking changes that could not happen in a regular minor (feature) release - including an ABI break, changes to type promotion rules, and API changes which may not have been emitting deprecation warnings in 1.26.x. Key documents related to how to adapt to changes in NumPy 2.0, in addition to these release notes, include:</p> <ul> <li>The <a href="https://numpy.org/devdocs/numpy_2_0_migration_guide.html">numpy-2-migration-guide</a></li> <li>The Numpy 2.0-specific advice in <a href="https://numpy.org/devdocs/dev/depending_on_numpy.html">for downstream package authors</a></li> </ul> <h2>Highlights</h2> <p>Highlights of this release include:</p> <ul> <li>New features: <ul> <li>A new variable-length string dtype, <code>numpy.dtypes.StringDType</code> and a new <code>numpy.strings</code> namespace with performant ufuncs for string operations,</li> <li>Support for <code>float32</code> and <code>longdouble</code> in all <code>numpy.fft</code> functions,</li> <li>Support for the array API standard in the main <code>numpy</code> namespace.</li> </ul> </li> <li>Performance improvements: <ul> <li>Sorting functions <code>sort</code>, <code>argsort</code>, <code>partition</code>, <code>argpartition</code> have been accelerated through the use of the Intel x86-simd-sort and Google Highway libraries, and may see large (hardware-specific) speedups,</li> <li>macOS Accelerate support and binary wheels for macOS >=14, with significant performance improvements for linear algebra operations on macOS, and wheels that are about 3 times smaller,</li> <li><code>numpy.char</code> fixed-length string operations have been accelerated by implementing ufuncs that also support <code>numpy.dtypes.StringDType</code> in addition to the fixed-length string dtypes,</li> <li>A new tracing and introspection API, <code>numpy.lib.introspect.opt_func_info</code>, to determine which hardware-specific kernels are available and will be dispatched to.</li> <li><code>numpy.save</code> now uses pickle protocol version 4 for saving arrays with object dtype, which allows for pickle objects larger than 4GB and improves saving speed by about 5% for large arrays.</li> </ul> </li> <li>Python API improvements:</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/numpy/numpy/commit/1d49c7f7ff527c696fc26ab2278ad51632a66660"><code>1d49c7f</code></a> Merge pull request <a href="https://redirect.github.com/numpy/numpy/issues/26698">#26698</a> from charris/prepare-2.0.0</li> <li><a href="https://github.com/numpy/numpy/commit/2103511c0fa1b336f38d43920e3eb5440af9ea15"><code>2103511</code></a> DOC: Remove duplicate in author list.</li> <li><a href="https://github.com/numpy/numpy/commit/db8030e9bb082466f89714c9a97c87f99dabb60d"><code>db8030e</code></a> BUG: Change cibuildwheel version [wheel build]</li> <li><a href="https://github.com/numpy/numpy/commit/1a68264bb5f6859fc85c985984fc682034320503"><code>1a68264</code></a> REL: Prepare for the NumPy 2.0.0 release [wheel build]</li> <li><a href="https://github.com/numpy/numpy/commit/c8665baa495d13e40eee0d39db841b0cbfde04a1"><code>c8665ba</code></a> Merge pull request <a href="https://redirect.github.com/numpy/numpy/issues/26696">#26696</a> from charris/backport-26582</li> <li><a href="https://github.com/numpy/numpy/commit/103f4dd40725bcf610b3ff19a324e1ca099a47c4"><code>103f4dd</code></a> Merge pull request <a href="https://redirect.github.com/numpy/numpy/issues/26697">#26697</a> from charris/backport-25963</li> <li><a href="https://github.com/numpy/numpy/commit/c193dcd1dcd01989088475349e1b717d2b82b07b"><code>c193dcd</code></a> Merge pull request <a href="https://redirect.github.com/numpy/numpy/issues/26695">#26695</a> from charris/backport-26667</li> <li><a href="https://github.com/numpy/numpy/commit/8fa81913477d19c78b5f8660830615b31a95a7de"><code>8fa8191</code></a> BUG: Fix bug in numpy.pad() (<a href="https://redirect.github.com/numpy/numpy/issues/25963">#25963</a>)</li> <li><a href="https://github.com/numpy/numpy/commit/ece3559d4c0b9fc22c2d272d07cef1d62b4b65b2"><code>ece3559</code></a> BUG: weighted nanpercentile, nanquantile and multi-dim q (<a href="https://redirect.github.com/numpy/numpy/issues/26582">#26582</a>)</li> <li><a href="https://github.com/numpy/numpy/commit/b31e19550fbb374efc6246e2f114124eee6a3714"><code>b31e195</code></a> BUG: Adds asanyarray to start of linalg.cross (<a href="https://redirect.github.com/numpy/numpy/issues/26667">#26667</a>)</li> <li>Additional commits viewable in <a href="https://github.com/numpy/numpy/compare/v1.26.4...v2.0.0">compare view</a></li> </ul> </details> <br /> Updates `pytest` from 8.2.0 to 8.2.2 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pytest-dev/pytest/releases">pytest's releases</a>.</em></p> <blockquote> <h2>8.2.2</h2> <h1>pytest 8.2.2 (2024-06-04)</h1> <h2>Bug Fixes</h2> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12355">#12355</a>: Fix possible catastrophic performance slowdown on a certain parametrization pattern involving many higher-scoped parameters.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12367">#12367</a>: Fix a regression in pytest 8.2.0 where unittest class instances (a fresh one is created for each test) were not released promptly on test teardown but only on session teardown.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12381">#12381</a>: Fix possible "Directory not empty" crashes arising from concurent cache dir (<code>.pytest_cache</code>) creation. Regressed in pytest 8.2.0.</li> </ul> <h2>Improved Documentation</h2> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12290">#12290</a>: Updated Sphinx theme to use Furo instead of Flask, enabling Dark mode theme.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12356">#12356</a>: Added a subsection to the documentation for debugging flaky tests to mention lack of thread safety in pytest as a possible source of flakyness.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12363">#12363</a>: The documentation webpages now links to a canonical version to reduce outdated documentation in search engine results.</li> </ul> <h2>8.2.1</h2> <h1>pytest 8.2.1 (2024-05-19)</h1> <h2>Improvements</h2> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12334">#12334</a>: Support for Python 3.13 (beta1 at the time of writing).</li> </ul> <h2>Bug Fixes</h2> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12120">#12120</a>: Fix [PermissionError]{.title-ref} crashes arising from directories which are not selected on the command-line.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12191">#12191</a>: Keyboard interrupts and system exits are now properly handled during the test collection.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12300">#12300</a>: Fixed handling of 'Function not implemented' error under squashfuse_ll, which is a different way to say that the mountpoint is read-only.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12308">#12308</a>: Fix a regression in pytest 8.2.0 where the permissions of automatically-created <code>.pytest_cache</code> directories became <code>rwx------</code> instead of the expected <code>rwxr-xr-x</code>.</li> </ul> <h2>Trivial/Internal Changes</h2> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest/issues/12333">#12333</a>: pytest releases are now attested using the recent <a href="https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/">Artifact Attestation</a> support from GitHub, allowing users to verify the provenance of pytest's sdist and wheel artifacts.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest/commit/329d3712146e69c471be3e30883d54bdde2f76cb"><code>329d371</code></a> Prepare release version 8.2.2</li> <li><a href="https://github.com/pytest-dev/pytest/commit/214d098fcce88940f5ce9353786b3cc8f0bd3938"><code>214d098</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest/issues/12414">#12414</a> from bluetech/backport-12409</li> <li><a href="https://github.com/pytest-dev/pytest/commit/153a436bc40c9e89d90d62255ef5a89e9a762dca"><code>153a436</code></a> [8.2.x] fixtures: fix catastrophic performance problem in <code>reorder_items</code></li> <li><a href="https://github.com/pytest-dev/pytest/commit/b41d5a52bbb808780ab310456d71e5ce509fd402"><code>b41d5a5</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest/issues/12412">#12412</a> from pytest-dev/backport-12408-to-8.2.x</li> <li><a href="https://github.com/pytest-dev/pytest/commit/9bb73d734ff40f52d7bbebd708b5e3ab1ba20798"><code>9bb73d7</code></a> [8.2.x] cacheprovider: fix "Directory not empty" crash from cache directory c...</li> <li><a href="https://github.com/pytest-dev/pytest/commit/4569a01e3d20d64811d48b0b09539596520ea5a6"><code>4569a01</code></a> [8.2.x] doc: Update trainings/events (<a href="https://redirect.github.com/pytest-dev/pytest/issues/12402">#12402</a>)</li> <li><a href="https://github.com/pytest-dev/pytest/commit/1d103e5cdc1cb08f332e61a5b20fb205fa5228e7"><code>1d103e5</code></a> [8.2.x] Clarify pytest_ignore_collect docs (<a href="https://redirect.github.com/pytest-dev/pytest/issues/12386">#12386</a>)</li> <li><a href="https://github.com/pytest-dev/pytest/commit/240a252d34fff26efad5b3a92e62be4c9af94b70"><code>240a252</code></a> [8.2.x] Add html_baseurl to sphinx conf.py (<a href="https://redirect.github.com/pytest-dev/pytest/issues/12372">#12372</a>)</li> <li><a href="https://github.com/pytest-dev/pytest/commit/a5ee3c41268199c2c0af59c33050326b1c4a342e"><code>a5ee3c4</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest/issues/12370">#12370</a> from pytest-dev/backport-12368-to-8.2.x</li> <li><a href="https://github.com/pytest-dev/pytest/commit/f7358aec2884720b4de4594ffd0811b46316514c"><code>f7358ae</code></a> [8.2.x] unittest: fix class instances no longer released on test teardown sin...</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest/compare/8.2.0...8.2.2">compare view</a></li> </ul> </details> <br /> Updates `ruff` from 0.4.3 to 0.5.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>0.5.1</h2> <h2>Release Notes</h2> <h3>Preview features</h3> <ul> <li>[<code>flake8-bugbear</code>] Implement mutable-contextvar-default (B039) (<a href="https://redirect.github.com/astral-sh/ruff/pull/12113">#12113</a>)</li> <li>[<code>pycodestyle</code>] Whitespace after decorator (<code>E204</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/12140">#12140</a>)</li> <li>[<code>pytest</code>] Reverse <code>PT001</code> and <code>PT0023</code> defaults (<a href="https://redirect.github.com/astral-sh/ruff/pull/12106">#12106</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>Enable token-based rules on source with syntax errors (<a href="https://redirect.github.com/astral-sh/ruff/pull/11950">#11950</a>)</li> <li>[<code>flake8-bandit</code>] Detect <code>httpx</code> for <code>S113</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/12174">#12174</a>)</li> <li>[<code>numpy</code>] Update <code>NPY201</code> to include exception deprecations (<a href="https://redirect.github.com/astral-sh/ruff/pull/12065">#12065</a>)</li> <li>[<code>pylint</code>] Generate autofix for <code>duplicate-bases</code> (<code>PLE0241</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/12105">#12105</a>)</li> </ul> <h3>Server</h3> <ul> <li>Avoid syntax error notification for source code actions (<a href="https://redirect.github.com/astral-sh/ruff/pull/12148">#12148</a>)</li> <li>Consider the content of the new cells during notebook sync (<a href="https://redirect.github.com/astral-sh/ruff/pull/12203">#12203</a>)</li> <li>Fix replacement edit range computation (<a href="https://redirect.github.com/astral-sh/ruff/pull/12171">#12171</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Disable auto-fix when source has syntax errors (<a href="https://redirect.github.com/astral-sh/ruff/pull/12134">#12134</a>)</li> <li>Fix cache key collisions for paths with separators (<a href="https://redirect.github.com/astral-sh/ruff/pull/12159">#12159</a>)</li> <li>Make <code>requires-python</code> inference robust to <code>==</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/12091">#12091</a>)</li> <li>Use char-wise width instead of <code>str</code>-width (<a href="https://redirect.github.com/astral-sh/ruff/pull/12135">#12135</a>)</li> <li>[<code>pycodestyle</code>] Avoid <code>E275</code> if keyword followed by comma (<a href="https://redirect.github.com/astral-sh/ruff/pull/12136">#12136</a>)</li> <li>[<code>pycodestyle</code>] Avoid <code>E275</code> if keyword is followed by a semicolon (<a href="https://redirect.github.com/astral-sh/ruff/pull/12095">#12095</a>)</li> <li>[<code>pylint</code>] Skip <a href="https://docs.astral.sh/ruff/settings/#lint_dummy-variable-rgx">dummy variables</a> for <code>PLR1704</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/12190">#12190</a>)</li> </ul> <h3>Performance</h3> <ul> <li>Remove allocation in <code>parse_identifier</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/12103">#12103</a>)</li> <li>Use <code>CompactString</code> for <code>Identifier</code> AST node (<a href="https://redirect.github.com/astral-sh/ruff/pull/12101">#12101</a>)</li> </ul> <h2>Contributors</h2> <ul> <li><a href="https://github.com/AlexWaygood"><code>@AlexWaygood</code></a></li> <li><a href="https://github.com/MichaReiser"><code>@MichaReiser</code></a></li> <li><a href="https://github.com/Peiffap"><code>@Peiffap</code></a></li> <li><a href="https://github.com/ThomasFaivre"><code>@ThomasFaivre</code></a></li> <li><a href="https://github.com/bersace"><code>@bersace</code></a></li> <li><a href="https://github.com/charliermarsh"><code>@charliermarsh</code></a></li> <li><a href="https://github.com/dhruvmanila"><code>@dhruvmanila</code></a></li> <li><a href="https://github.com/github-actions"><code>@github-actions</code></a></li> <li><a href="https://github.com/jkauerl"><code>@jkauerl</code></a></li> <li><a href="https://github.com/mkniewallner"><code>@mkniewallner</code></a></li> <li><a href="https://github.com/mtsokol"><code>@mtsokol</code></a></li> <li><a href="https://github.com/renovate"><code>@renovate</code></a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.5.1</h2> <h3>Preview features</h3> <ul> <li>[<code>flake8-bugbear</code>] Implement mutable-contextvar-default (B039) (<a href="https://redirect.github.com/astral-sh/ruff/pull/12113">#12113</a>)</li> <li>[<code>pycodestyle</code>] Whitespace after decorator (<code>E204</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/12140">#12140</a>)</li> <li>[<code>pytest</code>] Reverse <code>PT001</code> and <code>PT0023</code> defaults (<a href="https://redirect.github.com/astral-sh/ruff/pull/12106">#12106</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>Enable token-based rules on source with syntax errors (<a href="https://redirect.github.com/astral-sh/ruff/pull/11950">#11950</a>)</li> <li>[<code>flake8-bandit</code>] Detect <code>httpx</code> for <code>S113</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/12174">#12174</a>)</li> <li>[<code>numpy</code>] Update <code>NPY201</code> to include exception deprecations (<a href="https://redirect.github.com/astral-sh/ruff/pull/12065">#12065</a>)</li> <li>[<code>pylint</code>] Generate autofix for <code>duplicate-bases</code> (<code>PLE0241</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/12105">#12105</a>)</li> </ul> <h3>Server</h3> <ul> <li>Avoid syntax error notification for source code actions (<a href="https://redirect.github.com/astral-sh/ruff/pull/12148">#12148</a>)</li> <li>Consider the content of the new cells during notebook sync (<a href="https://redirect.github.com/astral-sh/ruff/pull/12203">#12203</a>)</li> <li>Fix replacement edit range computation (<a href="https://redirect.github.com/astral-sh/ruff/pull/12171">#12171</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Disable auto-fix when source has syntax errors (<a href="https://redirect.github.com/astral-sh/ruff/pull/12134">#12134</a>)</li> <li>Fix cache key collisions for paths with separators (<a href="https://redirect.github.com/astral-sh/ruff/pull/12159">#12159</a>)</li> <li>Make <code>requires-python</code> inference robust to <code>==</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/12091">#12091</a>)</li> <li>Use char-wise width instead of <code>str</code>-width (<a href="https://redirect.github.com/astral-sh/ruff/pull/12135">#12135</a>)</li> <li>[<code>pycodestyle</code>] Avoid <code>E275</code> if keyword followed by comma (<a href="https://redirect.github.com/astral-sh/ruff/pull/12136">#12136</a>)</li> <li>[<code>pycodestyle</code>] Avoid <code>E275</code> if keyword is followed by a semicolon (<a href="https://redirect.github.com/astral-sh/ruff/pull/12095">#12095</a>)</li> <li>[<code>pylint</code>] Skip <a href="https://docs.astral.sh/ruff/settings/#lint_dummy-variable-rgx">dummy variables</a> for <code>PLR1704</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/12190">#12190</a>)</li> </ul> <h3>Performance</h3> <ul> <li>Remove allocation in <code>parse_identifier</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/12103">#12103</a>)</li> <li>Use <code>CompactString</code> for <code>Identifier</code> AST node (<a href="https://redirect.github.com/astral-sh/ruff/pull/12101">#12101</a>)</li> </ul> <h2>0.5.0</h2> <p>Check out the <a href="https://astral.sh/blog/ruff-v0.5.0">blog post</a> for a migration guide and overview of the changes!</p> <h3>Breaking changes</h3> <p>See also, the "Remapped rules" section which may result in disabled rules.</p> <ul> <li>Follow the XDG specification to discover user-level configurations on macOS (same as on other Unix platforms)</li> <li>Selecting <code>ALL</code> now excludes deprecated rules</li> <li>The released archives now include an extra level of nesting, which can be removed with <code>--strip-components=1</code> when untarring.</li> <li>The release artifact's file name no longer includes the version tag. This enables users to install via <code>/latest</code> URLs on GitHub.</li> <li>The diagnostic ranges for some <code>flake8-bandit</code> rules were modified (<a href="https://redirect.github.com/astral-sh/ruff/pull/10667">#10667</a>).</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/3a72400202642f0bb340fb2b1d1c31da2b6524dd"><code>3a72400</code></a> Rename publish workflow file extension (<code>yaml</code> -> <code>yml</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/12206">#12206</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/1b3bff03300b2c48f0ad6c7bd6b1038e2f1fce5a"><code>1b3bff0</code></a> Bump version to 0.5.1 (<a href="https://redirect.github.com/astral-sh/ruff/issues/12205">#12205</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/0f6f73ecf3c2ebfe5b218edc0765886ccdca6f7f"><code>0f6f73e</code></a> [red-knot] Require that <code>FileSystem</code> objects implement <code>Debug</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/12204">#12204</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/7910beecc42b2694890b10011c27a3cbb2db3335"><code>7910bee</code></a> Consider the content of the new cells during notebook sync (<a href="https://redirect.github.com/astral-sh/ruff/issues/12203">#12203</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/f3ccd152e99d6bccfec58275c0b3b2ec3ffd5bdd"><code>f3ccd15</code></a> Revert "Remove <code>--preview</code> as a required argument for <code>ruff server</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/12053">#12053</a>)"...</li> <li><a href="https://github.com/astral-sh/ruff/commit/1e07bfa3730db9461f51b877bf71ea31e7dd56e4"><code>1e07bfa</code></a> [<code>pycodestyle</code>] Whitespace after decorator (<code>E204</code>) (<a href="https://redirect.github.com/astral-sh/ruff/issues/12140">#12140</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/5e7ba056128c8bc272ab1a2a22c9cb94a5079361"><code>5e7ba05</code></a> docs(*): fix a few typos, consistency issues and links (<a href="https://redirect.github.com/astral-sh/ruff/issues/12193">#12193</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/d12570ea006d23a610e2410d9c70c3b3deae717c"><code>d12570e</code></a> docs(options): fix some typos and improve consistency (<a href="https://redirect.github.com/astral-sh/ruff/issues/12191">#12191</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/2f3264e148b9cf31e32c3137feb0f5ce9532d85b"><code>2f3264e</code></a> fix(rules): skip dummy variables for <code>PLR1704</code> (<a href="https://redirect.github.com/astral-sh/ruff/issues/12190">#12190</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/e2e0889a303e8ce9953a2eb8a426921d08176c5f"><code>e2e0889</code></a> [red-knot] Add very basic benchmark (<a href="https://redirect.github.com/astral-sh/ruff/issues/12182">#12182</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/v0.4.3...0.5.1">compare view</a></li> </ul> </details> <br /> Updates `coverage` from 7.5.1 to 7.6.0 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst">coverage's changelog</a>.</em></p> <blockquote> <h2>Version 7.6.0 — 2024-07-11</h2> <ul> <li> <p>Exclusion patterns can now be multi-line, thanks to <code>Daniel Diniz <pull 1807_></code><em>. This enables many interesting exclusion use-cases, including those requested in issues <code>118 <issue 118_></code></em> (entire files), <code>996 <issue 996_></code>_ (multiple lines only when appearing together), <code>1741 <issue 1741_></code>_ (remainder of a function), and <code>1803 <issue 1803_></code>_ (arbitrary sequence of marked lines). See the :ref:<code>multi_line_exclude</code> section of the docs for more details and examples.</p> </li> <li> <p>The JSON report now includes per-function and per-class coverage information. Thanks to <code>Daniel Diniz <pull 1809_></code>_ for getting the work started. This closes <code>issue 1793</code>_ and <code>issue 1532</code>_.</p> </li> <li> <p>Fixed an incorrect calculation of "(no class)" lines in the HTML classes report.</p> </li> <li> <p>Python 3.13.0b3 is supported.</p> </li> </ul> <p>.. _issue 118: <a href="https://redirect.github.com/nedbat/coveragepy/issues/118">nedbat/coveragepy#118</a> .. _issue 996: <a href="https://redirect.github.com/nedbat/coveragepy/issues/996">nedbat/coveragepy#996</a> .. _issue 1532: <a href="https://redirect.github.com/nedbat/coveragepy/issues/1532">nedbat/coveragepy#1532</a> .. _issue 1741: <a href="https://redirect.github.com/nedbat/coveragepy/issues/1741">nedbat/coveragepy#1741</a> .. _issue 1793: <a href="https://redirect.github.com/nedbat/coveragepy/issues/1793">nedbat/coveragepy#1793</a> .. _issue 1803: <a href="https://redirect.github.com/nedbat/coveragepy/issues/1803">nedbat/coveragepy#1803</a> .. _pull 1807: <a href="https://redirect.github.com/nedbat/coveragepy/pull/1807">nedbat/coveragepy#1807</a> .. _pull 1809: <a href="https://redirect.github.com/nedbat/coveragepy/pull/1809">nedbat/coveragepy#1809</a></p> <p>.. _changes_7-5-4:</p> <h2>Version 7.5.4 — 2024-06-22</h2> <ul> <li> <p>If you attempt to combine statement coverage data with branch coverage data, coverage.py used to fail with the message "Can't combine arc data with line data" or its reverse, "Can't combine line data with arc data." These messages used internal terminology, making it hard for people to understand the problem. They are now changed to mention "branch coverage data" and "statement coverage data."</p> </li> <li> <p>Fixed a minor branch coverage problem with wildcard match/case cases using names or guard clauses.</p> </li> <li> <p>Started testing on 3.13 free-threading (nogil) builds of Python. I'm not claiming full support yet. Closes <code>issue 1799</code>_.</p> </li> </ul> <p>.. _issue 1799: <a href="https://redirect.github.com/nedbat/coveragepy/issues/1799">nedbat/coveragepy#1799</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/nedbat/coveragepy/commit/59a3cd7cecbf45378b9d1f4eda90826258233d62"><code>59a3cd7</code></a> docs: sample HTML for 7.6.0</li> <li><a href="https://github.com/nedbat/coveragepy/commit/7f27fa7810e494a75af08b54c4f97b94df7364f4"><code>7f27fa7</code></a> docs: prep for 7.6.0</li> <li><a href="https://github.com/nedbat/coveragepy/commit/6a268b059515e2768931ce6454dcd27304520d8a"><code>6a268b0</code></a> docs: issues closed by the json region reporting</li> <li><a href="https://github.com/nedbat/coveragepy/commit/5bfe9e770304e0b0b346de2441c83300f9da0edf"><code>5bfe9e7</code></a> chore: bump actions/setup-python from 5.1.0 to 5.1.1 (<a href="https://redirect.github.com/nedbat/coveragepy/issues/1814">#1814</a>)</li> <li><a href="https://github.com/nedbat/coveragepy/commit/ab609ef0fb235454050cf8383427ce5f1b0ec8e9"><code>ab609ef</code></a> docs: mention json region reporting in the changes</li> <li><a href="https://github.com/nedbat/coveragepy/commit/92d96b91b78639cdb50cbba9f7848dd9e75382d7"><code>92d96b9</code></a> fix: json report needs 'no class' and 'no function' also</li> <li><a href="https://github.com/nedbat/coveragepy/commit/e47e7e758bfc48537f0f21d40cef8e5fa2a076c6"><code>e47e7e7</code></a> refactor: move duplicate code into methods</li> <li><a href="https://github.com/nedbat/coveragepy/commit/3d6be2b3284d30d1668afeeb383430ddc402ce4d"><code>3d6be2b</code></a> fix: json format should bump for regions</li> <li><a href="https://github.com/nedbat/coveragepy/commit/a9992d2bff1f12db61c114e6d61d5f35873ae84a"><code>a9992d2</code></a> test: add a test of json regions with branches</li> <li><a href="https://github.com/nedbat/coveragepy/commit/8b8976462b8b7be74716e83efaf05e22f477ef72"><code>8b89764</code></a> test: json expectations should have explicit format number</li> <li>Additional commits viewable in <a href="https://github.com/nedbat/coveragepy/compare/7.5.1...7.6.0">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details>
What happened?
With the release of ecCodes 2.34.0, support for GRIB files with sub-hourly steps has been added. As a result, the 'native type' of the 'endStep' field has become a string, while cfgrib expects an integer. 'endStep' is used by cfgrib to derive the value for the 'step' time dimension. The failure to do so due to the returned string value is silently ignored and results in Xarray Datasets lacking values for 'step' and 'valid_time'.
Relevant code: Function
from_grib_step()
in cfmessage.pyRelated issues: #335
I believe this can be fixed by explicitly requesting "endStep" as an integer value, using the already implemented support for this in the
__getitem__()
of the Message class.More detail
The way in which GRIB files encode the information regarding the time which the given data represents, can be complicated due to the variety in possible messages (it can be a point in time, or some time range, for example). EcCodes, which is the underlying framework that cfgrib uses to parse GRIB files, generates a value called "endStep" based on the information in the GRIB file. Under the hood, cfgrib uses this value as the basis for the "step" dimension, and combines it with the "reference time" (called "time" by cfgrib) to create the additional "valid_time" coordinate for the "step" dimension. This all happens when creating the index file, which is then used to navigate the GRIB file after the initial open.
Many GRIB values can be returned as the integer value that was encoded in the GRIB file, or parsed to the string value that is encoded by that integer value. EcCodes can be requested to return the value as a specific type, but will default to what it consideres the "native type" when the type is omitted. Up until now, the default type for "endStep" has been an integer, but in ecCodes 2.34.0 this has changed. When "endStep" is not represented as a value in hours, "endStep" is provided as a string value, returning the time value with the time unit attached (e.g. a forecastTime=30 and indicatorOfUnitOfTimeRange=0 (minutes) would result in an endStep of "30m").
However, cfgrib attempts to do some of its own arithmetic, combining the value for "endStep" with its unit as given by "stepUnits" to express "step" as an amount of hours. But when "endStep" is returned as a string, this code fails. The ValueError raised is caught, "step" is interpreted to be missing (it gets the value "undef"), and the result is a Dataset without "step" dimension (and consequently without "valid_time" coordinate).
One thing that makes this issue worse is that it appears that while ecCodes will convert a GRIB with a step of 60 minutes to 1 hour, returning an integer, it does not do so for a step of 0 minutes to 0 hours. While this is arguably an error on ecCodes' side, it still impacts cfgrib. An example of this is GRIB files from the German DWD's ICON model, which have full-hour steps, but encode these in minutes.
Furthermore, there is this note on the ecCodes page regarding sub-hourly support:
This implies that cfgrib should get ready to support "endStep" to be a string value by default.
What are the steps to reproduce the bug?
Download a GRIB file with step expressed in minutes, for example any GRIB files from DWD's ICON model at t=0
https://opendata.dwd.de/weather/nwp/icon/grib/00/
Then in python, open the file with cfgrib:
Version
0.9.10.4
Platform (OS and architecture)
Linux a7b97a3efa9e 5.15.133.1-microsoft-standard-WSL2
Relevant log output
Accompanying data
https://opendata.dwd.de/weather/nwp/icon/grib/00/p/icon_global_icosahedral_model-level_2024022000_000_100_P.grib2.bz2
Organisation
No response
The text was updated successfully, but these errors were encountered: