Simplify subscription clip rules in the Subscriptions API SDK #1169
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.
This PR is intended for v3.0.0; it includes changes that will break v2.0.0. See #1162 for context.
Claude generated PR notes:
Summary of Changes
Problem Solved: Simplified subscription clip rules in the Subscriptions API SDK by removing the confusing dual code paths for clip functionality.
Changes Made:
subscriptions.
- Changed from copying the source geometry ('aoi': source['parameters']['geometry']) to using empty parameters ('parameters': {})
- This aligns with the API service contract where empty parameters automatically clip to subscription source geometry
- Updated docstring for clip_to_source parameter to reflect the simplified behavior
- Updated SDK guide documentation to remove references to clip_tool() and mention that custom clip AOIs are no longer supported
- Modified test expectations to check for empty parameters in clip tool configuration
- Removed tests for the clip_tool() function
- All existing tests continue to pass, ensuring backward compatibility for the clip_to_source functionality
API Impact:
The implementation now has a single, clear code path for clipping: use clip_to_source=True to clip to the subscription source geometry, or clip_to_source=False
(default) for no clipping. This eliminates the previous confusion between clip_tool() and clip_to_source parameters.