Remove unused xrspatial.analytics module#3602
Merged
Merged
Conversation
summarize_terrain was a thin wrapper over slope/aspect/curvature that was never exported from the package, never documented, and had no internal callers. Drop the module and its test file.
brendancol
commented
Jul 2, 2026
brendancol
left a comment
Contributor
Author
There was a problem hiding this comment.
PR Review: Remove unused xrspatial.analytics module
This PR deletes xrspatial/analytics.py and its test file, nothing else. The usual domain checks (algorithm accuracy, backend dispatch, dask/cupy kernels, performance) don't apply to a straight removal, so I looked at whether anything still depends on the module and whether the removal leaves the tree consistent.
Blockers
None.
Suggestions
The deprecation-first path raised in #3601 is still open. If a maintainer would rather ship a DeprecationWarning for one release than remove outright, that's their call. The PR takes the hard-removal route, which holds up given the function was never public.
Nits
None.
What looks good
- The diff is exactly two file deletions, no stray edits. (I caught and fixed a base-branch issue first: the branch had been cut from a feature branch and was dragging unrelated template work into the diff. A rebase onto origin/main cleaned it up.)
- No remaining importers. A repo-wide grep for
summarize_terrainandfrom xrspatial.analyticscomes back empty. The one survivinganalyticshit is an unrelated word in a geotiff docstring. import xrspatialstill works, andpytest --cocollects 7616 tests with no import errors from the removed test file.- Nothing in
__init__.py, the README matrix, ordocs/pointed at the module, so there are no dangling doc entries.
Checklist
- Removal leaves no dangling imports or references: verified
- Package still imports: verified
- Test suite collects clean: verified
- No public API or docs entry pointed at the module: verified
- Breaking change (undocumented import path) noted in the PR body and issue: yes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3601
What
xrspatial/analytics.py(its only function,summarize_terrain, is a thin wrapper overslope/aspect/curvature).xrspatial/tests/test_analytics.py.Why
The function was never exported from
xrspatial/__init__.py, never appeared in the README feature matrix or thedocs/API reference, and has no internal callers (repo-wide grep). Callers who want the same result can callslope,aspect, andcurvaturedirectly and assemble the Dataset — that's all the wrapper did.Removing the module breaks the undocumented
from xrspatial.analytics import summarize_terrainimport path. See #3601 for the discussion of a deprecation-first alternative.Backend coverage
Not applicable — this only removes code.
Test plan
python -c "import xrspatial"still workspytest xrspatial/tests/ --cocollects clean (7616 tests, no import errors)summarize_terrainor theanalyticsmodule (the oneanalyticshit left is an unrelated word in ageotiff/_writers/eager.pydocstring)