From fd17d9b82b6170b7788450559895382cea6eb91e Mon Sep 17 00:00:00 2001 From: Benjamin Thomas Schwertfeger Date: Thu, 13 Nov 2025 09:03:13 +0100 Subject: [PATCH] Resolve "FutureWarning: xarray.merge will change" --- .github/workflows/_codecov.yaml | 2 +- .github/workflows/_test.yaml | 2 +- Makefile | 2 +- cmethods/core.py | 2 +- requirements-dev.txt | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_codecov.yaml b/.github/workflows/_codecov.yaml index 5ce8196..ad2d39b 100644 --- a/.github/workflows/_codecov.yaml +++ b/.github/workflows/_codecov.yaml @@ -50,7 +50,7 @@ jobs: run: python -m pip install . -r requirements-dev.txt - name: Generate coverage report - run: pytest --retries 1 --cov --cov-report=xml + run: pytest --retries 1 -n auto --cov --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 #v5.5.1 diff --git a/.github/workflows/_test.yaml b/.github/workflows/_test.yaml index 98bb6f9..e1077f9 100644 --- a/.github/workflows/_test.yaml +++ b/.github/workflows/_test.yaml @@ -41,4 +41,4 @@ jobs: run: python -m pip install --user . -r requirements-dev.txt - name: Run unit tests - run: pytest -vv --retries 1 tests + run: pytest -vv --retries 1 -n auto tests diff --git a/Makefile b/Makefile index 53da14f..17b8a5a 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ UV := uv PYTHON := python PYTEST := $(UV) run pytest TESTS := tests -PYTEST_OPTS := -vv --junit-xml=pytest.xml +PYTEST_OPTS := -vv -x -n auto --junit-xml=pytest.xml PYTEST_COV_OPTS := $(PYTEST_OPTS) --cov=cmethods --cov-report=xml:coverage.xml --cov-report=term ## ======= M A K E F I L E - T A R G E T S ===================================== diff --git a/cmethods/core.py b/cmethods/core.py index e757958..bbb25b1 100644 --- a/cmethods/core.py +++ b/cmethods/core.py @@ -246,7 +246,7 @@ def adjust( **kwargs, ) - result = monthly_result if result is None else xr.merge([result, monthly_result]) + result = monthly_result if result is None else xr.merge([result, monthly_result], compat="no_conflicts", join="outer") return _add_cmethods_metadata(result, method, **metadata_kwargs) diff --git a/requirements-dev.txt b/requirements-dev.txt index c21de7c..239ebc1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,6 +3,7 @@ matplotlib pytest pytest-cov pytest-retry +pytest-xdist scikit-learn scipy venv-kernel