Skip to content

Add STAC output orders request #676

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 11 commits into from
Aug 17, 2022
Merged

Conversation

kevinlacaille
Copy link
Contributor

@kevinlacaille kevinlacaille commented Aug 11, 2022

As the title reads, I've added STAC output to the Orders CLIs and APIs request function.

planet.cli.orders.py

  • Added --stac as a click.option as a flag (i.e., boolean)
    • @cholmes, I've set the default to be false, but I could be convinced that it should be set to true

planet.orders_request.py

  • Added stac as an input to build_request()

tests.integration.test_orders_cli.py

  • Added an integration test for the Orders CLI for a STAC output

tests.unit.test_orders_request.py

  • Added a unit test for the Orders API (build_request()) for a STAC output

Below is an example of the STAC metadata at work:

> planet orders request \                          
--name Bangladesh_2018_visual \
--id 20180418_043113_1053,20180418_043112_1053 \
--item-type PSScene \
--bundle visual \
--stac

{"name": "Bangladesh_2018_visual", "products": [{"item_ids": ["20180418_043113_1053", "20180418_043112_1053"], "item_type": "PSScene", "product_bundle": "visual"}], "metadata": {"stac": {}}}

FYI: @cholmes @sgillies @jreiberkyle @mkshah605

Closing #597

@kevinlacaille kevinlacaille added this to the 2.0b1: Core 'MVP' milestone Aug 11, 2022
@kevinlacaille kevinlacaille self-assigned this Aug 11, 2022
@kevinlacaille kevinlacaille linked an issue Aug 11, 2022 that may be closed by this pull request
@kevinlacaille
Copy link
Contributor Author

kevinlacaille commented Aug 11, 2022

What's left?

  • test STAC option in Orders CLI
  • test STAC option in order_request.build_request()

@kevinlacaille kevinlacaille requested a review from tschaub August 15, 2022 13:55
@kevinlacaille kevinlacaille marked this pull request as ready for review August 15, 2022 14:04
Copy link
Member

@tschaub tschaub left a comment

Choose a reason for hiding this comment

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

Looks good, @kevinlacaille. You can take or leave my comment as you like.

@kevinlacaille kevinlacaille merged commit 87c8b0a into main Aug 17, 2022
@kevinlacaille kevinlacaille deleted the add_stac_output_orders_request branch August 17, 2022 19:23
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.

Add STAC output as option for planet orders request
3 participants