Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Mar 16, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates and unifies linting/formatting tooling across the repository, moving formatting/linting/import sorting to Ruff and aligning pre-commit + CI configuration accordingly.
Changes:
- Update
.pre-commit-config.yamlto newerruff-pre-commitand adjust Ruff hook arguments/exclusions. - Update
pyproject.tomlRuff configuration (line length, lint settings) and normalize optional dependency declarations. - Apply formatting-only changes across scripts, tests, and documentation notebooks/YAML/workflows to match the new tooling.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/xclim_wrappers_generator.py | Formatting-only updates to align with new formatter. |
| tests/unit/utils/test_conversions.py | Import formatting normalized. |
| tests/unit/conftest.py | Formatting-only updates for dataset fixtures. |
| src/earthkit/climate/utils/percentile.py | Formatting-only change in sel(...) call. |
| pyproject.toml | Update Ruff config + rework optional-dependencies declaration. |
| docs/notebooks/performance_analysis.ipynb | Formatting-only changes inside notebook code cells. |
| docs/notebooks/climate_indices_analysis.ipynb | Formatting-only import line change in notebook cell. |
| .readthedocs.yaml | Whitespace cleanup only. |
| .pre-commit-config.yaml | Ruff hook rev bump + new args/exclude configuration. |
| .github/workflows/qa.yml | Whitespace cleanup only. |
| .github/workflows/label-public-pr.yml | Whitespace cleanup only. |
| .github/workflows/cd-test-pypi.yml | Whitespace cleanup only. |
| .github/workflows/cd-pypi.yml | Whitespace cleanup only. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
chpolste
approved these changes
Mar 17, 2026
mcocdawc
added a commit
to ecmwf/earthkit-plots
that referenced
this pull request
Mar 23, 2026
Updated and unified the pre-commit hooks in all earthkit packages. Some of them were failing the test suite just because of the pre-commit hooks. Fixing this it was a good opportunity to unify settings. Uses now `ruff` for formatting (former `black`), linting, and import sort (former `isort`) The following PRs do the same changes in all the earthkit packages: - ecmwf/earthkit-climate#43 - ecmwf/earthkit-data#927 - ecmwf/earthkit-geo#39 - ecmwf/earthkit-hydro#178 - ecmwf/earthkit-meteo#125 - #176 - ecmwf/earthkit-time#14 - ecmwf/earthkit-transforms#87 - ecmwf/earthkit-workflows#173 In `earthkit-plots` in particular, it prevents now directly pushing to `develop` and checks the pre-commit hooks as part of the CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updated and unified the pre-commit hooks in all earthkit packages.
Some of them were failing the test suite just because of the pre-commit hooks.
Fixing this it was a good opportunity to unify settings.
Uses now
rufffor formatting (formerblack), linting, and import sort (formerisort)The following PRs do the same changes in all the earthkit packages:
Contributor Declaration
By opening this pull request, I affirm the following: