Skip to content

Fixing warnings in the test suite - #3029

Merged
erikvansebille merged 2 commits into
Parcels-code:mainfrom
erikvansebille:fix-pytest-warnings
Nov 3, 2026
Merged

erikvansebille merged 2 commits into
Parcels-code:mainfrom
erikvansebille:fix-pytest-warnings

Conversation

@erikvansebille

Copy link
Copy Markdown
Member

Description

This PR fixes the following warnings

tests/test_field.py::test_vectorfield_init_different_time_intervals
  /Users/erik/Codes/parcels/tests/test_field.py:93: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.
    ds = xr.merge([dsU, dsV])

tests/test_spatialhash.py::test_nan_node_invalidates_touching_faces
  /Users/erik/Codes/parcels/.pixi/envs/default/lib/python3.14/site-packages/numpy/linalg/_linalg.py:2406: RuntimeWarning: invalid value encountered in det
    r = _umath_linalg.det(a, signature=signature)

Checklist

  • This PR targets the correct branch (main for normal development, v3-support for v3 support)

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
    • Describe how you used it (e.g., by pasting your prompt):

Asked Claude Sonnet to help me fix the specific warnings

Fixng the warnings
```
tests/test_field.py::test_vectorfield_init_different_time_intervals
  /Users/erik/Codes/parcels/tests/test_field.py:93: FutureWarning: In a future version of xarray the default value for compat will change from compat='no_conflicts' to compat='override'. This is likely to lead to different results when combining overlapping variables with the same name. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set compat explicitly.
    ds = xr.merge([dsU, dsV])

tests/test_spatialhash.py::test_nan_node_invalidates_touching_faces
  /Users/erik/Codes/parcels/.pixi/envs/default/lib/python3.14/site-packages/numpy/linalg/_linalg.py:2406: RuntimeWarning: invalid value encountered in det
    r = _umath_linalg.det(a, signature=signature)
```
@erikvansebille
erikvansebille enabled auto-merge (squash) November 3, 2026 11:00
@erikvansebille
erikvansebille merged commit 6fd1340 into Parcels-code:main Nov 3, 2026
19 of 20 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Parcels development Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants