Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/sweep-style-state.csv
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ rasterize,2026-05-27,2503,HIGH,1;3,F401 line 15 + F811 line 1193 (paired: local
reproject,2026-06-09,3083,HIGH,3;4,"Re-sweep after 2026-06-08 cleanup (#3049): new findings confined to __init__.py. Cat 3 HIGH: F401 _merge_arrays_cupy imported from ._merge but never used (function kept in _merge.py, noted as dead code - no callers anywhere); F841 _use_native_cuda assigned L563/L602 never read (leftover from #2620 unconditional native-CUDA resampling). Cat 4: isort regrouped top-of-file import blocks + function-local _vertical import (~L1278). Cat 1/2 clean (flake8 reported only the two F-codes). Cat 5 grep clean (d: dict / entry: dict in _lite_crs.py are annotations, not shadows). flake8+isort clean after fix; 432 reproject tests pass incl. 43 GPU (CUDA available). PR open."
resample,2026-05-27,2543,MEDIUM,4,isort drift only: 4 multi-line parenthesised imports collapsed to single/one-per-line under line_length=100 (top-of-file scipy.ndimage + xrspatial.utils; local cupyx imports in _nan_aware_interp_cupy and _interp_block_cupy); two blank-line nits after import math in _run_dask_numpy/_run_dask_cupy. flake8 clean. Cat 5 grep clean. 169 resample tests pass.
slope,2026-05-29,2685,HIGH,1;3;4,"F401 line 26 (VALID_BOUNDARY_MODES unused, not re-exported). E402+E305 line 48 (geodesic import block sat after _geodesic_cuda_dims; moved up to top-of-file imports). E501 line 260 (cupy kernel launch, 108 chars) wrapped. isort: consolidated/regrouped xrspatial imports (dataset_support, geodesic, utils). Cat 2 clean. Cat 5 grep clean. 41 slope + 21 geodesic_slope tests pass."
surface_distance,2026-08-16,3710,MEDIUM,4,"flake8 baseline 0 (clean, confirmed). Cat 4 isort only: _heap_push/_heap_pop out of alphabetical order, xrspatial.utils imported in two separate statements split by an unrelated import, and a vertical-hanging-indent wrap that cost_distance/proximity/focal/zonal do not use. Fixed by running isort; flake8+isort clean after; 37/37 test_surface_distance.py pass (CUDA available on host). Cat 1/2/3 none. Cat 5: no bare except (only a broad `except Exception` in _available_gpu_memory_bytes), no ==None/True, no shadowed builtins. Mutable default `target_values: list = []` on all 3 public funcs is real but never mutated (rebound via np.asarray) and matches cost_distance/proximity house signature -- left to the api-consistency sweep rather than raced into a duplicate PR. LOW, documented not fixed: dead `height, width = source_da.shape` unpack in _surface_distance_dask (pyflakes skips F841 for tuple unpacking so flake8 misses it); _precompute_dd_grid imports _available_memory_bytes from xrspatial.zonal though this module defines its own identical helper at line 100."
viewshed,2026-05-29,2690,HIGH,1;4;5,"flake8 E127 x2 (L2013-2014 _viewshed_distance_sweep sig); isort .utils import reflow; shadowed builtin id->node_id (L1409,1474). Fixed via /rockout PR. No behavioural change."
visibility,2026-06-10,3182,MEDIUM,4,"flake8 baseline 0. Cat 4 isort only: from .utils import (...) 3-line block collapses to one 92-char line under line_length=100; deferred from .viewshed import alphabetised to INVISIBLE, viewshed. Cat 1/2/3/5 clean (grep: no bare except, mutable defaults, ==None/True, or shadowed builtins). Fixed by running isort; flake8+isort clean after fix; 25 visibility tests pass. PR via #3182."
zonal,2026-05-27,2522,HIGH,1;3;4,"F401 not_implemented_func (line 42, only present on import line). E501 line 455 (dd.concat one-liner, 117 chars) wrapped across 3 lines. isort: consolidated xrspatial.utils block (merged has_dask_array, dropped not_implemented_func, alphabetised, trimmed extra blank line). Cat 5 grep clean. 125 zonal tests pass."
13 changes: 5 additions & 8 deletions xrspatial/surface_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,12 @@
class cupy: # type: ignore[no-redef]
ndarray = False

from xrspatial.cost_distance import _heap_push, _heap_pop
from xrspatial.proximity import _vectorized_calc_direction
from xrspatial.utils import (
_validate_raster,
cuda_args, get_dataarray_resolution, ngjit,
has_cuda_and_cupy, is_cupy_array, is_dask_cupy,
)
from xrspatial.cost_distance import _heap_pop, _heap_push
from xrspatial.dataset_support import supports_dataset
from xrspatial.utils import _dask_task_name_kwargs
from xrspatial.proximity import _vectorized_calc_direction
from xrspatial.utils import (_dask_task_name_kwargs, _validate_raster, cuda_args,
get_dataarray_resolution, has_cuda_and_cupy, is_cupy_array,
is_dask_cupy, ngjit)

# ---------------------------------------------------------------------------
# Constants
Expand Down
Loading