• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Ouranosinc / xsdba / 16349269262
79%

Build:
DEFAULT BRANCH: main
Ran 17 Jul 2025 03:29PM UTC
Jobs 7
Files 23
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Jul 2025 03:25PM UTC coverage: 77.787% (-0.1%) from 77.89%
16349269262

push

github

web-flow
Allow additional grouping dimensions to be optional on some methods (#151)

<!-- Please ensure the PR fulfills the following requirements! -->
<!-- If this is your first PR, make sure to add your details to the
AUTHORS.rst! -->
### Pull Request Checklist:
- [x] This PR addresses an already opened issue (for bug fixes /
features)
  - This PR fixes #99 and fixes #144.
- [x] (If applicable) Documentation has been added / updated (for bug
fixes / features).
- [x] (If applicable) Tests have been added.
- [x] CHANGELOG.rst has been updated (with summary of main changes).
- [x] Link to issue (:issue:`number`) and pull request (:pull:`number`)
has been added.

### What kind of change does this PR introduce?
In some adjustment methods, the `Grouper`'s `add_dims` are made
optional, i.e. no error is raised if they do not appear on an array.
This enables things like pooling ensemble members in the train : `hist`
has a `"realization"` dim that `ref`does not have.

I was not able to think of a simpler way to implement this, so it's a
bit manual : each time a reducing operation is done, we filter the
`"dim"` variable to remove non-existent dims. The filter is implemented
as a static method of the `Grouper` object as it is expected to be used
in function that we send to `Grouper.apply`. This notably includes
function wrapped by `map_groups`.

I _think_ I found all spots where the filtering was needed, but I'm
pretty confident the tests do not cover all these. I'll try to make some
more tests.

### Does this PR introduce a breaking change?
No.

30 of 31 new or added lines in 2 files covered. (96.77%)

6 existing lines in 4 files now uncovered.

2784 of 3579 relevant lines covered (77.79%)

5.32 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
74.39
-0.35% src/xsdba/base.py

Uncovered Existing Lines

Lines Coverage ∆ File
1
94.44
-0.93% src/xsdba/detrending.py
1
80.81
-0.58% src/xsdba/units.py
2
74.39
-0.35% src/xsdba/base.py
2
73.62
-0.48% src/xsdba/utils.py
Jobs
ID Job ID Ran Files Coverage
1 run-Python3.12-conda - 16349269262.1 17 Jul 2025 03:29PM UTC 23
75.33
GitHub Action Run
2 run-Python3.10-conda - 16349269262.2 17 Jul 2025 03:29PM UTC 23
75.33
GitHub Action Run
3 run-Python3.13-conda - 16349269262.3 17 Jul 2025 03:29PM UTC 23
75.33
GitHub Action Run
4 run-Python3.11-conda - 16349269262.4 17 Jul 2025 03:30PM UTC 23
77.73
GitHub Action Run
5 run-3.12 - 16349269262.5 17 Jul 2025 03:32PM UTC 23
75.33
GitHub Action Run
6 run-3.10 - 16349269262.6 17 Jul 2025 03:32PM UTC 23
75.33
GitHub Action Run
7 run-3.11 - 16349269262.7 17 Jul 2025 03:32PM UTC 23
77.73
GitHub Action Run
Source Files on build 16349269262
  • Tree
  • List 23
  • Changed 6
  • Source Changed 3
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16349269262
  • 02799a09 on github
  • Prev Build on main (#16257014088)
  • Next Build on main (#16371708788)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc