Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ and start a new "In Progress" section above it.

## In progress: 0.142.0

- Replace the unmaintained `openeo_processes` dependency with a minimal, numpy-only in-tree port
(`openeo_driver.vendor.processes_python`, adapted from openeo-processes-python 0.0.4)
covering only the processes used by the driver. Related to #152.

- Require at least Python 3.11 (drop support for Python 3.8, 3.9 and 3.10 [#370](https://github.com/Open-EO/openeo-python-driver/issues/370))
- Require at least PySTAC 1.10 ([#396](https://github.com/Open-EO/openeo-python-driver/issues/396))

Expand Down
18 changes: 9 additions & 9 deletions openeo_driver/processgraph/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from pathlib import Path
from typing import Any, Callable, List, Sequence, Union

import openeo_processes
from openeo.util import load_json
from openeo.utils.version import ComparableVersion

Expand All @@ -18,6 +17,7 @@
from openeo_driver.processes import DEFAULT_NAMESPACE, ProcessArgs, ProcessRegistry, ProcessSpec
from openeo_driver.specs import SPECS_ROOT
from openeo_driver.utils import EvalEnv
from openeo_driver.vendor import processes_python
from openeo_driver.views import OPENEO_API_VERSION_DEFAULT

_log = logging.getLogger(__name__)
Expand Down Expand Up @@ -60,14 +60,15 @@ def wrapped(args: ProcessArgs, env: EvalEnv):

return wrapped

for pid in set(process_ids):
if openeo_processes.has_process(pid):
proc = openeo_processes.get_process(pid)
wrapped = wrap(proc)
spec = process_registry.load_predefined_spec(pid)
process_registry.add_process(name=pid, function=wrapped, spec=spec)
elif pid in _openeo_processes_extra:
for pid in dict.fromkeys(process_ids):
if pid in _openeo_processes_extra:
Comment thread
jdries marked this conversation as resolved.
Resolved
proc = _openeo_processes_extra[pid]
elif processes_python.has_process(pid):
proc = processes_python.get_process(pid)
else:
proc = None

if proc is not None:
wrapped = wrap(proc)
spec = process_registry.load_predefined_spec(pid)
process_registry.add_process(name=pid, function=wrapped, spec=spec)
Expand Down Expand Up @@ -132,7 +133,6 @@ def wrapped(args: ProcessArgs, env: EvalEnv):
"log",
"ceil",
"floor",
"int",
Comment thread
jdries marked this conversation as resolved.
Resolved
"round",
"arccos",
"arcosh",
Expand Down
Empty file.
22 changes: 22 additions & 0 deletions openeo_driver/vendor/processes_python/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
Comment thread
jdries marked this conversation as resolved.
Resolved
Minimal, numpy-only implementation of a selection of openEO processes.

Adapted from the (unmaintained) `openeo-processes-python` project, release 0.0.4.
Importing this package registers the implementations; use `get_process`/`has_process`
to look them up by openEO process id (e.g. "and", "add", "array_element").
For backwards compatibility with `openeo_processes`, the functions are also available
as attributes with their Python names (e.g. `and_`, `not_`, `add`).
"""

from openeo_driver.vendor.processes_python.utils import ( # noqa: F401
get_process,
has_process,
process,
eval_datatype,
isnull,
)
from openeo_driver.vendor.processes_python.logic import * # noqa: F401,F403
from openeo_driver.vendor.processes_python.arrays import * # noqa: F401,F403
from openeo_driver.vendor.processes_python.comparison import * # noqa: F401,F403
from openeo_driver.vendor.processes_python.math import * # noqa: F401,F403

Loading
Loading