Skip to content

Commit 8bc1a74

Browse files
committed
Merge remote-tracking branch 'origin/main' into async-dtreec
2 parents 8cf3ad7 + dfe98a4 commit 8bc1a74

41 files changed

Lines changed: 479 additions & 340 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Nightly Wheel Build/Upload Failed
2+
3+
**Workflow:** {{WORKFLOW}}
4+
**Run:** [{{RUN_ID}}]({{RUN_URL}})
5+
**Date:** {{DATE}}
6+
7+
The nightly wheel build or upload to the `scientific-python-nightly-wheels` index has failed.
8+
9+
Please check the [workflow run]({{RUN_URL}}) for details.
10+
11+
This issue was automatically generated from the nightly wheel workflow.

.github/workflows/nightly-wheels.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ on:
33
workflow_dispatch:
44
schedule:
55
- cron: "0 0 * * *"
6+
7+
permissions:
8+
contents: read
9+
issues: write
10+
611
jobs:
712
cron:
813
runs-on: ubuntu-latest
@@ -21,12 +26,14 @@ jobs:
2126
python -m pip install build twine
2227
2328
- name: Build tarball and wheels
29+
id: build
2430
run: |
2531
git clean -xdf
2632
git restore -SW .
2733
python -m build
2834
2935
- name: Check built artifacts
36+
id: check
3037
run: |
3138
python -m twine check --strict dist/*
3239
pwd
@@ -38,7 +45,40 @@ jobs:
3845
fi
3946
4047
- name: Upload wheel
48+
id: upload
4149
uses: scientific-python/upload-nightly-action@5748273c71e2d8d3a61f3a11a16421c8954f9ecf # 0.6.3
4250
with:
4351
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_NIGHTLY }}
4452
artifacts_path: dist
53+
54+
- name: Create or update failure issue
55+
if: ${{ failure() }}
56+
shell: bash
57+
run: |
58+
# Read the template
59+
template=$(cat .github/nightly-wheel-failure-template.md)
60+
61+
# Replace placeholders
62+
issue_body="${template//\{\{WORKFLOW\}\}/${{ github.workflow }}}"
63+
issue_body="${issue_body//\{\{RUN_ID\}\}/${{ github.run_id }}}"
64+
issue_body="${issue_body//\{\{RUN_URL\}\}/${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}}"
65+
issue_body="${issue_body//\{\{DATE\}\}/$(date -u)}"
66+
67+
# Check for existing open issue with same title
68+
issue_title="Nightly wheel build/upload failed"
69+
existing_issue=$(gh issue list --state open --label "CI" --search "\"$issue_title\" in:title" --json number --jq '.[0].number // empty')
70+
71+
if [ -n "$existing_issue" ]; then
72+
echo "Found existing open issue #$existing_issue, updating it..."
73+
echo "$issue_body" | gh issue edit "$existing_issue" --body-file -
74+
echo "Updated existing issue #$existing_issue"
75+
else
76+
echo "No existing open issue found, creating new one..."
77+
echo "$issue_body" | gh issue create \
78+
--title "$issue_title" \
79+
--body-file - \
80+
--label "CI"
81+
echo "Created new issue"
82+
fi
83+
env:
84+
GH_TOKEN: ${{ github.token }}

doc/contribute/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ a user passes ``old_arg``, we would instead catch it:
576576
emit_user_level_warning(
577577
"`old_arg` has been deprecated, and in the future will raise an error."
578578
"Please use `new_arg` from now on.",
579-
DeprecationWarning,
579+
FutureWarning,
580580
)
581581
582582
# Still do what the user intended here

doc/get-help/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ How stable is Xarray's API?
423423

424424
Xarray tries very hard to maintain backwards compatibility in our :ref:`api` between released versions.
425425
Whilst we do occasionally make breaking changes in order to improve the library,
426-
we `signpost changes <https://docs.xarray.dev/en/stable/contributing.html#backwards-compatibility>`_ with ``DeprecationWarnings`` for many releases in advance.
426+
we `signpost changes <https://docs.xarray.dev/en/stable/contributing.html#backwards-compatibility>`_ with ``FutureWarnings`` for many releases in advance.
427427
(An exception is bugs - whose behaviour we try to fix as soon as we notice them.)
428428
Our `test-driven development practices <https://docs.xarray.dev/en/stable/contributing.html#test-driven-development-code-writing>`_ helps to ensure any accidental regressions are caught.
429429
This philosophy applies to everything in the `public API <https://docs.xarray.dev/en/stable/getting-started-guide/faq.html#what-parts-of-xarray-are-considered-public-api>`_.

doc/user-guide/io.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ __ https://www.unidata.ucar.edu/software/netcdf/
311311
If you aren't familiar with this data format, the `netCDF FAQ`_ is a good
312312
place to start.
313313

314-
.. _netCDF FAQ: https://www.unidata.ucar.edu/software/netcdf/docs/faq.html#What-Is-netCDF
314+
.. _netCDF FAQ: https://docs.unidata.ucar.edu/netcdf-c/current/faq.html
315315

316316
Reading and writing netCDF files with xarray requires scipy, h5netcdf, or the
317317
`netCDF4-Python`__ library to be installed. SciPy only supports reading and writing

doc/whats-new.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,20 @@ New Features
1818
the maximum number of concurrent I/O operations when opening groups in parallel
1919
with the Zarr backend (:pull:`10742`).
2020
By `Alfonso Ladino <https://github.com/aladinor>`_.
21+
- :py:class:`~xarray.indexes.NDPointIndex` now supports coordinates with fewer
22+
dimensions than coordinate variables, enabling indexing of scattered points
23+
and trajectories where multiple coordinates (e.g., ``x``, ``y``) share a
24+
single dimension (e.g., ``points``) (:issue:`10940`, :pull:`11116`).
25+
By `Ian Hunt-Isaak <https://github.com/ianhi>`_.
2126

2227
Breaking Changes
2328
~~~~~~~~~~~~~~~~
2429

30+
- When deprecating functionality, xarray has sometimes used ``FutureWarning``
31+
and sometimes used ``DeprecationWarning``. ``DeprecationWarning`` is
32+
not intended to be visible to end-users so this version of xarray
33+
switches to using ``FutureWarning`` everywhere (:pull:`11112`).
34+
By `Julia Signell <https://github.com/jsignell>`_.
2535

2636
Deprecations
2737
~~~~~~~~~~~~
@@ -30,6 +40,8 @@ Deprecations
3040
Bug Fixes
3141
~~~~~~~~~
3242

43+
- Fix slicing with negative step (:issue:`11000` and :pull:`11044`).
44+
By `Antonio Valentino <https://github.com/avalentino>`_.
3345
- Fix ``.plot`` error when using positional args with ``col`` and
3446
``row`` (:issue:`11104` :pull:`11111`).
3547
By `Julia Signell <https://github.com/jsignell>`_.
@@ -38,6 +50,9 @@ Bug Fixes
3850
- Fix silent data corruption when writing dask arrays to sharded Zarr stores.
3951
Dask chunk boundaries must now align with shard boundaries, not just internal
4052
Zarr chunk boundaries (:issue:`10831`).
53+
- Fix :py:meth:`Dataset.sortby` and :py:meth:`DataArray.sortby` placing NaN values
54+
at the beginning instead of the end when using ``ascending=False`` (:issue:`7358`).
55+
By `Kristian Kollsgård <https://github.com/kkollsga>`_.
4156

4257
Documentation
4358
~~~~~~~~~~~~~

pixi.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ platforms = ["win-64", "linux-64", "osx-arm64"]
55

66
[package]
77
name = "xarray"
8-
version = "dynamic" # dynamic versioning needs better support in pixi https://github.com/prefix-dev/pixi/issues/2923#issuecomment-2598460666 . Putting `version = "dynamic"` here for now until pixi recommends something else.
8+
version = "9999.0.0" # dynamic versioning needs better support in pixi https://github.com/prefix-dev/pixi/issues/2923#issuecomment-2598460666 . Putting `version = "..."` here for now until pixi recommends something else.
99

1010
[package.build]
1111
backend = { name = "pixi-build-python", version = ">=0.4.4" }
@@ -238,9 +238,7 @@ sphinxcontrib-srclinks = "*"
238238
sphinx-remove-toctrees = "*"
239239
sphinxext-opengraph = "*"
240240
sphinxext-rediraffe = "*"
241-
242-
[feature.doc.pypi-dependencies]
243-
cfgrib = "*" # pypi dep because of https://github.com/prefix-dev/pixi/issues/3032#issuecomment-3302638043
241+
cfgrib = "*"
244242

245243
[feature.doc.tasks]
246244
doc = { cmd = "make html", cwd = "doc" }

properties/test_index_manipulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ def drop_dims(self, data):
195195
)
196196
)
197197
note(f"> drop_dims: {dims}")
198-
# TODO: dropping a multi-index dimension raises a DeprecationWarning
198+
# TODO: dropping a multi-index dimension raises a FutureWarning
199199
with warnings.catch_warnings():
200-
warnings.simplefilter("ignore", category=DeprecationWarning)
200+
warnings.simplefilter("ignore", category=FutureWarning)
201201
self.dataset = self.dataset.drop_dims(dims)
202202

203203
for dim in dims:

xarray/backends/pydap_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def open(
123123
emit_user_level_warning(
124124
"`output_grid` is deprecated and will be removed in a future version"
125125
" of xarray. Will be set to `None`, the new default. ",
126-
DeprecationWarning,
126+
FutureWarning,
127127
)
128128
output_grid = False # new default behavior
129129

xarray/backends/writers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def save_mfdataset(
567567
<xarray.Dataset> Size: 768B
568568
Dimensions: (time: 48)
569569
Coordinates:
570-
* time (time) datetime64[ns] 384B 2010-01-31 2010-02-28 ... 2013-12-31
570+
* time (time) datetime64[us] 384B 2010-01-31 2010-02-28 ... 2013-12-31
571571
Data variables:
572572
a (time) float64 384B 0.0 0.02128 0.04255 ... 0.9574 0.9787 1.0
573573
>>> years, datasets = zip(*ds.groupby("time.year"))

0 commit comments

Comments
 (0)