diff --git a/src/openeo_grass_gis_driver/actinia_processing/aggregate_spatial_process.py b/src/openeo_grass_gis_driver/actinia_processing/aggregate_spatial_process.py index 30f6d55c..6fb3e3cb 100644 --- a/src/openeo_grass_gis_driver/actinia_processing/aggregate_spatial_process.py +++ b/src/openeo_grass_gis_driver/actinia_processing/aggregate_spatial_process.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from random import randint import json from openeo_grass_gis_driver.models.process_graph_schemas import \ @@ -93,6 +94,7 @@ def create_process_description(): "data": p_data, "geometries": p_geometries, "reducer": p_reducer, + "target_dimension": p_target_dimension, "context": p_context}, returns=rv, examples=examples) @@ -185,6 +187,7 @@ def create_process_chain_entry(input_object: DataObject, geometries: str): pc.append(importer) pc.append(g_region_1) pc.append(g_region_2) + pc.append(v_to_rast_1) pc.append(r_mask_1) pc.append(t_rast_univar) pc.append(r_mask_2) @@ -216,8 +219,8 @@ def get_process_list(node: Node): raise Exception( "The vector geometries are missing in the process description") - reducer = node.arguments["reducer"] - # TODO: parse the reducer + # TODO: support a reducer + # reducer = node.arguments["reducer"] pc = create_process_chain_entry(input_object=input_object, geometries=geometries) diff --git a/src/openeo_grass_gis_driver/actinia_processing/filter_spatial_process.py b/src/openeo_grass_gis_driver/actinia_processing/filter_spatial_process.py index 26299238..048d15f0 100644 --- a/src/openeo_grass_gis_driver/actinia_processing/filter_spatial_process.py +++ b/src/openeo_grass_gis_driver/actinia_processing/filter_spatial_process.py @@ -136,12 +136,12 @@ def get_process_list(node: Node): PROCESS_NAME) input_objects = node.get_parent_by_name(parent_name="data").output_objects - vector_objects = node.arguments["polygons"] + vector_object = node.arguments["polygons"] if not input_objects: raise Exception("Process %s requires an input strds" % PROCESS_NAME) - if not vector_objects: + if not vector_object: raise Exception("Process %s requires an input vector" % PROCESS_NAME) input_object = list(input_objects)[-1] diff --git a/src/openeo_grass_gis_driver/actinia_processing/mask_polygon_process.py b/src/openeo_grass_gis_driver/actinia_processing/mask_polygon_process.py index 97a1f174..b949b0ae 100644 --- a/src/openeo_grass_gis_driver/actinia_processing/mask_polygon_process.py +++ b/src/openeo_grass_gis_driver/actinia_processing/mask_polygon_process.py @@ -93,7 +93,7 @@ def create_process_description(): def create_process_chain_entry(input_object: DataObject, vector_object, - inside, output_object: DataObject): + mask_value, inside, output_object: DataObject): """Create a Actinia command of the process chain :param input_object: @@ -199,7 +199,7 @@ def get_process_list(node: Node): inside = True input_objects = node.get_parent_by_name(parent_name="data").output_objects - vector_objects = node.arguments["mask"] + vector_object = node.arguments["mask"] if not input_objects: raise Exception("Process %s requires an input strds" % PROCESS_NAME) @@ -212,7 +212,7 @@ def get_process_list(node: Node): output_objects.append(output_object) pc = create_process_chain_entry( - input_object, vector_object, inside, output_object) + input_object, vector_object, mask_value, inside, output_object) process_list.extend(pc) return output_objects, process_list diff --git a/src/openeo_grass_gis_driver/jobs_job_id.py b/src/openeo_grass_gis_driver/jobs_job_id.py index 367849e0..d9c83124 100644 --- a/src/openeo_grass_gis_driver/jobs_job_id.py +++ b/src/openeo_grass_gis_driver/jobs_job_id.py @@ -10,6 +10,7 @@ from openeo_grass_gis_driver.process_graph_db import GraphDB from openeo_grass_gis_driver.job_db import JobDB from openeo_grass_gis_driver.models.error_schemas import ErrorSchema +from openeo_grass_gis_driver.models.job_schemas import JobInformation from openeo_grass_gis_driver.jobs import check_job from openeo_grass_gis_driver.authentication import ResourceBase diff --git a/src/openeo_grass_gis_driver/models/service_schemas.py b/src/openeo_grass_gis_driver/models/service_schemas.py index db73a224..2f918d03 100644 --- a/src/openeo_grass_gis_driver/models/service_schemas.py +++ b/src/openeo_grass_gis_driver/models/service_schemas.py @@ -1,10 +1,14 @@ # -*- coding: utf-8 -*- """This file includes all required openEO response schemas """ +import re +from datetime import datetime +from flask import make_response from typing import Dict from openeo_grass_gis_driver.models.schema_base import JsonableObject from openeo_grass_gis_driver.models.process_graph_schemas import \ ProcessGraphNode +from openeo_grass_gis_driver.models.error_schemas import ErrorSchema __author__ = "Anika Bettge" __copyright__ = "Copyright 2018, mundialis" diff --git a/tests/test_process_graph_validation.py b/tests/test_process_graph_validation.py index 273c99b6..b3a5564e 100644 --- a/tests/test_process_graph_validation.py +++ b/tests/test_process_graph_validation.py @@ -74,46 +74,6 @@ def test_6_graph_actiniamodule(self): headers=self.auth) self.assertEqual(response.status_code, 200) - def no_support_test_6_graph_zonal_statistics(self): - """Run the validation test - """ - response = self.app.post( - '/validation', - data=json.dumps(ZONAL_STATISTICS), - content_type="application/json", - headers=self.auth) - self.assertEqual(response.status_code, 200) - - def no_support_test_9_graph_raster_export(self): - """Run the validation test - """ - response = self.app.post( - '/validation', - data=json.dumps(RASTER_EXPORT), - content_type="application/json", - headers=self.auth) - self.assertEqual(response.status_code, 200) - - def no_support_test_10_graph_map_algebra(self): - """Run the validation test - """ - response = self.app.post( - '/validation', - data=json.dumps(MAP_ALGEBRA), - content_type="application/json", - headers=self.auth) - self.assertEqual(response.status_code, 200) - - def no_support_test_11_graph_temporal_algebra(self): - """Run the validation test - """ - response = self.app.post( - '/validation', - data=json.dumps(TEMPORAL_ALGEBRA), - content_type="application/json", - headers=self.auth) - self.assertEqual(response.status_code, 200) - if __name__ == "__main__": unittest.main()