home / github

Menu
  • Search all tables
  • GraphQL API

issues

Table actions
  • GraphQL API for issues

131 rows where type = "pull" and user = 10194086 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: comments, draft, created_at (date), updated_at (date), closed_at (date)

state 2

  • closed 130
  • open 1

type 1

  • pull · 131 ✖

repo 1

  • xarray 131
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
2163675672 PR_kwDOAMm_X85obI_8 8803 missing chunkmanager: update error message mathause 10194086 open 0     4 2024-03-01T15:48:00Z 2024-03-15T11:02:45Z   MEMBER   0 pydata/xarray/pulls/8803

When dask is missing we get the following error message:

python-traceback ValueError: unrecognized chunk manager dask - must be one of: []

this could be confusing - the error message seems geared towards a typo in the requested manager. However, I think it's much more likely that a chunk manager is just not installed. I tried to update the error message - happy to get feedback.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8803/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2137065741 PR_kwDOAMm_X85nAXC5 8756 suppress base & loffset deprecation warnings mathause 10194086 closed 0     2 2024-02-15T17:23:27Z 2024-02-16T09:44:32Z 2024-02-15T19:11:10Z MEMBER   0 pydata/xarray/pulls/8756

Supress some more internal warnings in the test suite.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8756/reactions",
    "total_count": 3,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 3,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2090265314 PR_kwDOAMm_X85kiCi8 8627 unify freq strings (independent of pd version) mathause 10194086 closed 0     4 2024-01-19T10:57:04Z 2024-02-15T17:53:42Z 2024-02-15T16:53:36Z MEMBER   0 pydata/xarray/pulls/8627
  • [ ] Adresses points 2 and 3 and closes #8612
  • [ ] Tests added
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst

Probably not ready for review yet.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8627/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2130313810 PR_kwDOAMm_X85mpS8i 8737 unstack: require unique MultiIndex mathause 10194086 closed 0     2 2024-02-12T14:58:06Z 2024-02-13T09:48:51Z 2024-02-13T09:48:36Z MEMBER   0 pydata/xarray/pulls/8737
  • [x] Closes #7104
  • [x] Tests added
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst

Unstacking non-unique MultiIndex can lead to silent data loss, so we raise an error.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8737/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2126795367 PR_kwDOAMm_X85mdn7J 8727 ruff: move some config to lint section mathause 10194086 closed 0     0 2024-02-09T09:48:17Z 2024-02-09T15:49:03Z 2024-02-09T15:49:03Z MEMBER   0 pydata/xarray/pulls/8727

Fix a warning from ruff concerning the config:

warning: The top-level linter settings are deprecated in favour of their counterparts in the lint section. Please update the following options in pyproject.toml: - 'extend-safe-fixes' -> 'lint.extend-safe-fixes' - 'per-file-ignores' -> 'lint.per-file-ignores'

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8727/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2098122391 PR_kwDOAMm_X85k8eI1 8651 allow negative freq strings mathause 10194086 closed 0     2 2024-01-24T12:04:39Z 2024-02-01T09:17:11Z 2024-02-01T09:01:44Z MEMBER   0 pydata/xarray/pulls/8651
  • [ ] Closes #xxxx
  • [x] Tests added
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

This allows negative freq strings as discussed in https://github.com/pydata/xarray/pull/8627#issuecomment-1905981660 Deciding which tests to update was not easy.

The pandas _generate_range function was moved to https://github.com/pandas-dev/pandas/blob/3c96b8ff6d399fbec8d4d533e8e8618c592bb64b/pandas/core/arrays/datetimes.py#L2725 They no longer rollback the end. I had to remove this as well such that the following are eqivalent:

python xr.date_range("2001", "2000", freq="-1YE", calendar="noleap") pd.date_range("2001", "2000", freq="-1YE")

I am slightly nervous about this but all the tests still pass...

Once again cc @spencerkclark

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8651/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2105738254 PR_kwDOAMm_X85lVsgz 8680 use ruff.flake8-tidy-imports to enforce absolute imports mathause 10194086 closed 0     1 2024-01-29T15:19:34Z 2024-01-30T16:42:46Z 2024-01-30T16:38:48Z MEMBER   0 pydata/xarray/pulls/8680

use ruff.flake8-tidy-imports to enforce absolute imports

  • https://github.com/MarcoGorelli/absolufy-imports has been archived (no reason given)
  • removes a pre-commit hook which should make it faster locally
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8680/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2098131640 PR_kwDOAMm_X85k8gJe 8652 new whats-new section mathause 10194086 closed 0     2 2024-01-24T12:10:07Z 2024-01-26T10:07:39Z 2024-01-24T12:59:49Z MEMBER   0 pydata/xarray/pulls/8652
  • [ ] Closes #xxxx
  • [ ] 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/8652/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2097971637 PR_kwDOAMm_X85k789- 8649 ruff: use extend-exclude mathause 10194086 closed 0     1 2024-01-24T10:39:46Z 2024-01-24T18:32:20Z 2024-01-24T15:59:11Z MEMBER   0 pydata/xarray/pulls/8649

I think we should use extend-exclude instead of exclude for ruff. We can then also remove ".eggs" as this is in the default.

From https://docs.astral.sh/ruff/settings/#exclude:

Note that you'll typically want to use extend-exclude to modify the excluded paths.

Default value: [".bzr", ".direnv", ".eggs", ".git", ".git-rewrite", ".hg", ".mypy_cache", ".nox", ".pants.d", ".pytype", ".ruff_cache", ".svn", ".tox", ".venv", "__pypackages__", "_build", "buck-out", "build", "dist", "node_modules", "venv"]

(I really dislike how github formats toml files... What would be the correct syntax, then?)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8649/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2094542307 PR_kwDOAMm_X85kwUlb 8642 infer_freq: return 'YE' (#8629 follow-up) mathause 10194086 closed 0     0 2024-01-22T18:53:52Z 2024-01-23T12:44:14Z 2024-01-23T12:44:14Z MEMBER   0 pydata/xarray/pulls/8642

I realized that the return value of infer_freq was not updated. #8627 will try to suppress all warnings in the test suite, so this is just the minimal PR.

Sorry for all the spam @spencerkclark

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8642/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2090340727 PR_kwDOAMm_X85kiTjg 8629 rename "Y" freq string to "YE" (pandas parity) mathause 10194086 closed 0     10 2024-01-19T11:31:58Z 2024-01-22T18:38:06Z 2024-01-22T08:01:24Z MEMBER   0 pydata/xarray/pulls/8629
  • [x] Adresses point 1 of #8612
  • [x] Fixes one of the failures in #8623
  • [x] Tests added
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst

This renames the frequency string "Y" (formerly "A") to "YE" to achieve pandas parity. It could be better to wait for the conclusion of pandas-dev/pandas#56840 before doing this (but fixing the related failure in #8623 seemed a good reason as any to do it know).

Let me know what you think @spencerkclark @aulemahal

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8629/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2070895451 PR_kwDOAMm_X85jf-2J 8600 fix and test empty CFTimeIndex mathause 10194086 closed 0     1 2024-01-08T17:11:43Z 2024-01-17T12:29:11Z 2024-01-15T21:49:34Z MEMBER   0 pydata/xarray/pulls/8600
  • [x] Closes #7298
  • [x] Tests added
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst

Otherwise da.indexes and the html repr raise a ValueError. I first had "<undefined>" but I think None is better. cc @spencerkclark @keewis

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8600/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2070231449 PR_kwDOAMm_X85jdtRr 8597 _infer_dtype: remove duplicated code mathause 10194086 closed 0     0 2024-01-08T11:12:18Z 2024-01-08T19:40:06Z 2024-01-08T19:40:06Z MEMBER   0 pydata/xarray/pulls/8597

By chance I saw that in #4700 the same code block was added twice. I think this can be removed.

cc @andersy005

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8597/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 1,
    "eyes": 0
}
    xarray 13221727 pull
