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>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #14 +/- ##
============================================
+ Coverage 61.33% 99.57% +38.23%
============================================
Files 24 11 -13
Lines 1239 467 -772
============================================
- Hits 760 465 -295
+ Misses 479 2 -477 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Mar 16, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates the linting and formatting toolchain for earthkit-time, replacing black and isort with ruff, and converting relative imports to absolute imports to fix non-editable installs. This is part of a coordinated effort across all earthkit packages.
Changes:
- Replaced
black/isortwithrufffor formatting, linting, and import sorting; added.pre-commit-config.yamland QA workflow - Converted all relative imports to absolute imports (e.g.,
from .calendar→from earthkit.time.calendar) to fixpip install .(non-editable) installs - Reformatted code to comply with 120-character line length and ruff's formatting style
Reviewed changes
Copilot reviewed 24 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.pre-commit-config.yaml |
New pre-commit config with ruff, mdformat, yaml/toml formatters, gitleaks |
.github/workflows/qa.yml |
New QA workflow for pre-commit and pytest |
.github/workflows/ci.yml |
Removed python_qa: true, YAML formatting fixes |
.github/workflows/cd.yml |
YAML formatting fix |
.github/workflows/cd-test-pypi.yml |
New test-cd workflow for test PyPI |
pyproject.toml |
Added ruff config, removed isort/black config, removed "src" from testpaths |
src/earthkit/time/sequence.py |
Absolute imports, docstring periods, ruff reformatting |
src/earthkit/time/climatology.py |
Absolute imports, docstring periods, ruff reformatting |
src/earthkit/time/calendar.py |
Docstring periods |
src/earthkit/time/data/__init__.py |
Ruff reformatting, docstring periods |
src/earthkit/time/cli/*.py |
Absolute imports, ruff reformatting |
tests/*.py |
Ruff reformatting (line length changes) |
CHANGELOG.md |
Changed * to - for list items |
README.md |
Minor formatting fixes |
.readthedocs.yaml |
YAML indentation fix |
docs/api/sequence.rst |
Trailing whitespace removal |
src/earthkit/time/data/sequences/*.yaml |
Trailing whitespace fixes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| to_weekday, | ||
| ) | ||
|
|
||
| from .data import load_yaml |
| testpaths = [ | ||
| "src", | ||
| "tests", | ||
| "tests" |
pyproject.toml
Outdated
| [tool.ruff.lint] | ||
| ignore = [ | ||
| "D1", # pydocstyle: Missing Docstrings | ||
| "D107", # pydocstyle: numpy convention |
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:
Fixes the testsuite.
Before it failed when doing
only an editable install, i.e.
worked.
For this also changed to absolute over relative imports.
Contributor Declaration
By opening this pull request, I affirm the following: