Warn about unsupported output format options#915
Open
Silvren wants to merge 2 commits into
Open
Conversation
soxofaan
reviewed
Jul 17, 2026
# Conflicts: # CHANGELOG.md
Silvren
force-pushed
the
agent/warn-unsupported-format-options
branch
from
July 17, 2026 08:19
0eb1453 to
b68d1a6
Compare
Author
|
Thanks — both points are addressed now. Format and option checks share _check_output_format, the changelog entry is at the bottom of Unreleased/Added, and the branch is rebased. Jenkins is green. |
soxofaan
reviewed
Jul 17, 2026
| self, | ||
| *, | ||
| format: str, | ||
| options: Optional[Mapping], |
Member
There was a problem hiding this comment.
if you mark this as optional, also give it default None
| if format_name is None: | ||
| raise ValueError(f"Invalid format {format!r}. Should be one of {set(output_formats)}") | ||
|
|
||
| format_metadata = output_formats[format_name] |
Member
There was a problem hiding this comment.
simplify to something like
matching = [(k, v) for (k, v) in output_formats.items() if k.lower() == format.lower()]
if len(matching) != 1:
....
[(_, format_metadata)] = matching| of another :py:class:`~openeo.rest.vectorcube.VectorCube` instance. | ||
| """ | ||
| format = format or "GeoJSON" | ||
| if self._connection and options: |
Member
There was a problem hiding this comment.
The and options is wrong: the check should happen regardless
|
|
||
| ### Added | ||
|
|
||
| - Warn when `save_result` uses output format options that are not advertised by the backend. ([#649](https://github.com/Open-EO/openeo-python-client/issues/649)) |
Member
There was a problem hiding this comment.
changelog has changed in the meantime,
it's probably best to do a rebase here
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
save_resultoptions with the format parameters advertised by/file_formatsDummyBackend.setup_file_formatto define format parameters in testsTesting
python -m pytest tests/rest/datacube/test_datacube100.py tests/rest/datacube/test_vectorcube.py -q(478 passed, 2 skipped)python -m pytest tests/rest/datacube/test_datacube100.py::test_save_result_format tests/rest/datacube/test_datacube100.py::test_save_result_format_options_warning tests/rest/datacube/test_vectorcube.py::test_save_result_format_options_warning -qpre-commit run --files CHANGELOG.md openeo/rest/_testing.py openeo/rest/connection.py openeo/rest/datacube.py openeo/rest/vectorcube.py tests/rest/datacube/test_datacube100.py tests/rest/datacube/test_vectorcube.pyFixes #649