Commit 4ccbddb
authored
Memory-safe rechunk, preview chunk budget, plot improvements (#1075)
* Add design spec for hypsometric_integral in zonal.py
* Update hypsometric_integral spec with review fixes
Add column/rasterize_kw params, fix accessor namespace to .xrs,
clarify nodata semantics, specify float64 output dtype, add
list-of-pairs zones support, note dask chunk alignment strategy.
* Add implementation plan for hypsometric_integral
* Add .claude/worktrees/ to .gitignore
* Add memory-safe rechunk, preview chunk budget, and plot ergonomics
rechunk_no_shuffle now accepts Datasets and re-opens unmodified zarr
stores with larger chunks instead of layering a rechunk-merge graph.
preview() derives a per-task memory budget from the active dask cluster
and re-opens zarr sources when chunks exceed it.
Accessor gains Dataset.xrs.plot() for subplot grids and DataArray plot
auto-computes dask arrays, sets equal aspect, and avoids kwargs mutation.
Removes fused_overlap/multi_overlap from the Dataset accessor (the
underlying functions only accept DataArrays).
* Skip zarr-dependent rechunk tests when zarr is not installed
The zarr tests called xr.open_zarr / to_zarr which fails on CI
environments without zarr (e.g. macOS 3.14). The failure triggered
fail-fast cancellation of all other matrix jobs.
* Remove zarr re-open logic from rechunk and preview
Drop _is_unmodified_zarr, _reopen_preview_chunks, and
_preview_chunk_budget. Dataset rechunk now uses ds.chunk()
instead of re-opening the zarr store under the hood.1 parent ab16fb6 commit 4ccbddb
File tree
6 files changed
+124
-66
lines changed- examples
- dask
- user_guide
- xrspatial
- tests
6 files changed
+124
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | | - | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | 96 | | |
105 | 97 | | |
106 | 98 | | |
107 | 99 | | |
108 | | - | |
| 100 | + | |
109 | 101 | | |
110 | 102 | | |
111 | 103 | | |
| |||
146 | 138 | | |
147 | 139 | | |
148 | 140 | | |
149 | | - | |
150 | | - | |
| 141 | + | |
151 | 142 | | |
152 | | - | |
153 | 143 | | |
154 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
155 | 149 | | |
156 | 150 | | |
157 | 151 | | |
| |||
162 | 156 | | |
163 | 157 | | |
164 | 158 | | |
165 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
166 | 162 | | |
167 | 163 | | |
168 | 164 | | |
| |||
182 | 178 | | |
183 | 179 | | |
184 | 180 | | |
185 | | - | |
| 181 | + | |
186 | 182 | | |
187 | 183 | | |
188 | 184 | | |
189 | 185 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | 186 | | |
198 | 187 | | |
199 | 188 | | |
| |||
259 | 248 | | |
260 | 249 | | |
261 | 250 | | |
262 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
263 | 262 | | |
264 | 263 | | |
265 | 264 | | |
| |||
324 | 323 | | |
325 | 324 | | |
326 | 325 | | |
327 | | - | |
| 326 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
1029 | 1030 | | |
1030 | 1031 | | |
1031 | 1032 | | |
1032 | | - | |
1033 | | - | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
105 | 128 | | |
106 | 129 | | |
107 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
1031 | 1058 | | |
1032 | | - | |
| 1059 | + | |
1033 | 1060 | | |
1034 | 1061 | | |
1035 | 1062 | | |
| |||
1038 | 1065 | | |
1039 | 1066 | | |
1040 | 1067 | | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1044 | 1072 | | |
1045 | 1073 | | |
1046 | 1074 | | |
1047 | 1075 | | |
1048 | 1076 | | |
1049 | 1077 | | |
1050 | 1078 | | |
1051 | | - | |
1052 | | - | |
| 1079 | + | |
| 1080 | + | |
1053 | 1081 | | |
1054 | 1082 | | |
1055 | 1083 | | |
1056 | 1084 | | |
1057 | | - | |
| 1085 | + | |
1058 | 1086 | | |
1059 | 1087 | | |
1060 | 1088 | | |
| |||
1066 | 1094 | | |
1067 | 1095 | | |
1068 | 1096 | | |
| 1097 | + | |
| 1098 | + | |
1069 | 1099 | | |
1070 | 1100 | | |
1071 | | - | |
| 1101 | + | |
1072 | 1102 | | |
1073 | 1103 | | |
1074 | 1104 | | |
| |||
1079 | 1109 | | |
1080 | 1110 | | |
1081 | 1111 | | |
1082 | | - | |
1083 | | - | |
1084 | | - | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1088 | 1118 | | |
1089 | | - | |
1090 | 1119 | | |
1091 | | - | |
1092 | | - | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1093 | 1126 | | |
1094 | | - | |
1095 | | - | |
1096 | | - | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
1097 | 1140 | | |
1098 | | - | |
1099 | | - | |
| 1141 | + | |
| 1142 | + | |
1100 | 1143 | | |
1101 | | - | |
1102 | | - | |
| 1144 | + | |
1103 | 1145 | | |
1104 | 1146 | | |
1105 | 1147 | | |
| |||
0 commit comments