def test_indices_description(): assert 'TG: ' in indices.indices_description()
def test_indices_description(self): nose.tools.ok_( 'TG: ' in indices.indices_description(), indices.indices_description() )
def __init__(self): WPSProcess.__init__( self, identifier="indices_simple", title="Climate indices -- Simple", version="0.9", abstract="Climate indices based on one single input variable.", metadata=[ {'title': 'Documentation', 'href': 'http://flyingpigeon.readthedocs.io/en/latest/descriptions/index.html#climate-indices'}, {"title": "ICCLIM" , "href": "http://icclim.readthedocs.io/en/latest/"}, {"title": "Simple Indices", "href": "http://flyingpigeon.readthedocs.io/en/latest/descriptions/indices.html"} ], statusSupported=True, storeSupported=True ) self.resource = self.addComplexInput( identifier="resource", title="Resouce", abstract="NetCDF File", minOccurs=1, maxOccurs=100, maxmegabites=5000, formats=[{"mimeType": "application/x-netcdf"}], ) self.groupings = self.addLiteralInput( identifier="groupings", title="Grouping", abstract="Select an time grouping (time aggregation)", default='yr', type=type(''), minOccurs=1, maxOccurs=len(GROUPING), allowedValues=GROUPING ) self.indices = self.addLiteralInput( identifier="indices", title="Index", abstract=indices_description(), default='SU', type=type(''), minOccurs=1, maxOccurs=len(indices()), allowedValues=indices() ) self.polygons = self.addLiteralInput( identifier="polygons", title="Country subset", abstract=str(countries_longname()), type=type(''), minOccurs=0, maxOccurs=len(countries()), allowedValues=countries() ) self.mosaic = self.addLiteralInput( identifier="mosaic", title="Mosaic", abstract="If Mosaic is checked, selected polygons be clipped as a mosaic for each input file", default=False, type=type(False), minOccurs=0, maxOccurs=1, ) # complex output # ------------- self.output = self.addComplexOutput( identifier="output", title="Index", abstract="Calculated index as NetCDF file", metadata=[], formats=[{"mimeType": "application/x-tar"}], asReference=True ) self.output_netcdf = self.addComplexOutput( title="one dataset as example", abstract="NetCDF file to be dispayed on WMS", formats=[{"mimeType":"application/x-netcdf"}], asReference=True, identifier="ncout", )
def __init__(self): WPSProcess.__init__( self, identifier = "indices_single", title="Calculation of climate indice (single variable)", version = "0.3", abstract="This process calculates climate indices based on one single variable.", statusSupported=True, storeSupported=True ) self.resource = self.addComplexInput( identifier="resource", title="Resouce", abstract="NetCDF File", minOccurs=1, maxOccurs=100, maxmegabites=5000, formats=[{"mimeType":"application/x-netcdf"}], ) self.groupings = self.addLiteralInput( identifier="groupings", title="Grouping", abstract="Select an time grouping (time aggregation)", default='yr', type=type(''), minOccurs=1, maxOccurs=len(GROUPING), allowedValues=GROUPING ) self.indices = self.addLiteralInput( identifier="indices", title="Indice", abstract=indices_description(), default='SU', type=type(''), minOccurs=1, maxOccurs=len(indices()), allowedValues=indices() ) self.polygons = self.addLiteralInput( identifier="polygons", title="Country subset", abstract= countries_longname(), #default='FRA', type=type(''), minOccurs=0, maxOccurs=len(countries()), allowedValues=countries() ) # complex output # ------------- self.output = self.addComplexOutput( identifier="output", title="Indice", abstract="Calculated indice as NetCDF file", metadata=[], formats=[{"mimeType":"application/x-netcdf"}], asReference=True )