Skip to content

Conversation

@Zeitsperre
Copy link
Collaborator

@Zeitsperre Zeitsperre commented Nov 21, 2025

Pull Request Checklist:

  • This PR addresses an already opened issue (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features)
    • (If applicable) Documentation has been added / updated (for bug fixes / features)
  • CHANGELOG.rst has been updated (with summary of main changes)
    • Link to issue (:issue:number) and pull request (:pull:number) has been added

What kind of change does this PR introduce?

  • Modifies a few of the squelched RuntimeWarning messages in order to provide more information for users of indices, while silencing these messages for indicator users and the CLI.
  • Updates pytest to the latest conventions (version 9.0+), enabling the new strict mode.

Does this PR introduce a breaking change?

For some developers, yes. There will likely be more noise emitted from workflows relying on xclim.indices. These can be set to be ignored using context managers:

with numpy.errstate(divide='ignore'):
    ...

or:

with warnings.catch_warnings():
    warnings.simplefilter("ignore")
    ...

Other information:

The new pytest now offers a strict mode. This means that configurations for markers and xfail must be explicitly defined, parametrizations must always be uniquely-defined, and the configuration found in pyproject.toml must not contain any errors. For more information: https://docs.pytest.org/en/stable/reference/reference.html#confval-strict

xarray merging operations will soon change to raise errors when data is overwritten

Signed-off-by: Zeitsperre <[email protected]>
Base automatically changed from tox-toml to main November 21, 2025 17:03
@Zeitsperre Zeitsperre self-assigned this Nov 24, 2025
@Zeitsperre Zeitsperre added standards / conventions Suggestions on ways forward dependencies Pull requests that update a dependency file labels Nov 24, 2025
@Zeitsperre Zeitsperre added this to the v0.60.0 milestone Nov 24, 2025
…ces, add silencing in idicator calls

Signed-off-by: Zeitsperre <[email protected]>
@github-actions github-actions bot added the indicators Climate indices and indicators label Nov 27, 2025
Signed-off-by: Zeitsperre <[email protected]>
@Zeitsperre Zeitsperre marked this pull request as ready for review November 27, 2025 21:37
Copy link
Collaborator

@aulemahal aulemahal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

@github-actions github-actions bot added the approved Approved for additional tests label Dec 3, 2025
@coveralls
Copy link

Coverage Status

coverage: 92.101% (-0.005%) from 92.106%
when pulling 2422c74 on pytest-v9
into 8ce7a2c on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Approved for additional tests dependencies Pull requests that update a dependency file indicators Climate indices and indicators standards / conventions Suggestions on ways forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should we be showing numpy RuntimeWarnings?

4 participants