Open fmigneault opened 3 years ago
More detail...
Input dataset
gets generated here:
https://github.com/geopython/pywps/blob/793ab34bc9aab976243b8a7252e64429c6e65f4f/pywps/app/Service.py#L115-L120
At that point, following values are defined:
request_inputs = None
inpt._default = {'mimeType': 'application/x-netcdf', 'encoding': None, 'schema': None, 'maximumMegabytes': None, 'default': True}
inpt._default_type = SOURCE_TYPE.DATA
inpt.data_set = False
The method parameter wps_request.inputs
contains the following:
[
{
'identifier': 'dataset_opendap',
'data': 'http://localhost8001/ows/proxy/thredds/dodsC/birdhouse/testdata/ta_Amon_MRI-CGCM3_decadal1980_r1i1p1_199101-200012.nc',
'uom': '',
'datatype': ''
}
]
It looks like the inpt._set_default_value()
should not get called in this case, because it is not a default value
that eventually gets set, but a default format definition.
Description
@cehbrecht @tomkralidis @jachym I would like to better understand the procedure of handling inputs (how they get generated) for the following specific use case.
Given a process that has the following inputs definition :
When I submit an execution with only input
dataset_opendap
provided with some URL string, the_handler(self, request, response)
method of the process that ends up being called contains the followingrequest.inputs
:My execution XML does not contain
dataset
, so it gets generated somehow by default following parsing.I'm trying to understand why the
dataset
input even gets generated inrequest.inputs
following parsing since it is omitted completely from the request. This input is causing me problems, because I need to do some post-processing to convert PyWPS inputs into my package definitions.Is there some way that I need to employ to detect omitted inputs to discard them explicitly vs real inputs with submitted data? Is there some flag that I would guarantee me that this input is only the default definition and does not contain any actual data?
I cannot rely on
data
field to detect omitted inputs because it gets filled by the "default format"application/x-netcdf
, which could be submitted real data contents:The only (very hackish/unreliable) field I could use to detect inputs to drop is
file
which contains a reference to{workdir}/input
instead of{workdir}/input_{uuid}
. Any better guidance would be greatly appreciated.Expand this to see full details contents of
requests.inputs["dataset"]
Environment
gunicorn
withPyramid
WebApp that nests PyWPS's serviceSteps to Reproduce
Using this process: https://github.com/bird-house/hummingbird/blob/master/hummingbird/processes/wps_ncdump.py
It is executed indirectly by Weaver using this definition: https://github.com/crim-ca/weaver/blob/4.1.0/weaver/processes/wps_package.py#L758