2070561434 PR_kwDOAMm_X85je1rK 8598 small string fixes mathause 10194086 closed 0     1 2024-01-08T14:20:56Z 2024-01-08T16:59:27Z 2024-01-08T16:53:00Z MEMBER   0 pydata/xarray/pulls/8598
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8598/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
2025652693 PR_kwDOAMm_X85hJh0D 8521 test and fix empty xindexes repr mathause 10194086 closed 0     4 2023-12-05T08:54:56Z 2024-01-08T10:58:09Z 2023-12-06T17:06:15Z MEMBER   0 pydata/xarray/pulls/8521
  • [x] Closes #8367
  • [x] Tests added
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst

Uses max with a default, which work with empty iterators, in contrast to if col_items else 0.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8521/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1177919687 PR_kwDOAMm_X8403yVS 6403 make more args kw only (except 'dim') mathause 10194086 closed 0     9 2022-03-23T10:28:02Z 2023-10-05T20:38:49Z 2023-10-05T20:38:49Z MEMBER   0 pydata/xarray/pulls/6403
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst

This makes many arguments keyword-only, except for dim to avoid da.weighted(...).mean("lat", "lon") (i.e. da.weighted(...).mean(dim="lat", skipna="lon")) which silently does the wrong thing. I am sure I forgot some and for some I was unsure so I left them as is.

Question: do we want an deprecation cycle? Currently it just errors for da.weighted(...).mean("dim", True). Might be nice to do it, however, @dcherian if I am not mistaken you did this without a deprecation in #5950, e.g. for da.mean etc.?

python import numpy as np import xarray as xr air = xr.tutorial.open_dataset("air_temperature") wgt = np.cos(np.deg2rad(air.lat)) air.weighted(wgt).mean("lat", "lon")

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6403/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1917660013 PR_kwDOAMm_X85bc7Pv 8246 update pytest config and un-xfail some tests mathause 10194086 closed 0     1 2023-09-28T14:21:58Z 2023-09-30T01:26:39Z 2023-09-30T01:26:35Z MEMBER   0 pydata/xarray/pulls/8246
  • [ ] Towards #8239
  • [ ] Tests added
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst

This partly updates the pytest config as suggested in #8239 and un-xfails some tests (or xfails the tests more precisely).

See https://github.com/pydata/xarray/issues/8239#issuecomment-1739363809 for why we cannot exactly follow the suggestions given in #8239

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8246/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1876205625 PR_kwDOAMm_X85ZRl7U 8130 to_stacked_array: better error msg & refactor mathause 10194086 closed 0     0 2023-08-31T19:51:08Z 2023-09-10T15:33:41Z 2023-09-10T15:33:37Z MEMBER   0 pydata/xarray/pulls/8130
  • [x] Tests added
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst

I found the error message in ds.to_stacked_array confusing, so I tried to make it clearer. Also renames some if the internal symbols (so should have no user facing change).

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8130/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1596025651 PR_kwDOAMm_X85Kj_KM 7548 supress namespace_package deprecation warning (doctests) mathause 10194086 closed 0     0 2023-02-23T00:15:41Z 2023-02-23T18:38:16Z 2023-02-23T18:38:15Z MEMBER   0 pydata/xarray/pulls/7548

