Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Test Orders API tools parameters

オープン
#825 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api, backend

調査の方向性

Start in planet/order_request.py at _tool() and harmonize_tool(), then inspect the planet.specs validate_tool implementation and the related issue #793. Trace how Orders API tool parameters are checked against the OpenAPI spec. Done means invalid parameter values fail validation without relying on manually maintained parameter lists.

索引モデルが issue の本文から書いたものです。

説明

better-testing orders api

Expected behavior
When testing tools for the Orders API, I'd expect the tool name and the parameters to be validated.

Actual behavior (describe the problem)
When testing tools for the Orders API, only the tool name appears to be validated.

This seems to happen in the function _tool(). It looks like our tools get passed to _tool(), which validates the tool name, but not the tool’s parameters.

For instance, for harmonize_tool() could get passed any sort of target sensor name and the test won’t fail, because it’s only looking to see if the tool name, ‘harmonize’, is a valid tool, not if the parameter, sensor_name, is valid.

Related Issues
I created a ticket a month ago (#793), which sort of fixes this issue for harmonize_tool(), but doesn’t really do so.

Workaround
None.

Minimum, Complete, Viable Code Sample
Current solution in planet.specs:

def validate_tool(tool):
    return _validate_field(tool, SUPPORTED_TOOLS, 'tool')

Proposed solution in planet.specs:

def validate_tool_name(tool):
    return _validate_field(tool, SUPPORTED_TOOLS, 'tool')

def validate_tool_parameter(parameter):
    return _validate_field(parameter, SUPPORTED_PARAMS, 'parameter')

However, the issue here is that we'd be manually supplying SUPPORTED_PARAMS, which is it's own issue, because we need to continually manually check these against the openAPI spec.

主要言語
Python
スター
300
フォーク
99
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

planetlabs/planet-client-python のほかの issue

planetlabs/planet-client-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。