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

Ouranosinc / xscen / 21871047982
90%

Build:
DEFAULT BRANCH: main
Ran 10 Feb 2026 03:36PM UTC
Jobs 4
Files 17
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

10 Feb 2026 03:26PM UTC coverage: 89.871% (-0.4%) from 90.303%
21871047982

push

github

web-flow
Obs utils (#619)

<!-- 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:
- [ ] This PR addresses an already opened issue (for bug fixes /
features)
    - This PR fixes #xyz
- [x] (If applicable) Documentation has been added / updated (for bug
fixes / features).
- [x] (If applicable) Tests have been added.
- [x] This PR does not seem to break the templates.
- [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?

Adds the  following functions to `xs.spatial`

- `dataset_extent` which returns a "region" dict with the extent of a
given dataset.
- `merge_duplicated_stations` : merges stations with the same location
from a station-obs dataset
- `voronoi_weights` : For a stations dataset, return a weight that is
inversely proportional to the station density around each station. The
idea is to remove station density bias when taking means of parameters
computed over stations.
- Fast-track for `subset(..., 'gridpoint')` : When the CRS of the source
is known, we convert the requested lat/lon points to this CRS allowing
the use of xarray's `sel` instead of having to compute distances in
rotated 2D space. Only works, when none of the fancy options of
`clisops` are requested.

Also, these changes:
- Fix for scipy 1.16. This fix is different than what @juliettelavoie
did in #616. Here, I preserve the behaviour. Which do we prefer ?
- Fixes in `subset`:
+ `method='gridpoint'` : when the lon/lat is a DataArray, its dimension
name is preserved (instead of being replaced by `site`)
    + `method='shape'` : a shapely polygon is also accepted
- `get_grid_mapping` : allow a grid mapping to be in the data vars as
well
- Doc of regions : I tried to add a `Region` typevar in the aim of
having better anno... (continued)

95 of 128 new or added lines in 4 files covered. (74.22%)

4374 of 4867 relevant lines covered (89.87%)

3.59 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
95.17
-0.3% src/xscen/utils.py
31
86.77
-7.86% src/xscen/spatial.py
Jobs
ID Job ID Ran Files Coverage
1 run-Python3.10-conda - 21871047982.1 10 Feb 2026 03:36PM UTC 17
89.5
GitHub Action Run
2 run-Python3.11-conda - 21871047982.2 10 Feb 2026 03:37PM UTC 17
89.87
GitHub Action Run
3 run-Python3.13-conda - 21871047982.3 10 Feb 2026 03:37PM UTC 17
89.87
GitHub Action Run
4 run-Python3.12-conda - 21871047982.4 10 Feb 2026 03:36PM UTC 17
89.87
GitHub Action Run
Source Files on build 21871047982
  • Tree
  • List 17
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21871047982
  • 88e866bf on github
  • Prev Build on main (#21644830597)
  • Next Build on main (#21961611896)
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