Open
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
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #39 +/- ##
===========================================
- Coverage 97.44% 97.32% -0.13%
===========================================
Files 7 7
Lines 235 224 -11
Branches 7 7
===========================================
- Hits 229 218 -11
Misses 3 3
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates and standardizes the repository’s linting/formatting tooling (primarily via pre-commit), switching to Ruff for formatting, linting, and import sorting, and then applies the resulting auto-formatting across code, tests, docs, and CI/config YAML/TOML files.
Changes:
- Replace Black/isort-based pre-commit setup with Ruff-based checks/formatting plus unified YAML/TOML formatters.
- Apply Ruff/import/docstring formatting cleanups across Python sources and tests.
- Reformat various YAML/TOML configs (GitHub Actions workflows, conda env files, Read the Docs config) and a docs notebook cell.
Reviewed changes
Copilot reviewed 14 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.pre-commit-config.yaml |
Switches to Ruff check/format hooks and updates formatting hooks for YAML/TOML and docs linting. |
pyproject.toml |
Adds/expands Ruff configuration and applies TOML formatting/normalization. |
environment.yml |
YAML reformatting of the dev environment definition. |
tests/environment-unit-tests.yml |
YAML reformatting of the unit-test environment definition. |
.readthedocs.yml |
YAML reformatting of Read the Docs configuration. |
.github/workflows/ci.yml |
YAML reformatting of CI workflow triggers/paths-ignore. |
.github/workflows/legacy-ci.yml |
YAML reformatting of legacy CI workflow structure/steps. |
.github/workflows/cd-pypi.yml |
YAML reformatting of tag trigger definition. |
.github/workflows/notify-new-pr.yml |
YAML reformatting of PR notification workflow. |
.github/workflows/notify-new-issue.yml |
YAML reformatting of issue notification workflow. |
src/earthkit/geo/rotate.py |
Import consolidation and docstring formatting. |
src/earthkit/geo/distance.py |
Import consolidation. |
src/earthkit/geo/gisco.py |
Minor string formatting simplification (URL template and error message). |
src/earthkit/geo/constants.py |
Module docstring formatting. |
src/earthkit/geo/cartography.py |
Error message string formatting simplification. |
src/earthkit/geo/figure.py |
Docstring punctuation normalization. |
src/earthkit/geo/__init__.py |
Import consolidation. |
tests/test_rotate.py |
Import consolidation. |
tests/test_distance.py |
Import consolidation and minor tuple literal simplification in parametrization. |
tests/test_coord.py |
Import consolidation. |
tests/test_cartography.py |
Import consolidation. |
docs/examples/rotate.ipynb |
Notebook code cell formatted (quote style). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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: