Skip to content

Replace time_dim_mode with time_dims#967

Merged
sandorkertesz merged 3 commits into
developfrom
feature/remove-time_dim_mode
Apr 21, 2026
Merged

Replace time_dim_mode with time_dims#967
sandorkertesz merged 3 commits into
developfrom
feature/remove-time_dim_mode

Conversation

@pawel-wolff
Copy link
Copy Markdown
Contributor

@pawel-wolff pawel-wolff commented Apr 20, 2026

Description

The Xarray engine kwarg time_dim_mode has been replaced with time_dims - an explicit list of time-related dimension role names.

Tests, examples and documentation have been adapted accordingly.

As an extra, a mechanism of ignoring a colliding dimension has been improved: if a dimension declared in the kwarg extra_dims collides with pre-defined dimensions, then it is silently ignored. A related paragraph in the documentation has been added, as well as relevant tests.

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

Tests, examples and documentation adapted accordingly
Doc on dimensions updated.
Tests for the new `time_dims` kwarg and dim collisions added.
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.29577% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.26%. Comparing base (afa2ec6) to head (27421fd).

Files with missing lines Patch % Lines
tests/xr_engine/test_xr_engine_indexing.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #967      +/-   ##
===========================================
+ Coverage    81.08%   81.26%   +0.17%     
===========================================
  Files          222      223       +1     
  Lines        14489    14624     +135     
  Branches       718      718              
===========================================
+ Hits         11749    11884     +135     
  Misses        2521     2521              
  Partials       219      219              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sandorkertesz sandorkertesz merged commit 5eb79ea into develop Apr 21, 2026
133 of 143 checks passed
@sandorkertesz
Copy link
Copy Markdown
Collaborator

@pawel-wolff, thank your for this important development and for writing all the docs and tests.

@pawel-wolff pawel-wolff deleted the feature/remove-time_dim_mode branch April 21, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants