Skip to content

Commit

Permalink
fix bad constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
jdries committed Jan 25, 2024
1 parent 654c657 commit c7c2465
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openeogeotrellis/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ def accept_process_graph(cls, process_graph, default_input_parameter = None, def
if len(process_graph) == 1 and next(iter(process_graph.values())).get('process_id') == 'run_udf':
return SingleNodeUDFProcessGraphVisitor().accept_process_graph(process_graph)

return GeotrellisTileProcessGraphVisitor().accept_process_graph(process_graph)
return GeotrellisTileProcessGraphVisitor.create(default_input_parameter=default_input_parameter,default_input_datatype=default_input_datatype).accept_process_graph(process_graph)

def summarize_exception(self, error: Exception) -> Union[ErrorSummary, Exception]:
return self.summarize_exception_static(error, 2000)
Expand Down
5 changes: 3 additions & 2 deletions openeogeotrellis/processgraphvisiting.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ def __init__(self, _builder=None):
# process list to keep track of processes, so this class has a double function
self.processes = OrderedDict()

def __init__(self, default_input_parameter = None, default_input_datatype=None):
@classmethod
def create(cls, default_input_parameter = None, default_input_datatype=None):
builder = get_jvm().org.openeo.geotrellis.OpenEOProcessScriptBuilder()
if default_input_datatype is not None:
builder.setInputDataType(default_input_datatype)
#if default_input_parameter is not None:
# getattr(builder, "defaultDataParameterName_$eq")(default_input_parameter)
self.__init__(builder)
return cls(_builder=builder)

def enterProcess(self, process_id: str, arguments: dict, namespace: Union[str, None]):
self.builder.expressionStart(process_id, arguments)
Expand Down

0 comments on commit c7c2465

Please sign in to comment.