Open-EO / Open-EO/openeo-python-driver

`apply_neighborhood` does not handle `overlap` as optional argument

Open
#235 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
12
Forks
8
Avg merge
6d 3h
Merged PRs (30d)
4

Description

While the apply_neighborhood process should have overlap as an optional argument, it is implemented as a required argument here.

This leads to the following error when overlap is not provided in the python client:

File "/opt/venv/lib64/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 1522, in apply_process
    return process_function(args=ProcessArgs(args, process_id=process_id), env=env)
  File "/opt/venv/lib64/python3.8/site-packages/openeo_driver/ProcessGraphDeserializer.py", line 692, in apply_neighborhood
    return data_cube.apply_neighborhood(process=process, size=size, overlap=overlap, env=env, context=context)
  File "/opt/venv/lib64/python3.8/site-packages/openeo_driver/dry_run.py", line 702, in apply_neighborhood
    overlap_dict = {e['dimension']: e for e in overlap}
TypeError: 'NoneType' object is not iterable

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start in openeo_driver/dry_run.py at apply_neighborhood around line 697, then trace the call from ProcessGraphDeserializer.py shown in the error. Check the behavior when the Python client omits overlap and run the relevant existing test suite. Done means apply_neighborhood accepts the omitted argument without the reported TypeError while preserving behavior when overlap is provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.