Skip to content

Refactor planetary_variable_source() signature #1170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 25, 2025

Conversation

asonnenschein
Copy link
Contributor

This MR refactors the subscription_request.planetary_variable_source() to better reflect API functionality by removing the source_type positional argument from the signature. This is a breaking change and will need to ship with v3.x.x. Source type is an optional property on the Subscriptions API service contract that we are moving away from in favor of more precise parameters like source ID, item types, asset types, etc. #1107 started the effort to reduce reliance of source type in the SDK, but had to stop short of removing the source type positional argument from subscription_request.planetary_variable_source() because it would've been a breaking change in v2.x.x.

@asonnenschein asonnenschein added this to the 3.0.0 Release milestone Jul 21, 2025
@asonnenschein asonnenschein requested a review from Copilot July 21, 2025 16:54
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the planetary_variable_source() function to remove the source_type positional argument, representing a breaking change for v3.x.x as the SDK moves away from source type dependencies in favor of more precise parameters.

  • Removes var_type parameter from planetary_variable_source() function signature
  • Updates all tests and CLI commands to no longer use or expect source type functionality
  • Simplifies documentation to focus on variable IDs rather than types

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
planet/subscription_request.py Removes var_type parameter and associated logic from planetary_variable_source() function
planet/cli/subscriptions.py Removes --var-type CLI option and updates command implementation
tests/unit/test_subscription_request.py Updates unit tests to remove source type test cases and assertions
tests/integration/test_subscriptions_cli.py Updates integration tests to remove source type parameterization
docs/hooks/mkdocs_hooks.py Adds whitespace formatting
Comments suppressed due to low confidence (1)

@asonnenschein asonnenschein changed the base branch from adrian/add-claude to main-3.0-dev July 23, 2025 19:56
@asonnenschein
Copy link
Contributor Author

Add note about breaking change to the 3.0 migration guide.

@asonnenschein asonnenschein force-pushed the adrian/refactor-kwargs branch from 2da4768 to 7dd1896 Compare July 24, 2025 15:02
@asonnenschein asonnenschein force-pushed the adrian/refactor-kwargs branch from 7dd1896 to 8153685 Compare July 24, 2025 15:06
@asonnenschein
Copy link
Contributor Author

Added breaking change note to v3 migration doc #1173

@asonnenschein asonnenschein merged commit 4dbe92b into main-3.0-dev Jul 25, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants