[Pywps-dev] Should we split the Input class?

Jachym Cepicky jachym.cepicky at gmail.com
Sun Jul 23 14:12:57 PDT 2017


Hi,

just noting: this is, where the processes is deep-copied
https://github.com/geopython/pywps/blob/develop/pywps/app/Service.py#L290

This is example of how process inputs are "cloned", when created instances
while parsing
https://github.com/geopython/pywps/blob/develop/pywps/app/Service.py#L478

And here is the deepcopy of the input example
https://github.com/geopython/pywps/blob/develop/pywps/inout/inputs.py#L115

What we need to achieve:

1 - input/output declaration
2 - describe process, capabilities
3 -  execute:
3a - request parsing,
3b - creating inputs/outputs for job to-be-executed,
3c - output xml-encoding,
3d - execute xml ecoding with lineage=true,
3e - process queuing

today's implementation uses result of the declaration for 2 and deepcopy
for 3, with methods being used for 3a-3e

no strong opinion about this - it might be confusing, but everything is on
place now

there is surely some  more engineering way, how to achieve this.

I have no idea, how it would be made easier for the user - now, only one
class is used. Would you have some code example please?

J

so 22. 7. 2017 v 18:36 odesílatel Jorge Mendes de Jesus <
jorge.dejesus at geocat.net> napsal:

> Hi to all
>
> I never took a deep look at the code but what you say makes total sense to
> me.
>
>
>
> On 22 Jul 2017 17:26, "Luí­s Moreira de Sousa" <
> luis.de.sousa at protonmail.ch> wrote:
>
> We have a bit of a mess with the Input class concept. It is firstly
> instantiated in the Process implementation (by the user). Then it is deep
> copied to support the actual inputs at run time.
>
> It seems we are bundling two concepts together:
> . InputDeclaration - that describes the input name, type, abstract, etc.
> . PhysicalInput - that holds the actual data (or path to data) after an
> Execute request is parsed
>
> By associating the InputDeclaration class to the Process class and
> PhysicalInput to the Request class we can avoid the deep copy. And make the
> code more clear.
>
> Please discuss. Cheers.
>
> P.S.: this is also true for outputs, but there it is not as critical.
>
> --
> Luís Moreira de Sousa
> Im Grund 6
> CH-8600 Dübendorf
> Switzerland
>
> Phone: +41 (0)79 812 62 65 <+41%2079%20812%2062%2065>
> Email: luis.de.sousa at protonmail.ch
> URL: https://sites.google.com/site/luismoreiradesousa
>
>
>
> _______________________________________________
> pywps-dev mailing list
> pywps-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pywps-dev
>
>
> _______________________________________________
> pywps-dev mailing list
> pywps-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/pywps-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pywps-dev/attachments/20170723/867df94f/attachment.html>


More information about the pywps-dev mailing list