Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ jobs:

echo "Running benchmark on develop"
git checkout --detach origin/develop
uvx --python 3.13 --with tox-uv tox -e benchmark -- --benchmark-json baseline.json
uvx --python 3.14 --with tox-uv tox -e benchmark -- --benchmark-json baseline.json

echo "Running benchmark on current ref"
git checkout --detach "${CURRENT_SHA}"
uvx --python 3.13 --with tox-uv tox -e benchmark -- --benchmark-json candidate.json
uvx --python 3.14 --with tox-uv tox -e benchmark -- --benchmark-json candidate.json

echo "Comparing benchmark results"
uvx --python 3.13 \
uvx --python 3.14 \
--with "pytest-benchmark @ git+https://github.com/ionelmc/pytest-benchmark.git@master" \
pytest-benchmark compare --between=median \
baseline.json candidate.json \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.9, "3.13"]
python-version: [3.9, "3.14"]
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout the repo
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: GIS"
]
Expand Down
9 changes: 7 additions & 2 deletions tests/integration/test_eoproduct_xarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ def test_to_xarray_local(self):
)
product.location = path_to_uri(products_path)

# cfgrib relies on eccodes which may not be available on all platforms;
# without it the .grib product cannot be opened
cfgrib_available = "cfgrib" in xr.backends.list_engines()
expected_len = 3 if cfgrib_available else 2

with product.to_xarray() as xarray_dict:
self.assertIsInstance(xarray_dict, XarrayDict)
self.assertEqual(len(xarray_dict), 3)
self.assertEqual(len(xarray_dict), expected_len)

sorted_keys = sorted(xarray_dict.keys())
# sort
Expand All @@ -66,7 +71,7 @@ def test_to_xarray_local(self):
# check representations
xd_repr = xarray_dict.__repr__()
self.assertIsInstance(xd_repr, str)
self.assertTrue(xd_repr.startswith("<XarrayDict> (3)\n{"))
self.assertTrue(xd_repr.startswith(f"<XarrayDict> ({expected_len})\n{{"))
self.assertTrue(xd_repr.endswith("}"))
self.assertIn("Dataset", xd_repr)
xd_repr_html = xarray_dict._repr_html_()
Expand Down
6 changes: 4 additions & 2 deletions tests/units/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ def test_guess_engines(self, mock_head, mock_get):
file = OpenFile(fs, "https://foo/bar.nc")
self.assertIn("h5netcdf", guess_engines(file))

file = OpenFile(fs, "https://foo/bar.grib")
self.assertIn("cfgrib", guess_engines(file))
# cfgrib relies on eccodes which may not be available on all platforms
if "cfgrib" in all_engines:
file = OpenFile(fs, "https://foo/bar.grib")
self.assertIn("cfgrib", guess_engines(file))

@mock.patch("eodag_cube.utils.xarray.guess_engines", return_value=["h5netcdf", "foo"])
@mock.patch("fsspec.open")
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py39, py10, py311, py312, py313, pypi, linters
envlist = py39, py10, py311, py312, py313, py314, pypi, linters
skipsdist = True

# Mapping required by tox-gh-actions, only used in CI
Expand All @@ -10,6 +10,7 @@ python =
3.11: py311
3.12: py312
3.13: py313
3.14: py314

[testenv]
install_command = uv pip install --upgrade {opts} {packages}
Expand Down
Loading