How to use the pywps.app.Common.Metadata function in pywps

To help you get started, we’ve selected a few pywps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github geopython / pywps / tests / test_inout.py View on Github external
def make_literal_input(self):
        literal = inout.inputs.LiteralInput(
            identifier="complexinput",
            title='MyComplex',
            data_type='string',
            workdir=self.tmp_dir,
            abstract="some description",
            keywords=['kw1', 'kw2'],
            metadata=[Metadata("special data")],
            uoms=['metre', 'unity'],
            min_occurs=2,
            max_occurs=5,
            mode=MODE.STRICT,
            allowed_values=[AllowedValue(value='something'), AllowedValue(value='something else'), AnyValue()],
            default="something else",
            default_type=SOURCE_TYPE.DATA,
        )
        literal.data = 'something'
        literal.uom = UOM('unity')
        literal.as_reference = False
        return literal
github geopython / pywps / pywps / tests.py View on Github external
[Format('application/json'), Format('application/x-netcdf')],
                               abstract="Complex input abstract.", ),
                  BoundingBoxInput('bb_input', 'BoundingBox input title', ['EPSG:4326', ],
                                   metadata=[Metadata('EPSG.io', 'http://epsg.io/'), ]),
                  ]
        outputs = [LiteralOutput('literal_output', 'Literal output title', 'boolean', 'Boolean output abstract.',),
                   ComplexOutput('complex_output', 'Complex output', [Format('text/plain'), ], ),
                   BoundingBoxOutput('bb_output', 'BoundingBox output title', ['EPSG:4326', ])]

        super(DocExampleProcess, self).__init__(
            self._handler,
            identifier='doc_example_process_identifier',
            title="Process title",
            abstract="Multiline process abstract.",
            version="4.0",
            metadata=[Metadata('PyWPS docs', 'http://pywps.org'),
                      Metadata('NumPy docstring conventions',
                               'https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt')],
            inputs=inputs,
            outputs=outputs,
        )
github bird-house / flyingpigeon / flyingpigeon / processes / wps_sdm_csv.py View on Github external
),
            ComplexOutput('output_log', 'Logging information',
                          abstract="Collected logs during process run.",
                          as_reference=True,
                          supported_formats=[Format('text/plain')]
                          )
        ]

        super(SDMcsvProcess, self).__init__(
            self._handler,
            identifier="sdm_csv",
            title="Species distribution Model (GBIF-CSV table as input)",
            version="0.10",
            metadata=[
                Metadata("LWF", "http://www.lwf.bayern.de/"),
                Metadata(
                    "Doc",
                    "http://flyingpigeon.readthedocs.io/en/latest/descriptions/index.html#species-distribution-model"),
                Metadata("paper",
                         "http://www.hindawi.com/journals/jcli/2013/787250/"),
                Metadata("Tutorial",
                         "http://flyingpigeon.readthedocs.io/en/latest/tutorials/sdm.html"),
            ],
            abstract="Indices preparation for SDM process",
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True,
            )
github bird-house / flyingpigeon / flyingpigeon / processes / wps_sdm_allinone.py View on Github external
)
        ]

        super(SDMallinoneProcess, self).__init__(
            self._handler,
            identifier="sdm_allinone",
            title="Species distribution Model (all in one)",
            version="0.10",
            metadata=[
                Metadata("LWF", "http://www.lwf.bayern.de/"),
                Metadata(
                    "Doc",
                    "http://flyingpigeon.readthedocs.io/en/latest/descriptions/index.html#species-distribution-model"),
                Metadata("paper",
                         "http://www.hindawi.com/journals/jcli/2013/787250/"),
                Metadata("Tutorial",
                         "http://flyingpigeon.readthedocs.io/en/latest/tutorials/sdm.html"),
            ],
            abstract="Indices preparation for SDM process",
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True,
        )
github bird-house / flyingpigeon / flyingpigeon / processes / wps_segetalflora.py View on Github external
ComplexOutput('output_log', 'Logging information',
                          abstract="Collected logs during process run.",
                          as_reference=True,
                          supported_formats=[Format('text/plain')]
                          ),
        ]

        super(SegetalfloraProcess, self).__init__(
            self._handler,
            identifier="segetalflora",
            title="Segetal Flora",
            abstract="Species biodiversity of segetal flora. ",
            version="0.10",
            metadata=[
                Metadata('LSCE', 'http://www.lsce.ipsl.fr/en/index.php'),
                Metadata('Doc', 'http://flyingpigeon.readthedocs.io/en/latest/'),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True,
        )
github bird-house / flyingpigeon / flyingpigeon / processes / wps_plot_timeseries.py View on Github external
),

            ComplexOutput("plotout_uncertainty", "Visualisation Uncertainty plot",
                          abstract="Visualisation of single variables ensemble mean with uncertainty",
                          supported_formats=[Format("image/png")],
                          as_reference=True,
                          )
        ]

        super(PlottimeseriesProcess, self).__init__(
            self._handler,
            identifier="plot_timeseries",
            title="Graphics (timeseries)",
            version="0.10",
            metadata=[
                Metadata('Doc', 'http://flyingpigeon.readthedocs.io/en/latest/'),
            ],
            abstract="Outputs some timeseries of the file field means. Spaghetti and uncertainty plot",
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True,
        )
