Skip to content

Commit a0f67d8

Browse files
committed
Merge branch 'main' into mapblock-fix
* main: Replace markdown issue templates with issue forms (pydata#6119) Remove lock kwarg (pydata#5912) Remove pre-commit GHA workflow (pydata#6120) is_dask_collection: micro optimization (pydata#6107)
2 parents 63b4602 + 2cb95a8 commit a0f67d8

File tree

10 files changed

+112
-109
lines changed

10 files changed

+112
-109
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

-39
This file was deleted.

.github/ISSUE_TEMPLATE/bugreport.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Bug Report
2+
description: File a bug report to help us improve
3+
title: '[Bug]: '
4+
labels: [bug, 'needs triage']
5+
assignees: []
6+
body:
7+
- type: textarea
8+
id: what-happened
9+
attributes:
10+
label: What happened?
11+
description: |
12+
Thanks for reporting a bug! Please describe what you were trying to get done.
13+
Tell us what happened, what went wrong.
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
id: what-did-you-expect-to-happen
19+
attributes:
20+
label: What did you expect to happen?
21+
description: |
22+
Describe what you expected to happen.
23+
validations:
24+
required: false
25+
26+
- type: textarea
27+
id: sample-code
28+
attributes:
29+
label: Minimal Complete Verifiable Example
30+
description: |
31+
Minimal, self-contained copy-pastable example that generates the issue if possible. Please be concise with code posted. See guidelines below on how to provide a good bug report:
32+
33+
- [Minimal Complete Verifiable Examples](https://stackoverflow.com/help/mcve)
34+
- [Craft Minimal Bug Reports](http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
35+
36+
Bug reports that follow these guidelines are easier to diagnose, and so are often handled much more quickly.
37+
This will be automatically formatted into code, so no need for markdown backticks.
38+
render: python
39+
40+
- type: textarea
41+
id: log-output
42+
attributes:
43+
label: Relevant log output
44+
description: Please copy and paste any relevant output. This will be automatically formatted into code, so no need for markdown backticks.
45+
render: python
46+
47+
- type: textarea
48+
id: extra
49+
attributes:
50+
label: Anything else we need to know?
51+
description: |
52+
Please describe any other information you want to share.
53+
54+
- type: textarea
55+
id: show-versions
56+
attributes:
57+
label: Environment
58+
description: |
59+
Paste the output of `xr.show_versions()` here
60+
validations:
61+
required: true

.github/ISSUE_TEMPLATE/feature-request.md

-22
This file was deleted.

.github/ISSUE_TEMPLATE/newfeature.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Feature Request
2+
description: Suggest an idea for xarray
3+
title: '[FEATURE]: '
4+
labels: [enhancement]
5+
assignees: []
6+
body:
7+
- type: textarea
8+
id: description
9+
attributes:
10+
label: Is your feature request related to a problem?
11+
description: |
12+
Please do a quick search of existing issues to make sure that this has not been asked before.
13+
Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: solution
18+
attributes:
19+
label: Describe the solution you'd like
20+
description: |
21+
A clear and concise description of what you want to happen.
22+
- type: textarea
23+
id: alternatives
24+
attributes:
25+
label: Describe alternatives you've considered
26+
description: |
27+
A clear and concise description of any alternative solutions or features you've considered.
28+
validations:
29+
required: false
30+
- type: textarea
31+
id: additional-context
32+
attributes:
33+
label: Additional context
34+
description: |
35+
Add any other context about the feature request here.
36+
validations:
37+
required: false

.github/PULL_REQUEST_TEMPLATE.md

-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22

33
- [ ] Closes #xxxx
44
- [ ] Tests added
5-
- [ ] Passes `pre-commit run --all-files`
65
- [ ] User visible changes (including notable bug fixes) are documented in `whats-new.rst`
76
- [ ] New functions/methods are listed in `api.rst`

.github/workflows/ci-pre-commit.yml

-17
This file was deleted.

doc/whats-new.rst

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Breaking changes
3131

3232
Deprecations
3333
~~~~~~~~~~~~
34+
- Removed the lock kwarg from the zarr and pydap backends, completing the deprecation cycle started in :issue:`5256`.
35+
By `Tom Nicholas <https://github.com/TomNicholas>`_.
3436

3537

3638
Bug fixes

xarray/backends/pydap_.py

-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import warnings
2-
31
import numpy as np
42

53
from ..core import indexing
@@ -126,15 +124,7 @@ def open_dataset(
126124
use_cftime=None,
127125
decode_timedelta=None,
128126
session=None,
129-
lock=None,
130127
):
131-
# TODO remove after v0.19
132-
if lock is not None:
133-
warnings.warn(
134-
"The kwarg 'lock' has been deprecated for this backend, and is now "
135-
"ignored. In the future passing lock will raise an error.",
136-
DeprecationWarning,
137-
)
138128

139129
store = PydapDataStore.open(
140130
filename_or_obj,

xarray/backends/zarr.py

-8
Original file line numberDiff line numberDiff line change
@@ -810,15 +810,7 @@ def open_dataset(
810810
chunk_store=None,
811811
storage_options=None,
812812
stacklevel=3,
813-
lock=None,
814813
):
815-
# TODO remove after v0.19
816-
if lock is not None:
817-
warnings.warn(
818-
"The kwarg 'lock' has been deprecated for this backend, and is now "
819-
"ignored. In the future passing lock will raise an error.",
820-
DeprecationWarning,
821-
)
822814

823815
filename_or_obj = _normalize_path(filename_or_obj)
824816
store = ZarrStore.open_group(

xarray/core/pycompat.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,19 @@ def __init__(self, mod):
4343
self.available = duck_array_module is not None
4444

4545

46+
dsk = DuckArrayModule("dask")
47+
dask_version = dsk.version
48+
dask_array_type = dsk.type
49+
50+
sp = DuckArrayModule("sparse")
51+
sparse_array_type = sp.type
52+
sparse_version = sp.version
53+
54+
cupy_array_type = DuckArrayModule("cupy").type
55+
56+
4657
def is_dask_collection(x):
47-
if DuckArrayModule("dask").available:
58+
if dsk.available:
4859
from dask.base import is_dask_collection
4960

5061
return is_dask_collection(x)
@@ -54,14 +65,3 @@ def is_dask_collection(x):
5465

5566
def is_duck_dask_array(x):
5667
return is_duck_array(x) and is_dask_collection(x)
57-
58-
59-
dsk = DuckArrayModule("dask")
60-
dask_version = dsk.version
61-
dask_array_type = dsk.type
62-
63-
sp = DuckArrayModule("sparse")
64-
sparse_array_type = sp.type
65-
sparse_version = sp.version
66-
67-
cupy_array_type = DuckArrayModule("cupy").type

0 commit comments

Comments
 (0)