Skip to content

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

Merged
merged 46 commits into from
Aug 6, 2025
Merged

Main 3.0 dev #1124

merged 46 commits into from
Aug 6, 2025

Conversation

carl-adams-planet
Copy link
Contributor

PR to keep a diff handy for the gap between current main (2.X) and 3.0 development status

carl-adams-planet and others added 21 commits April 29, 2025 15:28
* 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
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)
Add CLAUDE.md  (#1168)

* add claude md

* change nox examples python version to 3.12
ischneider and others added 14 commits July 24, 2025 16:00
- 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
)

* add additional breaking changes section to v3 migration guide

* add breaking change note for request_source() and subscription_source() methods
* 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
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]>
@asonnenschein asonnenschein requested a review from Copilot August 6, 2025 19:15
@asonnenschein asonnenschein changed the title WIP : Main 3.0 dev Main 3.0 dev Aug 6, 2025
@asonnenschein asonnenschein marked this pull request as ready for review August 6, 2025 19:15
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 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:
Copy link
Preview

Copilot AI Aug 6, 2025

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.

Suggested change
# 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.

Comment on lines +77 to +79
# credentials = received_request.headers['authorization'].strip(
# 'Authorization: Basic ')
# assert base64.b64decode(credentials) == b'clisessiontest:'
Copy link
Preview

Copilot AI Aug 6, 2025

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.

Suggested change
# credentials = received_request.headers['authorization'].strip(
# 'Authorization: Basic ')
# assert base64.b64decode(credentials) == b'clisessiontest:'

Copilot uses AI. Check for mistakes.

ischneider and others added 3 commits August 6, 2025 13:30
* Remove warning. We will support these for now.

* Remove dead code in comment.

* update comments
@carl-adams-planet carl-adams-planet merged commit 23f4226 into main Aug 6, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants