-
Notifications
You must be signed in to change notification settings - Fork 96
Main 3.0 dev #1124
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
Main 3.0 dev #1124
Conversation
* enable tests for 3.x main dev branch * allow manually triggering of tests on any branch.
Update main-3.0-dev from main
Initial merge of OAuth via the planet auth library for the SDK. This deeply changes the planet.Auth class and the CLI functions related to auth, but should be pretty light on the rest of the SDK.
Update 3.0 dev branch from main
Catchup main-3.0-dev from main
* update CONTRIBUTING and README to account for use of github projects and milestones. * minor updates to examples. * minor updates to auth guide. * 3.0 migration guide.
3.0 update from current 2.0 main
catchup from main
Features API item delete support (#1156)
add Planet sync client to docs, fix docstring (#1153)
fix incorrect search_filter arg in Data API documentation example (#1…
* updates from beta feedback for improved login CLI experience. * plumb profile copy * update planet-auth per feedback. * formatting for the linter * proofreading. * simplify examples * update links * minor edits to example code * reorder sections * more breadcrumbs in the 'python' housed pointer page for auth docs. * update the auth section in non-auth sub-trees of the doc site * More doc edits for clarification. Adding links to the list of protocols to specific implementaiton examples. * accepting edit suggestion. * adding suggested link * clarifying links page * unhide M2M options for now * add option to control saving to storage to constructor. Doc updates
Update subscriptions clip tool docstrings (#1161)
3.0 release updates
Add CLAUDE.md (#1168) * add claude md * change nox examples python version to 3.12
* update clip tool rules * fix test
Add CLAUDE.md (#1168)
- make it clearer that name or ID can be used to lookup items - add typed dicts to represent API responses/resources - accept typed dict or name/ID when possible - raise MissingResource when attempting a get by name with no match - use positional/keyword-only parameters in client methods
- make separate summarize_quads function - use quad ID for download file name to avoid hitting download endpoint to determine name from content-disposition headers - add full_extent option for explicitly using the mosaic bbox for listing (rather than defaulting when bbox/geometry not provided) - required bbox or geometry for downloading - minor doc fixes add language for styling code blocks
initial mosaics cli + async client
* remove source type param from pv source method * docs * update method names and signatrues
* update base url option * simplify to base_url
* Update docs for Destinations API and add CLI tests (#1176) * make source type truly optional for planetary_variable_source * complete cli docs * Revert "make source type truly optional for planetary_variable_source" This reverts commit aa6dba8. * readme update * test fixes * fix test * fix space in readme
Carl/update 3.0 from main
update 3.0 from main
Approved by Matt Ballard for release. * Remove references to email inbox that is no longer monitored. * update trial words and getting your credentials * delete get your pl account --------- Co-authored-by: Matt Ballard <[email protected]>
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 represents a major upgrade to version 3.0 of the Planet SDK for Python, primarily focused on migrating from legacy authentication mechanisms to OAuth2-based authentication while also introducing new features like Mosaics API support.
Key changes include:
- Migration from legacy JWT-based authentication to OAuth2 with support for user interactive flows and machine-to-machine authentication
- Introduction of new Mosaics API client with comprehensive CLI and SDK support
- Deprecation of subscription clip tools and renaming of planetary variable sources to generic subscription sources
Reviewed Changes
Copilot reviewed 81 out of 83 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
planet/auth.py | Complete rewrite to support OAuth2 authentication patterns while maintaining backwards compatibility for API keys |
planet/cli/auth.py | Replacement of legacy auth commands with OAuth2-based authentication flows |
planet/clients/mosaics.py | New async client for Mosaics API with full CRUD operations |
planet/sync/mosaics.py | Synchronous wrapper for the Mosaics API client |
planet/cli/mosaics.py | Complete CLI interface for mosaics operations |
planet/subscription_request.py | Removal of clip_tool support and renaming of planetary variable sources |
tests/unit/test_subscription_request.py | Updated tests reflecting subscription API changes |
pyproject.toml | Added planet-auth dependency and updated test dependencies |
@@ -195,6 +195,7 @@ async def test_session_contextmanager(): | |||
@pytest.mark.parametrize('data', (None, {'boo': 'baa'})) | |||
async def test_session_request_success(data): | |||
|
|||
# async with http.Session(auth=planet.Auth.from_plauth(pl_authlib_context=planet_auth_utils.PlanetAuthFactory.initialize_auth_client_context(auth_profile_opt="none"))) as ps: |
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.
Commented out code should be removed rather than left in the codebase. If this is needed for reference, consider adding a proper comment explaining why it's preserved.
# async with http.Session(auth=planet.Auth.from_plauth(pl_authlib_context=planet_auth_utils.PlanetAuthFactory.initialize_auth_client_context(auth_profile_opt="none"))) as ps: |
Copilot uses AI. Check for mistakes.
# credentials = received_request.headers['authorization'].strip( | ||
# 'Authorization: Basic ') | ||
# assert base64.b64decode(credentials) == b'clisessiontest:' |
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.
Large block of commented code should be removed. If this verification logic is still needed, it should be uncommented and updated, or removed entirely.
# credentials = received_request.headers['authorization'].strip( | |
# 'Authorization: Basic ') | |
# assert base64.b64decode(credentials) == b'clisessiontest:' |
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
* Remove warning. We will support these for now. * Remove dead code in comment. * update comments
PR to keep a diff handy for the gap between current main (2.X) and 3.0 development status