Suppress the pkg_resources.namespace_package DeprecationError to make the doctest pass again (similar to #7322). This is reported upstream: pydap/pydap#277 and matplotlib/matplotlib#25244

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7548/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1086346755 PR_kwDOAMm_X84wKOjC 6096 Replace distutils.version with packaging.version mathause 10194086 closed 0     9 2021-12-22T00:51:21Z 2023-01-20T21:00:42Z 2021-12-24T14:50:48Z MEMBER   0 pydata/xarray/pulls/6096
  • [x] Closes #6092
  • [x] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

One change is that it is no longer possible to compare to a string, i.e. version.parse(xr.__version__) < "0.20.0" errors.

As mentioned in #6092 there are 3 options - if there is a preference I am happy to update this PR.

```python from distutils.version import LooseVersion from packaging import version

LooseVersion(xr.version) version.parse(xr.version) version.Version(xr.version)

currently:

if LooseVersion(mod.version) < LooseVersion(minversion): pass

options:

if version.parse(mod.version) < version.parse(minversion): pass

if version.Version(mod.version) < version.Version(minversion): pass

if Version(mod.version) < Version(minversion): pass ```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6096/reactions",
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1466191758 PR_kwDOAMm_X85Dylku 7326 fix doctests: supress urllib3 warning mathause 10194086 closed 0     1 2022-11-28T10:40:46Z 2022-12-05T20:11:16Z 2022-11-28T19:31:03Z MEMBER   0 pydata/xarray/pulls/7326
  • [x] Closes #7322
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7326/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1285767883 PR_kwDOAMm_X846ahUs 6730 move da and ds fixtures to conftest.py mathause 10194086 closed 0     9 2022-06-27T12:56:05Z 2022-12-05T20:11:08Z 2022-07-11T12:44:55Z MEMBER   0 pydata/xarray/pulls/6730

This PR renames the da and ds fixtures (to da_fixture and ds_fixture) and moves them to conftest.py. This allows to remove the flake8 error suppression for the tests and seems more how the fixtures are intended to be used (from the pytest side). I think the name changes makes it a bit more obvious what happens but moving them to may make it a bit less obvious (if you don't know where to look).

Removing the flake8 error ignores also unearthed some unused imports:

https://github.com/pydata/xarray/blob/787a96c15161c9025182291b672b3d3c5548a6c7/setup.cfg#L155-L156

(What I actually wanted to do is move the tests for rolling to it's own file - but I think it makes sense to do this first.)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6730/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1344222732 PR_kwDOAMm_X849c2Wu 6934 deprecate_positional_args: remove stray print mathause 10194086 closed 0     0 2022-08-19T09:58:53Z 2022-12-05T20:11:08Z 2022-08-19T10:25:32Z MEMBER   0 pydata/xarray/pulls/6934

I forgot to remove some debug print statements in #6910 - thanks for noting @shoyer & @dcherian

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6934/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1464824094 PR_kwDOAMm_X85DuSjU 7321 fix flake8 config mathause 10194086 closed 0     2 2022-11-25T18:16:07Z 2022-11-28T10:36:29Z 2022-11-28T10:33:00Z MEMBER   0 pydata/xarray/pulls/7321

flake8 v6 now errors on inline comments in the config file. I don't like it but oh well...

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7321/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1118802352 PR_kwDOAMm_X84xzhTi 6212 better warning filter for assert_* mathause 10194086 closed 0     1 2022-01-31T00:22:37Z 2022-09-05T07:52:09Z 2022-09-05T07:52:06Z MEMBER   0 pydata/xarray/pulls/6212

In #4864 I added a a decorator for the xarray.testing.assert_* functions to ensure warnings that were to errors (pytest.mark.filterwarnings("error")) do not error in assert_* (see https://github.com/pydata/xarray/pull/4760#issuecomment-774101639). As a solution I added

https://github.com/pydata/xarray/blob/5470d933452d88deb17cc9294a164c4a03f55dec/xarray/testing.py#L32

However, this is sub-optimal because this now removes all ignore filters! As dask stuff only gets evaluated in assert_* filters like warnings.filterwarnings("ignore", "Mean of empty slice") don't work for dask arrays!

I thought of setting

python warnings.simplefilter("ignore")

but this could suppress warnings we want to keep.

So now I remove all "error" warning filters and keep the rest. Note that the original filters get restored after with warnings.catch_warnings():. ().


I am not sure I expressed myself very clearly... let me know and I can try again. @keewis you had a look at #4864 maybe you can review this PR as well?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6212/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1355581692 PR_kwDOAMm_X84-Cbgk 6967 fix _deprecate_positional_args helper mathause 10194086 closed 0     0 2022-08-30T11:02:33Z 2022-09-02T21:54:07Z 2022-09-02T21:54:03Z MEMBER   0 pydata/xarray/pulls/6967

I tried to use the _deprecate_positional_args decorator from #6934 & it turns out that it still had some errors - passing on the arguments did not work properly in certain cases... I now added tests for this as well (which I should have done in the first place...).

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6967/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1355361572 PR_kwDOAMm_X84-Brev 6966 enable pydap in tests again mathause 10194086 closed 0     1 2022-08-30T08:18:07Z 2022-09-01T10:16:05Z 2022-09-01T10:16:03Z MEMBER   0 pydata/xarray/pulls/6966

5844 excluded pydap from our tests - but the new version has been released in the meantime (on conda not on pypi, though, pydap/pydap#268) - so let's see if this still works.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6966/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1355349486 PR_kwDOAMm_X84-Bo54 6965 no longer install pydap for 'io' extras in py3.10 mathause 10194086 closed 0     2 2022-08-30T08:08:12Z 2022-09-01T10:15:30Z 2022-09-01T10:15:27Z MEMBER   0 pydata/xarray/pulls/6965
  • [x] Closes #6960
  • [ ] Tests added - tested manually
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6965/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1331969418 PR_kwDOAMm_X8480cLZ 6890 tests don't use `pytest.warns(None)` mathause 10194086 closed 0     0 2022-08-08T14:36:01Z 2022-08-30T12:15:33Z 2022-08-08T17:27:53Z MEMBER   0 pydata/xarray/pulls/6890

Get rid of some warnings in the tests.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6890/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1344900323 PR_kwDOAMm_X849fIGC 6937 terminology: fix italics [skip-ci] mathause 10194086 closed 0     0 2022-08-19T21:13:52Z 2022-08-20T07:30:41Z 2022-08-20T07:30:41Z MEMBER   0 pydata/xarray/pulls/6937
  • [x] Closes #6932

@zmoon - obviously it would be nice if we had a linter for this but this is for another time.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6937/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1337166287 PR_kwDOAMm_X849FuuD 6910 decorator to deprecate positional arguments mathause 10194086 closed 0     7 2022-08-12T12:48:47Z 2022-08-18T18:14:09Z 2022-08-18T15:59:52Z MEMBER   0 pydata/xarray/pulls/6910
  • [x] Supersedes #6403, see also #5531
  • [x] Tests added
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst

Adds a helper function to deprecate positional arguments. IMHO this offers a good trade-off between magic and complexity. (As mentioned this was adapted from scikit-learn).

edit: I suggest to actually deprecate positional arguments in another PR.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6910/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1155634014 PR_kwDOAMm_X84zvnTl 6316 fix typos (using codespell) mathause 10194086 closed 0     2 2022-03-01T17:52:24Z 2022-07-18T13:33:02Z 2022-03-02T13:57:29Z MEMBER   0 pydata/xarray/pulls/6316

fix some typos (using codespell). Called using:

bash codespell --skip=".git,.mypy_cache,*.tex" --ignore-words-list coo,nd,inferrable,hist,ND,splitted,soler,slowy,ba,ser,nin,te,fo -w -i 3

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6316/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1150224882 PR_kwDOAMm_X84zdCrl 6303 quantile: use skipna=None mathause 10194086 closed 0     0 2022-02-25T09:24:05Z 2022-03-03T09:43:38Z 2022-03-03T09:43:35Z MEMBER   0 pydata/xarray/pulls/6303
  • [x] Tests added
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

skipna=None did not skip missing values for quantile, inconsistent with other methods. Discovered while testing #6059.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6303/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1149708477 PR_kwDOAMm_X84zbVnG 6302 from_dict: doctest mathause 10194086 closed 0     0 2022-02-24T20:17:24Z 2022-02-28T09:11:05Z 2022-02-28T09:11:02Z MEMBER   0 pydata/xarray/pulls/6302
  • [x] Closes #6136

Convert the code block in xr.DataArray.from_dict and xr.Dataset.from_dict to doctest/ examples.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6302/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1126086052 PR_kwDOAMm_X84yLQ48 6251 use `warnings.catch_warnings(record=True)` instead of `pytest.warns(None)` mathause 10194086 closed 0     4 2022-02-07T14:42:26Z 2022-02-18T16:51:58Z 2022-02-18T16:51:55Z MEMBER   0 pydata/xarray/pulls/6251

pytest v7.0.0 no longer want's us to use pytest.warns(None) to test for no warning, so we can use warnings.catch_warnings(record=True) instead.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6251/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1088615118 PR_kwDOAMm_X84wRifr 6108 quantile: rename interpolation arg to method mathause 10194086 closed 0     3 2021-12-25T15:06:44Z 2022-02-08T17:09:47Z 2022-02-07T09:40:05Z MEMBER   0 pydata/xarray/pulls/6108

numpy/numpy#20327 introduces some changes to np.quantile (and related) for the upcoming numpy release (v1.22.0). It renames the interpolation keyword to method and offers some new interpolation methods. This PR does two things

  1. it restores compatibility with numpy 1.22
  2. it renames the interpolation keyword to method in xarray - this change is not strictly necessary but I thought better to be consistent with numpy

  3. [x] Tests added

  4. [x] Passes pre-commit run --all-files
  5. [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

(Side note in dask.array.percentile the method keyword is used differently from the interpolation keyword (docs). However, xarray does not use the dask function.)


TODO: need to import ArrayLike from npcompat.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6108/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1125661464 PR_kwDOAMm_X84yJ3Rz 6248 test bottleneck master in upstream CI [test-upstream] [skip-ci] mathause 10194086 closed 0     1 2022-02-07T08:25:35Z 2022-02-07T09:05:28Z 2022-02-07T09:05:24Z MEMBER   0 pydata/xarray/pulls/6248
  • [x] Closes #6186

pydata/bottleneck#378 was merged - so this should work again.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6248/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1118836906 PR_kwDOAMm_X84xzojx 6213 fix or suppress test warnings mathause 10194086 closed 0     1 2022-01-31T01:34:20Z 2022-02-01T09:40:15Z 2022-02-01T09:40:11Z MEMBER   0 pydata/xarray/pulls/6213

Fixes or suppresses a number of warnings that turn up in our upstream CI.

pd.Index.is_monotonic is an alias for pd.Index.is_monotonic_increasing and does not stand for pd.Index.is_monotonic_increasing or pd.Index.is_monotonic_decreasing.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6213/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1118168483 PR_kwDOAMm_X84xxms4 6208 Revert "MNT: prepare h5netcdf backend for (coming) change in dimension handling" mathause 10194086 closed 0     8 2022-01-29T10:27:11Z 2022-01-29T13:48:17Z 2022-01-29T13:20:51Z MEMBER   0 pydata/xarray/pulls/6208

Reverts pydata/xarray#6200

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6208/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1114414215 PR_kwDOAMm_X84xlfet 6194 doc: fix pd datetime parsing warning [skip-ci] mathause 10194086 closed 0     0 2022-01-25T22:12:53Z 2022-01-28T08:37:18Z 2022-01-28T05:41:49Z MEMBER   0 pydata/xarray/pulls/6194

And another tiny one... The somewhat ambiguous date string triggers a warning in pandas which makes our doc build fail.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6194/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1115026697 PR_kwDOAMm_X84xneFL 6195 MAINT: pandas 1.4: no longer use get_loc with method mathause 10194086 closed 0     5 2022-01-26T13:35:04Z 2022-01-27T22:11:04Z 2022-01-27T21:06:40Z MEMBER   0 pydata/xarray/pulls/6195
  • [x] Closes #5721
  • [ ] Tests added
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst

Fixed as per @shoyer & @spencerkclark suggestion from https://github.com/pydata/xarray/issues/5721#issuecomment-903095007

Now that pandas 1.4 is out it would be good to get this fixed (there are about 5000 warnings in our tests, mostly because of interp, though). Also leads to a warning in our docs which breaks them (although that can also be fixed with an :okwarning: directive).

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6195/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1114392372 PR_kwDOAMm_X84xla15 6192 fix cftime doctests mathause 10194086 closed 0     0 2022-01-25T21:43:55Z 2022-01-26T21:45:19Z 2022-01-26T21:45:17Z MEMBER   0 pydata/xarray/pulls/6192

Fixes the doctests for the newest version of cftime. @spencerkclark

This of course means that the doctests will fail for environments with older versions of cftime present. I don't think there is anything we can do.

Thanks for pytest-accept b.t.w @max-sixty

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6192/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1039272725 PR_kwDOAMm_X84t1ecc 5914 #5740 follow up: supress xr.ufunc warnings in tests mathause 10194086 closed 0     2 2021-10-29T07:53:07Z 2022-01-26T08:41:41Z 2021-10-29T15:16:03Z MEMBER   0 pydata/xarray/pulls/5914

5740 changed PendingDeprecationWarning to FutureWarning - suppress the warnings again in the test suite.

https://github.com/pydata/xarray/blob/36f05d70c864ee7c61603c8a43ba721bf7f434b3/xarray/ufuncs.py#L47-L49

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5914/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1083281083 PR_kwDOAMm_X84wATnw 6082 cftime: 'gregorian' -> 'standard' [test-upstream] mathause 10194086 closed 0     3 2021-12-17T13:51:07Z 2022-01-26T08:41:33Z 2021-12-22T11:40:05Z MEMBER   0 pydata/xarray/pulls/6082
  • [x] Closes #6016

cftime 1.5.2 renames "gregorian" to "standard". AFAIK this only changes the repr of cftime indices and does not seem to influence the creation of cftime indices.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6082/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1088419434 PR_kwDOAMm_X84wQ-nD 6107 is_dask_collection: micro optimization mathause 10194086 closed 0     1 2021-12-24T15:04:42Z 2022-01-26T08:41:28Z 2021-12-29T16:27:55Z MEMBER   0 pydata/xarray/pulls/6107

In #6096 I realized that DuckArrayModule("dask") is called a lot in our tests - 145'835 times. Most of those are from is_dask_collection (is_duck_dask_array) This change avoids that the instance needs to be built every time.

```python import xarray as xr

%timeit xr.core.pycompat.DuckArrayModule("dask").available %timeit xr.core.pycompat.dsk.available ```

18.9 µs ± 97.7 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) 77.1 ns ± 1.22 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)

Which leads to an incredible speed up of our tests of about 2.7 s :grin: ((18.9 - 0.0771) * 145835 / 1e6).

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6107/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
752870062 MDExOlB1bGxSZXF1ZXN0NTI5MDc4NDA0 4616 don't type check __getattr__ mathause 10194086 closed 0     4 2020-11-29T08:53:09Z 2022-01-26T08:41:18Z 2021-10-18T14:06:30Z MEMBER   1 pydata/xarray/pulls/4616
  • [x] Closes #4601
  • [x] Passes isort . && black . && mypy . && flake8
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

It's not pretty as I had to define a number of empty methods... I think this should wait for 0.17

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4616/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
778069594 MDExOlB1bGxSZXF1ZXN0NTQ4MjI1MDQz 4760 WIP: testing.assert_* check dtype mathause 10194086 closed 0     8 2021-01-04T12:45:00Z 2022-01-26T08:41:17Z 2021-10-18T14:06:38Z MEMBER   1 pydata/xarray/pulls/4760
  • [x] Closes #4727
  • [ ] Tests added
  • [ ] Passes isort . && black . && mypy . && flake8
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [ ] New functions/methods are listed in api.rst

This adds a dtype check for equal, identical, broadcast_equal, and the xr.testing.assert_* functions. It is far from complete: tests and documentation are still missing, but I wanted to get it online for feedback.

When I set check_dtype=True there are around 600 failures. Fixing that is for another PR. #4759 should help a bit.

  • [ ] I added the checks to lazy_array_equiv, however, sometimes dask can get the dtype wrong before the compute (see below). Do you think I need to put it in the non-lazy part?

```python import numpy as np import xarray as xr

da = xr.DataArray(np.array([0, np.nan], dtype=object)).chunk()

da.prod().dtype # -> dtype('O') da.prod().compute().dtype # -> dtype('int64')

```

  • [ ] check_dtype is still missing from assert_duckarray_allclose & assert_duckarray_equal - do you think there are required?

  • [ ] The dtypes of array elements are not tested (see below). I don't think I'll implement that here.

```python da0 = xr.DataArray(np.array([0], dtype=object)) da1 = xr.DataArray(np.array([0.], dtype=object))

xr.testting.assert_equal(da0, da1, check_dtype=True) ```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4760/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1107431006 PR_kwDOAMm_X84xOsZX 6171 unpin dask again mathause 10194086 closed 0     1 2022-01-18T22:37:31Z 2022-01-26T08:41:02Z 2022-01-18T23:39:12Z MEMBER   0 pydata/xarray/pulls/6171
  • dask 2022.01 is out, so we can remove the pin
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6171/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1109572055 PR_kwDOAMm_X84xVqMq 6177 remove no longer necessary version checks mathause 10194086 closed 0     2 2022-01-20T17:24:21Z 2022-01-26T08:40:55Z 2022-01-21T18:00:51Z MEMBER   0 pydata/xarray/pulls/6177

I hunted down some version checks that should no longer be necessary as we have moved beyond the minimum versions.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6177/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1114401347 PR_kwDOAMm_X84xlcvk 6193 don't install bottleneck wheel for upstream CI mathause 10194086 closed 0     3 2022-01-25T21:55:49Z 2022-01-26T08:31:42Z 2022-01-26T08:31:39Z MEMBER   0 pydata/xarray/pulls/6193
  • [x] see #6186

I think it would be good to re-enable the upstream CI, even if this means we have to stick to py3.9 for the moment. I just subscribed to pydata/bottleneck#378, so I should see when we can switch to 3.10.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6193/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1099288617 PR_kwDOAMm_X84wzh1F 6155 typing fixes for mypy 0.931 and numpy 1.22 mathause 10194086 closed 0     2 2022-01-11T15:19:43Z 2022-01-13T17:13:00Z 2022-01-13T17:12:57Z MEMBER   0 pydata/xarray/pulls/6155

typing fixes for mypy 0.931 and numpy 1.22. Also tested with numpy 1.20 which probably many still have installed.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6155/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1078998718 PR_kwDOAMm_X84vyLHe 6077 disable pytest-xdist (to check CI failure) mathause 10194086 closed 0     3 2021-12-13T20:43:38Z 2022-01-03T08:30:02Z 2021-12-22T12:55:23Z MEMBER   0 pydata/xarray/pulls/6077

Our CI fails with some pytest-xdist error. Let's see if we get a clearer picture when disabling parallel tests. (Maybe some interaction between dask and pytest-xdist?).

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6077/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1090752550 PR_kwDOAMm_X84wYT5m 6127 Revert "disable pytest-xdist (to check CI failure)" mathause 10194086 closed 0     2 2021-12-29T21:15:36Z 2022-01-03T08:29:52Z 2022-01-03T08:29:49Z MEMBER   0 pydata/xarray/pulls/6127
  • [x] Closes #6101

Reverts pydata/xarray#6077 (after dask has been pinned in #6111)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6127/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1086360190 PR_kwDOAMm_X84wKRVp 6097 fix tests for h5netcdf v0.12 mathause 10194086 closed 0     6 2021-12-22T01:22:09Z 2021-12-23T20:29:33Z 2021-12-23T20:29:12Z MEMBER   0 pydata/xarray/pulls/6097

h5netcdf no longer warns for invalid netCDF (unless passing save_kwargs = {"invalid_netcdf": True}. We need to adapt our tests.

@kmuehlbauer


edit: I added h5netcdf to the upstream tests - I can also revert this change if you prefer.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6097/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1036287825 PR_kwDOAMm_X84tryph 5899 [test-upstream] fix pd skipna=None mathause 10194086 closed 0     2 2021-10-26T13:16:21Z 2021-10-28T11:54:49Z 2021-10-28T11:46:04Z MEMBER   0 pydata/xarray/pulls/5899
  • [x] Closes #5872
  • [x] Passes pre-commit run --all-files

pandas will disallow skipna=None (pandas-dev/pandas#44178) - this fixes a test which relies on this. I don't think we have any user facing use of this. AFAIK we don't use pandas for reductions anywhere)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5899/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
1029142676 PR_kwDOAMm_X84tVCEd 5875 fix test with pseudonetcdf 3.2 mathause 10194086 closed 0     5 2021-10-18T13:49:23Z 2021-10-22T21:24:09Z 2021-10-22T21:23:34Z MEMBER   0 pydata/xarray/pulls/5875

Fixes one part of #5872

pseudoNETCDF adds two attrs to ict files, which breaks the following two tests:

Test 1: https://github.com/pydata/xarray/blob/07de257c5884df49335496ee6347fb633a7c302c/xarray/tests/test_backends.py#L3944 Test 2:

https://github.com/pydata/xarray/blob/07de257c5884df49335496ee6347fb633a7c302c/xarray/tests/test_backends.py#L4030

I reproduced the test file so that the tests pass again. To reproduce the file I used the following bit of code:

```python import xarray as xr from xarray.tests import test_backends

fN = "xarray/tests/data/example.ict" fmtkw = {"format": "ffi1001"}

ds = xr.open_dataset(fN, engine="pseudonetcdf", backend_kwargs={"format": "ffi1001"})

c = test_backends.TestPseudoNetCDFFormat() c.save(ds, fN, **fmtkw) ```

The save method is here:

https://github.com/pydata/xarray/blob/07de257c5884df49335496ee6347fb633a7c302c/xarray/tests/test_backends.py#L4124

@barronh I would appreciate your review here - I am not sure if this is the right approach.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5875/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
877166445 MDExOlB1bGxSZXF1ZXN0NjMxMTcwNzI4 5265 Warn ignored keep attrs mathause 10194086 closed 0     1 2021-05-06T07:20:16Z 2021-10-18T14:06:37Z 2021-05-06T16:31:05Z MEMBER   0 pydata/xarray/pulls/5265
  • [x] Part of #4513
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

This PR warns when passing keep_attrs to resample(..., keep_attrs=True) and rolling_exp(..., keep_attrs=True) as they have no effect (rightfully). Also removes keep_attrs from the docstring of resample.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5265/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
869763597 MDExOlB1bGxSZXF1ZXN0NjI1MDc0NjA5 5227 coarsen: better keep_attrs mathause 10194086 closed 0     0 2021-04-28T09:56:45Z 2021-10-18T14:06:35Z 2021-04-29T17:40:57Z MEMBER   0 pydata/xarray/pulls/5227
  • [x] Part of #4513 (maybe the last one - need to double check)
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

As per https://github.com/pydata/xarray/issues/3891#issuecomment-612522628 I also changed the default to True.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5227/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
758033677 MDExOlB1bGxSZXF1ZXN0NTMzMjc0NDY3 4656 unpin pip 20.2 again mathause 10194086 closed 0     7 2020-12-06T22:00:12Z 2021-10-18T14:06:34Z 2021-04-18T21:42:25Z MEMBER   0 pydata/xarray/pulls/4656

Another enormous PR from my side ;) unpin pip again. numpy probably fixed the issue re the name of the nightly build. But I also need to doublecheck if scipy is ok.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4656/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
802400938 MDExOlB1bGxSZXF1ZXN0NTY4NTUwNDEx 4865 fix da.pad example for numpy 1.20 mathause 10194086 closed 0     4 2021-02-05T19:00:04Z 2021-10-18T14:06:33Z 2021-02-07T21:57:34Z MEMBER   0 pydata/xarray/pulls/4865
  • [x] Closes #4858
  • [x] Passes pre-commit run --all-files
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4865/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
794344392 MDExOlB1bGxSZXF1ZXN0NTYxODc2OTg5 4845 iris update doc url mathause 10194086 closed 0     1 2021-01-26T15:51:18Z 2021-10-18T14:06:31Z 2021-01-26T17:30:20Z MEMBER   0 pydata/xarray/pulls/4845

iris moved its documentation to https://scitools-iris.readthedocs.io/en/stable/

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4845/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
738958305 MDExOlB1bGxSZXF1ZXN0NTE3NzA0OTI2 4569 pin h5py to v2.10 mathause 10194086 closed 0     0 2020-11-09T11:46:39Z 2021-10-18T14:06:28Z 2020-11-09T12:52:27Z MEMBER   0 pydata/xarray/pulls/4569

There is a compatibility issue with h5py v3. Pin h5py to version 2 for the moment. I can open an issue shortly.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4569/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
724975973 MDExOlB1bGxSZXF1ZXN0NTA2Mjc3OTk4 4525 unpin eccodes again mathause 10194086 closed 0     2 2020-10-19T21:07:23Z 2021-10-18T14:06:27Z 2020-10-19T22:21:13Z MEMBER   0 pydata/xarray/pulls/4525
  • [x] Closes #4521
  • [x] Passes isort . && black . && mypy . && flake8

That was fast - eccodes already fixed the issue.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4525/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
684430261 MDExOlB1bGxSZXF1ZXN0NDcyMzE4MzUw 4371 mention all ignored flake8 errors mathause 10194086 closed 0     1 2020-08-24T07:17:03Z 2021-10-18T14:06:18Z 2020-08-24T10:45:05Z MEMBER   0 pydata/xarray/pulls/4371

and put the comment on the same line

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4371/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
577830239 MDExOlB1bGxSZXF1ZXN0Mzg1NTIyOTEy 3849 update installation instruction mathause 10194086 closed 0     6 2020-03-09T11:14:13Z 2021-10-18T14:06:16Z 2020-03-09T14:07:03Z MEMBER   0 pydata/xarray/pulls/3849
  • [x] Closes #3756
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3849/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
572269093 MDExOlB1bGxSZXF1ZXN0MzgxMDAyMTU2 3805 un-xfail tests that append to netCDF files with scipy mathause 10194086 closed 0     3 2020-02-27T18:23:56Z 2021-10-18T14:06:14Z 2020-03-09T07:18:07Z MEMBER   0 pydata/xarray/pulls/3805
  • [x] Closes #2019
  • [ ] Tests added
  • [x] Passes isort -rc . && black . && mypy . && flake8
  • [ ] Fully documented, including whats-new.rst for all changes and api.rst for new API
  • [x] reverts #2021

Let's see if this passes....

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3805/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
539059754 MDExOlB1bGxSZXF1ZXN0MzU0MDk5Mzkz 3635 Fix/quantile wrong errmsg mathause 10194086 closed 0     2 2019-12-17T13:16:40Z 2021-10-18T14:06:13Z 2019-12-17T13:50:06Z MEMBER   0 pydata/xarray/pulls/3635
  • [x] Closes #3634
  • [x] Tests added
  • [x] Passes black . && mypy . && flake8
  • [x] Fully documented, including whats-new.rst for all changes and api.rst for new API

np.nanquantile was added in numpy 1.15.0, the current minimum requirement for numpy is 1.14.0, therefore we have to test this ourselves.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3635/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
928539812 MDExOlB1bGxSZXF1ZXN0Njc2NTI5NjQ4 5522 typing for numpy 1.21 mathause 10194086 closed 0     2 2021-06-23T18:40:28Z 2021-10-18T14:05:47Z 2021-06-24T08:58:07Z MEMBER   0 pydata/xarray/pulls/5522
  • [x] Closes #5517
  • [x] Passes pre-commit run --all-files

The minimal typing for numpy 1.21. As always I am by no means a typing specialist.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5522/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
235542564 MDExOlB1bGxSZXF1ZXN0MTI1MzU1MTI5 1451 inconsistent time.units fmt in encode_cf_datetime mathause 10194086 closed 0     7 2017-06-13T12:49:31Z 2021-06-24T08:45:18Z 2021-06-23T16:14:27Z MEMBER   0 pydata/xarray/pulls/1451
  • do not change user-specified units
  • always format infered units as 'YYYY-mmmm-ddTHH:MM:SS'

This is my naïve approach.

  • [ ] Closes #1449
  • [ ] Tests added / passed
  • [ ] Passes git diff upstream/master | flake8 --diff
  • [ ] Fully documented, including whats-new.rst for all changes and api.rst for new API
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1451/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
913958248 MDExOlB1bGxSZXF1ZXN0NjYzOTE2NDQw 5451 Silence some test warnings mathause 10194086 closed 0     1 2021-06-07T21:12:50Z 2021-06-09T17:55:48Z 2021-06-09T17:27:21Z MEMBER   0 pydata/xarray/pulls/5451

Silences a number of warnings that accumulated in our test suite (c.f. #3266). The changes are mostly unrelated but small.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5451/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
913916040 MDExOlB1bGxSZXF1ZXN0NjYzODgwMjI1 5450 plt.gca() no longer accepts kwargs mathause 10194086 closed 0     0 2021-06-07T20:10:57Z 2021-06-09T17:27:02Z 2021-06-09T17:26:58Z MEMBER   0 pydata/xarray/pulls/5450

matplotlib warns: Calling gca() with keyword arguments was deprecated in Matplotlib 3.4. Starting two minor releases later, gca() will take no keyword arguments. The gca() function should only be used to get the current axes, or if no axes exist, create new axes with default keyword arguments. To create a new axes with non-default arguments, use plt.axes() or plt.subplot().

This only uses plt.gca() if there are active axes, else it calls plt.axes(**kwargs). Note that this can silently ignore some arguments. However, that this is already the case.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5450/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
913830070 MDExOlB1bGxSZXF1ZXN0NjYzODA1MDQy 5449 fix dask meta and output_dtypes error mathause 10194086 closed 0     8 2021-06-07T18:25:20Z 2021-06-08T07:51:50Z 2021-06-07T21:05:24Z MEMBER   0 pydata/xarray/pulls/5449
  • [x] Closes #5444

This was changed in dask/dask#7669. Looks like they did not deprecate this behavior (i.e. passing both meta and output_dtypes). I'd suggest to follow dask's example here and not add a deprecation cycle. Thoughts?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5449/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
771482993 MDExOlB1bGxSZXF1ZXN0NTQyOTk3MjQx 4716 .coveragerc omit: wildcards mathause 10194086 closed 0     2 2020-12-20T00:26:59Z 2021-04-19T20:34:07Z 2020-12-20T00:48:43Z MEMBER   0 pydata/xarray/pulls/4716
  • [x] Closes #4693
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4716/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
845248555 MDExOlB1bGxSZXF1ZXN0NjA0NDI2MTYx 5096 type: ignore - use error codes mathause 10194086 closed 0     2 2021-03-30T20:53:50Z 2021-04-01T10:23:56Z 2021-04-01T10:23:53Z MEMBER   0 pydata/xarray/pulls/5096
  • [x] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

Adds error codes to all # type: ignore comments. mypy should raise if a different type of error is encountered. Also enable showing the error code for typing errors. See: mypy: displaying-error-codes. Also remove some # type: ignore that are no longer necessary.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5096/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
843217462 MDExOlB1bGxSZXF1ZXN0NjAyNjMyMjgw 5090 ensure combine_by_coords raises on different types mathause 10194086 closed 0     3 2021-03-29T10:13:34Z 2021-03-31T15:53:23Z 2021-03-31T13:36:44Z MEMBER   0 pydata/xarray/pulls/5090
  • [x] Part of #5077
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/5090/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
308039063 MDExOlB1bGxSZXF1ZXN0MTc3MDc3MTU5 2011 rolling: periodic mathause 10194086 closed 0     9 2018-03-23T13:57:25Z 2021-03-30T15:08:22Z 2021-03-30T15:08:18Z MEMBER   0 pydata/xarray/pulls/2011
  • [x] Closes #2007
  • [ ] Tests added (for all bug fixes or enhancements)
  • [ ] Tests passed (for all non-documentation changes)
  • [ ] Fully documented, including whats-new.rst for all changes and api.rst for new API

Ok, this was easier to do than initially thought, we can use np.pad(a, pads, mode='wrap') in nputils.rolling_window. However, I'm not sure if that is enough already<sup>*</sup>.

I added an initial test, but could use some pointers where else you want this to be tested.

Questions: * is fill_value='periodic' a good api? * should the fill_value keyvalue be ported to rolling? * should this also be mentioned in the docs for rolling (I only learned about rolling.construct yesterday)


<sup>*</sup>rolling is present incore/dataset.py, core/dataarray.py, core/variable.py, core/rolling.py, core/dask_array_ops.py, core/nputils.py, core/ops.py, core/common.py, core/missing.py, and core/duck_array_ops.py that can be a bit daunting...

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2011/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
819884612 MDExOlB1bGxSZXF1ZXN0NTgyOTE5ODUy 4982 pin netCDF4=1.5.3 in min-all-deps mathause 10194086 closed 0     1 2021-03-02T10:36:18Z 2021-03-08T09:10:20Z 2021-03-08T00:20:38Z MEMBER   0 pydata/xarray/pulls/4982
  • [x] Closes #4970

The clean thing here would be to update min_deps_check.py so it works properly for this case. I am not sure it's really worth it.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4982/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
814813503 MDExOlB1bGxSZXF1ZXN0NTc4NzQwMzM2 4946 Upstream CI: limit runtime mathause 10194086 closed 0     5 2021-02-23T20:40:34Z 2021-02-24T14:37:04Z 2021-02-23T22:37:07Z MEMBER   0 pydata/xarray/pulls/4946
  • xref #4945

Try to limit the time of "CI Upstream" to avoid a silent failure.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4946/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
803049855 MDExOlB1bGxSZXF1ZXN0NTY5MDQ0NzMy 4878 typing for numpy 1.20 mathause 10194086 closed 0     2 2021-02-07T20:32:27Z 2021-02-23T20:52:50Z 2021-02-23T20:52:47Z MEMBER   0 pydata/xarray/pulls/4878

numpy v1.20.0 introduced type hints which leads to some mypy errors in xarray. This is the minimum set of changes to make mypy happy again. I tried to avoid #type: ignore and Any but in some instances I think it was not worth it.

I am sure there is much more fun to be had with numpy typing ;-)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4878/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
812214755 MDExOlB1bGxSZXF1ZXN0NTc2NjE2MzM1 4929 CI: run mypy in full env mathause 10194086 closed 0     3 2021-02-19T17:47:28Z 2021-02-22T16:42:09Z 2021-02-22T16:33:51Z MEMBER   0 pydata/xarray/pulls/4929
  • [x] Closes #4881
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst

I only added one run for py3.8 latest. To be entirely sure we could also check the typing py37-min-all-deps but it feels like overkill...


Ok, looks good - the failure is expected - see #4878.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4929/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
811379942 MDExOlB1bGxSZXF1ZXN0NTc1OTE3NjYz 4923 [skip-ci] doc: fix pynio warning mathause 10194086 closed 0     1 2021-02-18T19:09:00Z 2021-02-18T19:23:23Z 2021-02-18T19:23:20Z MEMBER   0 pydata/xarray/pulls/4923

Small doc fix, see http://xarray.pydata.org/en/stable/io.html#formats-supported-by-pynio (the ..note:: did not get picked up)

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4923/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
802386795 MDExOlB1bGxSZXF1ZXN0NTY4NTM4Njg0 4864 ensure warnings cannot become errors in assert_ mathause 10194086 closed 0     3 2021-02-05T18:36:07Z 2021-02-08T20:08:12Z 2021-02-08T17:33:38Z MEMBER   0 pydata/xarray/pulls/4864
  • [ ] see https://github.com/pydata/xarray/pull/4760#issuecomment-774101639
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
  • [ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4864/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
803760517 MDExOlB1bGxSZXF1ZXN0NTY5NjM1MTIx 4883 update pre-commit hooks (mypy) mathause 10194086 closed 0     1 2021-02-08T17:13:07Z 2021-02-08T17:47:18Z 2021-02-08T17:42:41Z MEMBER   0 pydata/xarray/pulls/4883

mypy v0.800 was ignoring our config (https://github.com/pydata/xarray/pull/4874#issuecomment-774771523)... Adding an (empty) [mypy] section to setup.cfg seems to do the trick, this is in contrast to the documentation and may get changed again (c.f. python/mypy#9940), but it does not hurt either.

@keewis

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4883/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
437765416 MDExOlB1bGxSZXF1ZXN0MjczOTcxOTQy 2922 Feature/weighted mathause 10194086 closed 0     22 2019-04-26T17:09:02Z 2021-02-03T14:47:52Z 2020-03-19T14:29:43Z MEMBER   0 pydata/xarray/pulls/2922
  • [X] Closes #422
  • [X] Tests added
  • [X] Fully documented, including whats-new.rst for all changes and api.rst for new API

I took a shot at the weighted function - I added a DataArrayWeighted class, that currently only implements mean. So, there is still quite a bit missing (e.g. DatasetWeighted), but let me know what you think.

``` python import numpy as np import xarray as xr da = xr.DataArray([1, 2]) weights = xr.DataArray([4, 6]) da.weighted(weights).mean()

<xarray.DataArray ()>

array(1.6)

```

There are quite a number of difficult edge cases with invalid data, that can be discussed.

  • I decided to replace all NaN in the weights with 0.
  • if weights sum to 0 it returns NaN (and not inf) python weights = xr.DataArray([0, 0]) da.weighted(weights).mean()
  • The following returns NaN (could be 1) python da = xr.DataArray([1, np.nan]) weights = xr.DataArray([1, 0]) da.weighted(weights).mean(skipna=False)

It could be good to add all edge-case logic to a separate function but I am not sure if this is possible...

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2922/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
787502146 MDExOlB1bGxSZXF1ZXN0NTU2MTk4ODY3 4818 weighted: small improvements mathause 10194086 closed 0     3 2021-01-16T16:30:38Z 2021-01-27T08:05:34Z 2021-01-27T08:05:31Z MEMBER   0 pydata/xarray/pulls/4818

Small improvement to weighted - more accurate typing and using _to_temp_dataset & map. No user facing changes.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4818/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
784651607 MDExOlB1bGxSZXF1ZXN0NTUzODA5NTM2 4802 fix decode for scale/ offset list mathause 10194086 closed 0     0 2021-01-12T22:50:26Z 2021-01-19T15:05:04Z 2021-01-15T18:19:56Z MEMBER   0 pydata/xarray/pulls/4802
  • [x] Closes #4631
  • [x] Tests added
  • [x] Passes pre-commit run --all-files
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

cc @gerritholl, @rabernat

<sub>

Overriding CI behaviors

By default, the upstream dev CI is disabled on pull request and push events. You can override this behavior per commit by adding a [test-upstream] tag to the first line of the commit message. For documentation-only commits, you can skip the CI per commit by adding a [skip-ci] tag to the first line of the commit message </sub>

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4802/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
778022297 MDExOlB1bGxSZXF1ZXN0NTQ4MTg2MzYw 4759 coords: retain str dtype mathause 10194086 closed 0     1 2021-01-04T11:17:53Z 2021-01-13T17:18:28Z 2021-01-13T17:09:06Z MEMBER   0 pydata/xarray/pulls/4759
  • [x] Closes #2658, closes #4543
  • [x] Tests added
  • [x] Passes isort . && black . && mypy . && flake8
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

pd.Index("a") has dtype object. Therefore string coords change their dtype on certain operations - e.g. align, __setitem__ (& assign), IndexVariable.concat. This can be avoided by using the coords instead of the index in some cases but in two instances it was unavoidable to cast a pd.Index back to a np.array. I probably did not catch all of these conversions.

What I am not sure: does this somehow contradict the index refactor?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4759/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
780726453 MDExOlB1bGxSZXF1ZXN0NTUwNTczNjM4 4773 CI: ignore some warnings mathause 10194086 closed 0     2 2021-01-06T17:34:05Z 2021-01-07T21:00:31Z 2021-01-07T21:00:27Z MEMBER   0 pydata/xarray/pulls/4773
  • [x] Part of #3266
  • [x] Passes isort . && black . && mypy . && flake8

Supresses 3 warnings we get in the test suite. Two are trivial. The third is PytestUnraisableExceptionWarning: Exception ignored in: CachingFileManager.__del__:

  • The test triggers an error is in CachingFileManager.__init__:

https://github.com/pydata/xarray/blob/31d540f9d668fc5f8c1c92165f950c568778db01/xarray/tests/test_backends_file_manager.py#L205-L207

  • It then tries to run __del__ but there is an error because an attribute is not available (as __init__ failed)

https://github.com/pydata/xarray/blob/31d540f9d668fc5f8c1c92165f950c568778db01/xarray/backends/file_manager.py#L238

  • However, errors in __del__ are ignored, therefore we get a PytestUnraisableExceptionWarning

I decided to suppress the error and not fix CachingFileManager as I think that's nothing user-facing...

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4773/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
766979952 MDExOlB1bGxSZXF1ZXN0NTM5ODM4NTM4 4694 CI: run tests in parallel (pytest-xdist) mathause 10194086 closed 0     9 2020-12-14T22:23:04Z 2020-12-17T22:54:37Z 2020-12-17T22:33:46Z MEMBER   0 pydata/xarray/pulls/4694
  • [x] Closes #3263, potentially part of #4671

It's worth a try.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4694/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
770433196 MDExOlB1bGxSZXF1ZXN0NTQyMTgxODI1 4706 use conda for upstream dev uninstall again mathause 10194086 closed 0     0 2020-12-17T22:54:04Z 2020-12-17T22:54:18Z 2020-12-17T22:54:15Z MEMBER   0 pydata/xarray/pulls/4706

4694 was just merged a bit too soon. Unfortunately using mamba to uninstall the packages for upstream dev did not work - it uninstalled too much, thus switch back to conda. I'll just merge right away.

@dcherian

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4706/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
761270240 MDExOlB1bGxSZXF1ZXN0NTM1OTYxMDUx 4672 CI setup: use mamba and matplotlib-base mathause 10194086 closed 0     16 2020-12-10T14:05:29Z 2020-12-15T16:40:42Z 2020-12-15T16:40:38Z MEMBER   0 pydata/xarray/pulls/4672

Closes #4671

ok let's start with the simplest one

  • [x] switch to the newest windows image (does not help)
  • [x] use mamba to resolve dependencies
  • [x] use matplotlib-base
  • [x] find the slowest tests using py.test xarray/tests/ --durations=100
  • [ ] de-parametrize tests with a slow setup (if possible)
  • [x] reduce the number of xfails (#4685)
  • [ ] other ideas?
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4672/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
745628177 MDExOlB1bGxSZXF1ZXN0NTIzMTU5MTYz 4590 suppress 'ambiguous reference date string' warning mathause 10194086 closed 0     1 2020-11-18T12:44:52Z 2020-12-13T13:16:55Z 2020-11-19T16:46:39Z MEMBER   0 pydata/xarray/pulls/4590

Follow up to #4506

Suppress some "Ambiguous reference date string" warnings. See e.g.: https://dev.azure.com/xarray/xarray/_build/results?buildId=4233&view=logs&j=2280efed-fda1-53bd-9213-1fa8ec9b4fa8&t=175181ee-1928-5a6b-f537-168f7a8b7c2d&l=361

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4590/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
760208816 MDExOlB1bGxSZXF1ZXN0NTM1MDc4NjMy 4664 rasterio no geotransform: update warning message mathause 10194086 closed 0     0 2020-12-09T10:34:52Z 2020-12-11T22:31:49Z 2020-12-11T22:31:45Z MEMBER   0 pydata/xarray/pulls/4664

rasterio slightly changed an error message, so it's no longer ignored. Also switched to pytest.mark.filterwarnings. This makes the diff larger but saves a level of indendation.

https://github.com/pydata/xarray/runs/1508035460#step:6:322

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4664/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
760330286 MDExOlB1bGxSZXF1ZXN0NTM1MTgwMDQ3 4666 upstream-dev: mention sparse mathause 10194086 closed 0     3 2020-12-09T13:28:32Z 2020-12-10T09:47:00Z 2020-12-10T09:46:57Z MEMBER   0 pydata/xarray/pulls/4666

sparse is removed as conda package but not re-installed (https://github.com/pydata/xarray/blob/9802411b35291a6149d850e8e573cde71a93bfbf/ci/install-upstream-wheels.sh)

I assume this is not intentional, @andersy005?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4666/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
755032361 MDExOlB1bGxSZXF1ZXN0NTMwODIxOTk3 4640 pin pip for upstream-dev mathause 10194086 closed 0     2 2020-12-02T07:45:42Z 2020-12-02T17:14:08Z 2020-12-02T16:52:30Z MEMBER   0 pydata/xarray/pulls/4640

Our upstream-dev is failing again. See numpy/numpy#17885 and pypa/pip#9186 for the probable cause. So this will need to be fixed upstream first.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4640/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
752959867 MDExOlB1bGxSZXF1ZXN0NTI5MTM5MjQ1 4617 weighted: de-parameterize tests mathause 10194086 closed 0     1 2020-11-29T17:01:36Z 2020-12-01T09:06:34Z 2020-12-01T09:06:31Z MEMBER   0 pydata/xarray/pulls/4617

I feel I overdid it a bit with the parameterizations of the weighted tests. This brings the number of tests of test_weighted.py from about 1000 down to less than 200 without changing the coverage.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4617/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
749724093 MDExOlB1bGxSZXF1ZXN0NTI2NDkzNTUy 4606 update sphinx to v3.3 mathause 10194086 closed 0     1 2020-11-24T13:51:31Z 2020-11-24T15:02:00Z 2020-11-24T14:52:10Z MEMBER   0 pydata/xarray/pulls/4606
  • [x] Closes #4487

Thanks for the pointer @keewis. Let's see if this works.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4606/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
746021108 MDExOlB1bGxSZXF1ZXN0NTIzNDg2MzQ2 4592 rolling_exp: keep_attrs and typing mathause 10194086 closed 0     2 2020-11-18T21:29:12Z 2020-11-23T10:04:22Z 2020-11-20T19:39:11Z MEMBER   0 pydata/xarray/pulls/4592
  • [x] Towards #4513
  • [x] Tests added
  • [x] Passes isort . && black . && mypy . && flake8
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4592/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
742479353 MDExOlB1bGxSZXF1ZXN0NTIwNjA1NDUy 4581 update mypy to 0.790 mathause 10194086 closed 0     1 2020-11-13T14:14:51Z 2020-11-13T20:09:17Z 2020-11-13T19:38:06Z MEMBER   0 pydata/xarray/pulls/4581
  • [x] Closes #4571
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4581/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull
738893294 MDExOlB1bGxSZXF1ZXN0NTE3NjUwMjk1 4568 pd.Index: replace set operations mathause 10194086 closed 0     1 2020-11-09T10:18:32Z 2020-11-09T21:26:44Z 2020-11-09T19:08:36Z MEMBER   0 pydata/xarray/pulls/4568
  • [x] Closes #4565
  • [x] Passes isort . && black . && mypy . && flake8
  • [x] User visible changes (including notable bug fixes) are documented in whats-new.rst

Pandas will change pd.Index.__or__ and pd.Index.__and__. Use pd.Index.union and pd.Index.intersection inseated. There should be no change in functionality.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4568/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    xarray 13221727 pull

Next page

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issues] (
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [number] INTEGER,
   [title] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [state] TEXT,
   [locked] INTEGER,
   [assignee] INTEGER REFERENCES [users]([id]),
   [milestone] INTEGER REFERENCES [milestones]([id]),
   [comments] INTEGER,
   [created_at] TEXT,
   [updated_at] TEXT,
   [closed_at] TEXT,
   [author_association] TEXT,
   [active_lock_reason] TEXT,
   [draft] INTEGER,
   [pull_request] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [state_reason] TEXT,
   [repo] INTEGER REFERENCES [repos]([id]),
   [type] TEXT
);
CREATE INDEX [idx_issues_repo]
    ON [issues] ([repo]);
CREATE INDEX [idx_issues_milestone]
    ON [issues] ([milestone]);
CREATE INDEX [idx_issues_assignee]
    ON [issues] ([assignee]);
CREATE INDEX [idx_issues_user]
    ON [issues] ([user]);
Powered by Datasette · Queries took 42.39ms · About: xarray-datasette