Test Orders API tools parameters
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 300
- Forks
- 99
- Merge medio
- 9 d 22 h
- PR fusionados (30 d)
- 3
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de planetlabs/planet-client-python
-
better-testing
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
planetlabs/planet-client-python#1110 ·
-
FeaturesClient list_items does not support filteringPosiblemente ocupada @steps-re la tomó hace 93 días. Abiertoproposal
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
planetlabs/planet-client-python#1221 ·
-
FeaturesClient does not implement Update FeaturePosiblemente ocupada @tbarsballe la tomó hace 122 días. Abiertoproposal
Dificultad 3/5 1-2 días Aptitud para principiantes 57/100
planetlabs/planet-client-python#1214 ·
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
planetlabs/planet-client-python#1197 · 1 comentario · 1 reacción ·
-
Quota APIQuizá libre de nuevo @asonnenschein la tomó hace 421 días y no hay ningún pull request abierto. Abiertoai-claude
planetlabs/planet-client-python#1191 · 1 comentario · 1 asignado ·
Todos los issues de planetlabs/planet-client-python
Issues similares
-
bug ready for review
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
odysseus-dev/odysseus#6641 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
happypawspillaro/happypaws#78 ·
Los mantenedores suelen responder en 4 días
-
pydanty:is-working
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
pydantic/pydantic-ai#10020 ·
Los mantenedores suelen responder en 1 día
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ansible-collections/ibm_zos_core#2650 ·
-
hw: pvc tests: vllm vllm
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
intel/intel-xpu-backend-for-triton#8362 ·
Los mantenedores suelen responder en 1 día