Skip to content

Add CI filter to fail on all parcels warnings - #2777

Open
erikvansebille wants to merge 9 commits into
Parcels-code:mainfrom
erikvansebille:fail_CI_on_parcels_warnings
Open

Add CI filter to fail on all parcels warnings#2777
erikvansebille wants to merge 9 commits into
Parcels-code:mainfrom
erikvansebille:fail_CI_on_parcels_warnings

Conversation

@erikvansebille

Copy link
Copy Markdown
Member

Description

As seen in #2775, it would be good to have CI fail when the unit tests throw warnings, as also proposed in #2413. This PR implements that

Checklist

AI Disclosure

None

Avoiding warning "UserWarning: Variables {'fesom_mesh'} not found in object but are referred to in the CF attributes"
  /Users/erik/Codes/parcels/tests/test_advection.py:97: FutureWarning: In a future version of xarray the default value for data_vars will change from data_vars='all' to data_vars=None. This is likely to lead to different results when multiple datasets have matching variables with overlapping values. To opt in to new defaults and get rid of these warnings now use `set_options(use_new_combine_kwarg_defaults=True) or set data_vars explicitly.
@erikvansebille

Copy link
Copy Markdown
Member Author

There is only one warning left on the test-suite:

tests/test_xarray.py::test_open_raw_zarr[2d_left_unrolled_cone]
  /Users/erik/Codes/parcels/.pixi/envs/default/lib/python3.14/site-packages/zarr/api/asynchronous.py:231: 
ZarrUserWarning: Consolidated metadata is currently not part in the Zarr format 3 specification. 
It may not be supported by other zarr implementations and may change in the future.
    warnings.warn(

Not sure if this is something we want to keep; or also want to suppress. Any thoughts, @VeckoTheGecko

@erikvansebille
erikvansebille marked this pull request as ready for review July 28, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Update pytest filterwarnings to fail on warnings originating from Parcels code

1 participant