id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 1985010450,PR_kwDOAMm_X85fAHx-,8433,Raise exception in to_dataset if resulting variable is also the name of a coordinate,20118130,closed,0,,,12,2023-11-09T07:38:20Z,2023-11-14T22:28:17Z,2023-11-14T22:28:17Z,CONTRIBUTOR,,0,pydata/xarray/pulls/8433," Let me know if you think the error message is unclear or too verbose or too fancy or something. - [x] Closes #7823 - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8433/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1857713530,PR_kwDOAMm_X85YTTNH,8089,WIP: Factor out a function for checking dimension-related errors,20118130,open,0,,,4,2023-08-19T13:35:29Z,2023-09-12T18:59:32Z,,CONTRIBUTOR,,1,pydata/xarray/pulls/8089,"This is a WIP follow-up for #8079 and I think also for #7051. The pattern ```python missing_dims = set(dims) - set(self.dims) if missing_dims: raise ValueError(f""Dimensions {missing_dims} not found in data dimensions {tuple(self.dims)}"") ``` occurs in many methods, with small variations in the way `missing_dims` is calculated, the error message, and also if it's `ValueError` or `KeyError`. So it would make sense to factor it out. But I'm not familiar enough with the context around #7051 to know how to deal with sets vs tuples, so this is just a sketch for now. - [ ] Tests added - [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst` - [ ] New functions/methods are listed in `api.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8089/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1855291078,PR_kwDOAMm_X85YLGz2,8079,Consistently report all dimensions in error messages if invalid dimensions are given,20118130,closed,0,,,11,2023-08-17T16:03:53Z,2023-09-09T04:55:43Z,2023-09-09T04:55:43Z,CONTRIBUTOR,,0,pydata/xarray/pulls/8079,"Hello, I noticed that `arr.min(""nonexistent"")` raises an error with a very helpful message ``` ValueError: 'nonexistent' not found in array dimensions ('x', 'y', 'z') ``` while `arr.idxmin(""nonexistent"")` raises ``` KeyError: 'Dimension ""nonexistent"" not in dimension' [sic] ``` IMO, the list of dimensions should always be shown in the error message for these kinds of errors, it makes debugging much easier. With this PR, I have implemented this behavior for all such functions that I could find. There is quite a consistent pattern which I think could be factored out into a function, but I didn't have a clear enough picture of the structure of the whole code to do it. I didn't fix the tests yet, I'll do it if you think this can be merged. - [x] Searched list of issues, couldn't find one related to this - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst`","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8079/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1740268634,PR_kwDOAMm_X85SHW1Z,7891,Add errors option to curvefit,20118130,closed,0,,,3,2023-06-04T09:43:06Z,2023-06-16T03:15:07Z,2023-06-16T03:15:06Z,CONTRIBUTOR,,0,pydata/xarray/pulls/7891,"- [x] Closes #6317 and closes #6515 - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` This is a rebased version of #6515, with the arg `errors = ""raise"" | ""ignore""` added to `Dataset` and `DataArray`, and with tests. Let me know if the tests should be expanded further.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7891/reactions"", ""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1741050111,PR_kwDOAMm_X85SJ-xN,7893,Fix flaky doctest for curvefit,20118130,closed,0,,,1,2023-06-05T06:10:30Z,2023-06-09T15:38:58Z,2023-06-09T15:38:58Z,CONTRIBUTOR,,0,pydata/xarray/pulls/7893,"Fix flaky doctest introduced in #7821, see https://github.com/pydata/xarray/pull/7821#issuecomment-1537142237. This uses the `NUMBER` option to compare the output with less decimal precision. It's not part of standard doctest but an extension from pytest: https://docs.pytest.org/en/7.1.x/how-to/doctest.html#using-doctest-options Another option would be to use `...` and the built-in `+ELLIPSIS` option, but IMO the current version is less confusing for someone reading the example.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7893/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1698626185,PR_kwDOAMm_X85P6owK,7821,Implement multidimensional initial guess and bounds for `curvefit`,20118130,closed,0,,,6,2023-05-06T13:09:49Z,2023-06-01T15:51:40Z,2023-05-31T12:43:07Z,CONTRIBUTOR,,0,pydata/xarray/pulls/7821,"- [x] Closes #7768 - [x] Tests added - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` With this PR, it's possible to pass an initial guess to `curvefit` that is a DataArray, which will be broadcast to the data dimensions. This way, the initial guess can vary with the data coordinates. I also added examples of using `curvefit` to the documentation, both a basic example and one with the multidimensional guess. I have a couple of questions: - Should we change the signature to `p0: dict[str, float | DataArray] | None`, instead of `dict[str, Any]` (and same for bounds)? scipy only optimizes over scalars, so I think it would be safe to assume that the values should either be those, or arrays that can be broadcast. - The usage example of curvefit is only in the docstring for DataArray, so now the docs differ between DA and dataset. But the example uses a DataArray only, so this should be ok, right?","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7821/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1698632575,PR_kwDOAMm_X85P6qCY,7822,Fix typos in contribution guide,20118130,closed,0,,,1,2023-05-06T13:29:22Z,2023-05-07T09:12:57Z,2023-05-07T07:34:56Z,CONTRIBUTOR,,0,pydata/xarray/pulls/7822,,"{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7822/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 1345816120,PR_kwDOAMm_X849h97w,6944,Fix step plots with hue,20118130,closed,0,,,2,2022-08-22T05:00:14Z,2022-08-28T12:39:33Z,2022-08-25T15:56:11Z,CONTRIBUTOR,,0,pydata/xarray/pulls/6944,"This PR fixes the broadcasting error when trying to plot multiple step plots, like `arr.plot.step(..., hue=...)` or `arr.plot(..., drawstyle=""steps-mid"")`. Previously, this raised a shape error, as mentioned in https://github.com/pydata/xarray/issues/4288#issuecomment-666485140. Some other relevant work was started (but apparently unfinished) in #4868 and #4866, this doesn't implement those. - [x] Tests added - [x] Fixes applied - [x] User visible changes (including notable bug fixes) are documented in `whats-new.rst` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6944/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull