Skip to content

Tasking API #1187

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Tasking API #1187

wants to merge 1 commit into from

Conversation

asonnenschein
Copy link
Contributor

@asonnenschein asonnenschein commented Aug 13, 2025

This PR provides a complete, production-ready Tasking API client that seamlessly integrates with the existing Planet Python SDK architecture and follows all established patterns and conventions. Generated with help from Claude Code:

Ticket

#1186

Key Features

  • Feature parity with Planet Tasking API reference
  • AsyncIterator support for listing orders with pagination
  • Order state management with wait functionality
  • UUID validation for order IDs
  • Error handling with Planet SDK exception patterns
  • CLI integration with common Planet CLI patterns
  • Comprehensive testing with both unit and integration tests

Details

  1. Async TaskingClient (planet/clients/tasking.py)
    • Full async API client with all core methods
    • Create, get, cancel, list, and wait for tasking orders
    • Get order results functionality
    • Proper error handling and validation
    • Follows existing SDK patterns
  2. Sync TaskingAPI (planet/sync/tasking.py)
    • Synchronous wrapper around the async client
    • All the same functionality as async version
    • Integrated into the main Planet client
  3. CLI Commands (planet/cli/tasking.py)
    • Complete CLI interface: planet tasking
    • Commands: create-order, get-order, cancel-order, list-orders, wait-order, get-results
    • Supports both JSON file input and direct command-line arguments
    • Integrated into main CLI
  4. Comprehensive Testing
    • Unit tests for TaskingClient and TaskingOrderStates
    • Integration tests for both API and CLI
    • Mock HTTP responses using respx
    • Tests cover all major functionality
  5. Code Quality
    • ✅ Linting passes (flake8, yapf)
    • ✅ Type checking passes (mypy)
    • Follows existing code conventions
    • Proper documentation and docstrings

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 introduces a complete Tasking API client for the Planet Python SDK, providing both synchronous and asynchronous interfaces along with comprehensive CLI commands. The implementation follows existing SDK patterns and conventions.

Key changes:

  • Complete async TaskingClient with order management capabilities (create, get, cancel, list, wait, get results)
  • Synchronous TaskingAPI wrapper integrated into the main Planet client
  • Full CLI interface with subcommands for all tasking operations

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
planet/clients/tasking.py Core async TaskingClient implementation with order management methods
planet/sync/tasking.py Synchronous wrapper for TaskingClient
planet/sync/client.py Integration of TaskingAPI into main Planet client
planet/cli/tasking.py Complete CLI interface for tasking operations
planet/cli/cli.py Registration of tasking commands in main CLI
planet/clients/init.py Export of TaskingClient
planet/init.py Addition of TaskingClient to public API
tests/unit/test_tasking_client.py Unit tests for TaskingClient core functionality
tests/unit/test_client.py Tests for tasking integration in Planet client
tests/integration/test_tasking_api.py Integration tests for async and sync APIs
tests/integration/test_tasking_cli.py Integration tests for CLI commands

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

'name': name,
'geometry': geometry,
'products': [{
'item_type': 'skysat_collect', 'asset_type': 'ortho_analytic'
Copy link
Preview

Copilot AI Aug 13, 2025

Choose a reason for hiding this comment

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

Hard-coded product configuration should be configurable or documented as a default example. Consider making this configurable through CLI options or documenting that this is just a default example.

Suggested change
'item_type': 'skysat_collect', 'asset_type': 'ortho_analytic'
'item_type': item_type, 'asset_type': asset_type

Copilot uses AI. Check for mistakes.

@asonnenschein asonnenschein mentioned this pull request Aug 13, 2025
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.

1 participant