You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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 :
[...]
<DataInputs>
<InputminOccurs="0"maxOccurs="100">
<ows:Identifier>dataset</ows:Identifier>
<ows:Title>Dataset</ows:Title>
<ows:Abstract>Enter a URL pointing to a NetCDF file (optional)</ows:Abstract>
<ComplexData>
<Default>
<Format>
<MimeType>application/x-netcdf</MimeType>
</Format>
</Default>
<Supported>
<Format>
<MimeType>application/x-netcdf</MimeType>
</Format>
</Supported>
</ComplexData>
</Input>
<InputminOccurs="0"maxOccurs="100">
<ows:Identifier>dataset_opendap</ows:Identifier>
<ows:Title>Remote OpenDAP Data URL</ows:Title>
<ows:Abstract>Or provide a remote OpenDAP data URL, for example: http://my.opendap/thredds/dodsC/path/to/file.nc</ows:Abstract>
<ows:Metadataxlink:href="https://www.iana.org/assignments/media-types/media-types.xhtml"xlink:title="application/x-ogc-dods"xlink:type="simple"/>
<LiteralData>
<ows:DataTypeows:reference="urn:ogc:def:dataType:OGC:1.1:string">string</ows:DataType>
<ows:AnyValue/>
</LiteralData>
</Input>
</DataInputs>
[...]
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 following request.inputs:
I'm trying to understand why the dataset input even gets generated in request.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"]
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
The text was updated successfully, but these errors were encountered: