pre-validate band math tool entries

Open
#893 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api

Research direction

The issue points to the band_math tool; start there and trace how its entries are handled when an order is created. Use the supplied invalid b2 example as the failing case, and verify that the error is reported before the order runs rather than after several minutes.

Written by the indexing model from the issue text.

Description

orders api proposal

Is your feature request related to a problem? Please describe.

Creating an order with invalid band math entries results in the order being run for several minutes before the order finally fails. There is no pre-validation.

Describe the solution you'd like

Pre-validate band math entries before an order is run. This would likely happen in the band_math tool itself.

Describe alternatives you've considered

Additional context
Here's an order request with an invalid band math entry for b2.

{
  "name": "name",
  "products": [
    {
      "item_ids": [
        "20230322_161237_04_24ca"
      ],
      "item_type": "PSScene",
      "product_bundle": "analytic_udm2"
    }
  ],
  "tools": [
    {
      "bandmath": {
        "b1": "2*b1",
        "b2": "3*before",
        "pixel_type": "Auto"
      }
    }
  ]
}
Dominant language
Python
Stars
299
Forks
100
Avg merge
7d 8h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from planetlabs/planet-client-python

All issues in planetlabs/planet-client-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.