diff --git a/docs/source/index.rst b/docs/source/index.rst index aed6750..4ed46dd 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -7,7 +7,6 @@ installation configuration dev_guide - processes authors changes diff --git a/docs/source/processes.rst b/docs/source/processes.rst deleted file mode 100644 index 8c58a4b..0000000 --- a/docs/source/processes.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. _processes: - -Processes -========= - -.. contents:: - :local: - :depth: 1 - -Say Hello ---------- - -.. autoprocess:: parrot.processes.wps_say_hello.SayHello - :docstring: - :skiplines: 1 diff --git a/parrot/processes/__init__.py b/parrot/processes/__init__.py index 7a2dd77..ce30a3d 100644 --- a/parrot/processes/__init__.py +++ b/parrot/processes/__init__.py @@ -1,7 +1,5 @@ -from .wps_say_hello import SayHello from .wps_dashboard import Dashboard processes = [ - SayHello(), Dashboard(), ] diff --git a/parrot/processes/wps_say_hello.py b/parrot/processes/wps_say_hello.py deleted file mode 100644 index 2d67782..0000000 --- a/parrot/processes/wps_say_hello.py +++ /dev/null @@ -1,47 +0,0 @@ -from pywps import Process, LiteralInput, LiteralOutput, UOM -from pywps.app.Common import Metadata - -import logging -LOGGER = logging.getLogger("PYWPS") - - -class SayHello(Process): - """A nice process saying 'hello'.""" - def __init__(self): - inputs = [ - LiteralInput('name', 'Your name', - abstract='Please enter your name.', - keywords=['name', 'firstname'], - data_type='string')] - outputs = [ - LiteralOutput('output', 'Output response', - abstract='A friendly Hello from us.', - keywords=['output', 'result', 'response'], - data_type='string')] - - super(SayHello, self).__init__( - self._handler, - identifier='hello', - title='Say Hello', - abstract='Just says a friendly Hello.' - 'Returns a literal string output with Hello plus the inputed name.', - keywords=['hello', 'demo'], - metadata=[ - Metadata('PyWPS', 'https://pywps.org/'), - Metadata('Birdhouse', 'http://bird-house.github.io/'), - Metadata('PyWPS Demo', 'https://pywps-demo.readthedocs.io/en/latest/'), - Metadata('Emu: PyWPS examples', 'https://emu.readthedocs.io/en/latest/'), - ], - version='1.5', - inputs=inputs, - outputs=outputs, - store_supported=True, - status_supported=True - ) - - @staticmethod - def _handler(request, response): - LOGGER.info("say hello") - response.outputs['output'].data = 'Hello ' + request.inputs['name'][0].data - response.outputs['output'].uom = UOM('unity') - return response diff --git a/parrot/query.py b/parrot/query.py index 457637e..933bb43 100644 --- a/parrot/query.py +++ b/parrot/query.py @@ -17,7 +17,7 @@ def display_json(data): def query(): query_str = """ - SELECT ?process ?dataset ?variable ?startTime ?endTime ?input ?output ?info ?histogram + SELECT ?process ?dataset ?variable ?startTime ?endTime ?input ?output ?info WHERE { ?exec rdf:type provone:Execution ; rdfs:label ?process ; @@ -25,8 +25,7 @@ def query(): clint:variable_name ?variable ; prov:startedAtTime ?startTime ; prov:endedAtTime ?endTime ; - clint:info ?info ; - clint:histogram ?histogram . + clint:info ?info . ?input rdf:type prov:Entity . @@ -54,7 +53,7 @@ def query(): # mean = row.mean.value # stddev = row.stddev.value info = json.loads(row.info.value) - histogram = row.histogram.value + # histogram = row.histogram.value entry = { "Process": process, "Dataset": dataset, @@ -67,7 +66,7 @@ def query(): # "Max": max, # "Mean": mean, # "StdDev": stddev, - "Histogram": display_image(histogram), + # "Histogram": display_image(histogram), } for key in info: entry[key] = display_json(info[key]) diff --git a/tests/test_wps_caps.py b/tests/test_wps_caps.py index e5fdac7..c8b8fbd 100644 --- a/tests/test_wps_caps.py +++ b/tests/test_wps_caps.py @@ -12,5 +12,4 @@ def test_wps_caps(): ) assert sorted(names.split()) == [ "dashboard", - "hello", ] diff --git a/tests/test_wps_hello.py b/tests/test_wps_hello.py deleted file mode 100644 index 53e7836..0000000 --- a/tests/test_wps_hello.py +++ /dev/null @@ -1,15 +0,0 @@ -from pywps import Service -from pywps.tests import client_for, assert_response_success - -from .common import get_output -from parrot.processes.wps_say_hello import SayHello - - -def test_wps_hello(): - client = client_for(Service(processes=[SayHello()])) - datainputs = "name=LovelySugarBird" - resp = client.get( - "?service=WPS&request=Execute&version=1.0.0&identifier=hello&datainputs={}".format( - datainputs)) - assert_response_success(resp) - assert get_output(resp.xml) == {'output': "Hello LovelySugarBird"}