-
Notifications
You must be signed in to change notification settings - Fork 98
Add default destination support #1201
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
Conversation
There was a problem hiding this 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 adds support for organization-wide default destinations in the Planet SDK, enabling organizations to designate a single destination that's automatically available to all members for orders and subscriptions.
- Added new API methods for setting, getting, and unsetting default destinations
- Extended CLI with
planet destinations defaultsubcommands for default destination management - Added request builder functions for using default destinations in orders and subscriptions
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| planet/clients/destinations.py | Added async client methods for managing default destinations and is_default filter parameter |
| planet/sync/destinations.py | Added synchronous wrapper methods for default destination management |
| planet/cli/destinations.py | Added CLI commands for default destination operations (set, get, unset) and --is-default filter |
| planet/order_request.py | Added destination() and default_destination() helper functions for orders |
| planet/subscription_request.py | Added destination() and default_destination() helper functions for subscriptions |
| tests/unit/test_order_request.py | Added unit tests for new order request destination functions |
| tests/unit/test_subscription_request.py | Added unit tests for new subscription request destination functions |
| tests/integration/test_destinations_api.py | Added integration tests for default destination API methods |
| tests/integration/test_destinations_cli.py | Added integration tests for default destination CLI commands |
| docs/cli/cli-destinations.md | Added documentation for managing default destinations via CLI |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
|
@asonnenschein I've opened a new pull request, #1202, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Use DEFAULT_DESTINATION_REF constant in order_request.py Co-authored-by: asonnenschein <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: asonnenschein <[email protected]>
charcey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great Adrian!
Add Default Destinations Support
Summary
Adds support for organization-wide default destinations in the Planet SDK. Organizations can now designate a single destination that's automatically available to
all members, simplifying delivery configuration for orders and subscriptions.
Permissions: Setting/unsetting default destinations requires organization admin or destination owner privileges.
Changes
API Client (
planet/clients/destinations.py)set_default_destination(destination_id)- Set a destination as defaultget_default_destination()- Get the current default destinationunset_default_destination()- Remove the default destinationlist_destinations(..., is_default)- Addedis_defaultfilter parameterCLI (
planet/cli/destinations.py)Request Builders
Orders (planet/order_request.py):
destination(destination_ref, path_prefix=None)default_destination(path_prefix=None)Subscriptions (planet/subscription_request.py):
destination(destination_ref, path_prefix=None)default_destination(path_prefix=None)To do