github geopython / pywps / pywps / inout / outputs.py View on Github external
def from_json(cls, json_output):
        instance = cls(
            identifier=json_output['identifier'],
            title=json_output.get('title'),
            abstract=json_output.get('abstract'),
            keywords=json_output.get('keywords', []),
            workdir=json_output.get('workdir'),
            metadata=[Metadata.from_json(data) for data in json_output.get('metadata', [])],
            data_format=Format(
                schema=json_output['data_format'].get('schema'),
                extension=json_output['data_format'].get('extension'),
                mime_type=json_output['data_format']['mime_type'],
                encoding=json_output['data_format'].get('encoding')
            ),
            supported_formats=[
                Format(
                    schema=infrmt.get('schema'),
                    extension=infrmt.get('extension'),
                    mime_type=infrmt['mime_type'],
                    encoding=infrmt.get('encoding')
                ) for infrmt in json_output['supported_formats']
            ],
            mode=json_output.get('mode', MODE.NONE)
        )
github bird-house / flyingpigeon / flyingpigeon / processes / wps_ocgis_func.py View on Github external
register.register_icclim(fr)
icclim_classes = [k for k in fr.keys() if isinstance(k, str) and k.startswith('icclim')]


class IndicatorProcess(Process, object):
    """A Process class wrapping OCGIS functions."""
    key = 'to_be_subclassed'
    version = '1.0'

    #################
    # Common inputs #
    #################
    resource_inputs = [
        ComplexInput('resource', 'Resource',
                     abstract='NetCDF Files or archive (tar/zip) containing netCDF files.',
                     metadata=[Metadata('Info')],
                     min_occurs=1,
                     max_occurs=1000,
                     supported_formats=[
                         Format('application/x-netcdf'),
                         Format('application/x-tar'),
                         Format('application/zip'),
                     ]), ]

    option_inputs = [
        LiteralInput("grouping", "Grouping",
                     abstract="Temporal group over which the index is computed.",
                     default='yr',
                     data_type='string',
                     min_occurs=0,
                     max_occurs=1,  # len(GROUPING),
                     allowed_values=GROUPING
github bird-house / flyingpigeon / flyingpigeon / processes / wps_weatherregimes_reanalyse.py View on Github external
ComplexOutput('output_log', 'Logging information',
                          abstract="Collected logs during process run.",
                          as_reference=True,
                          supported_formats=[Format('text/plain')]
                          ),
        ]

        super(WeatherregimesreanalyseProcess, self).__init__(
            self._handler,
            identifier="weatherregimes_reanalyse",
            title="Weather Regimes (based on reanalyses data)",
            abstract='k-mean cluster analyse of the pressure patterns. Clusters are equivalent to weather regimes',
            version="0.10",
            metadata=[
                Metadata('LSCE', 'http://www.lsce.ipsl.fr/en/index.php'),
                Metadata('Doc', 'http://flyingpigeon.readthedocs.io/en/latest/'),
            ],
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True,
        )
github bird-house / flyingpigeon / flyingpigeon / processes / wps_sdm_csv.py View on Github external
as_reference=True,
                          ),
            ComplexOutput('output_log', 'Logging information',
                          abstract="Collected logs during process run.",
                          as_reference=True,
                          supported_formats=[Format('text/plain')]
                          )
        ]

        super(SDMcsvProcess, self).__init__(
            self._handler,
            identifier="sdm_csv",
            title="Species distribution Model (GBIF-CSV table as input)",
            version="0.10",
            metadata=[
                Metadata("LWF", "http://www.lwf.bayern.de/"),
                Metadata(
                    "Doc",
                    "http://flyingpigeon.readthedocs.io/en/latest/descriptions/index.html#species-distribution-model"),
                Metadata("paper",
                         "http://www.hindawi.com/journals/jcli/2013/787250/"),
                Metadata("Tutorial",
                         "http://flyingpigeon.readthedocs.io/en/latest/tutorials/sdm.html"),
            ],
            abstract="Indices preparation for SDM process",
            inputs=inputs,
            outputs=outputs,
            status_supported=True,
            store_supported=True,
            )