Skip to content

Commit

Permalink
Update to ProcessGraphVisitor API change (namespace support)
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Mar 4, 2021
1 parent 6d5cdbc commit 75deacd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions openeogeotrellis/geotrellis_tile_processgraph_visitor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import numbers
from collections import OrderedDict
from typing import Union

from openeo.internal.process_graph_visitor import ProcessGraphVisitor

Expand All @@ -14,12 +15,14 @@ def __init__(self):
#process list to keep track of processes, so this class has a double function
self.processes = OrderedDict()

def enterProcess(self, process_id: str, arguments: dict):
def enterProcess(self, process_id: str, arguments: dict, namespace: Union[str, None]):
self.builder.expressionStart(process_id, arguments)
# TODO: store/use namespace?
self.processes[process_id] = arguments
return self

def leaveProcess(self, process_id: str, arguments: dict):
def leaveProcess(self, process_id: str, arguments: dict, namespace: Union[str, None]):
# TODO: store/use namespace?
self.builder.expressionEnd(process_id, arguments)
return self

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
setup_requires=['pytest-runner'],
tests_require=tests_require,
install_requires=[
'openeo>=0.4.8a2.*',
'openeo>=0.5.0a1.*',
'openeo_driver>=0.7.0a1.*',
'openeo_udf>=1.0.0rc3',
'pyspark==3.0.1; python_version>="3.8"',
Expand Down

0 comments on commit 75deacd

Please sign in to comment.