<div dir="ltr">Hi Luis, <div><br></div><div>Isn't there a risk for different Process instances to share the same Input instances ? It seems to me that that could lead to weird behavior. </div><div><br></div><div>Cheers, </div><div><br>David</div></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Apr 14, 2018 at 2:18 PM Luí­s Moreira de Sousa <<a href="mailto:luis.de.sousa@protonmail.ch">luis.de.sousa@protonmail.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi David,<br></div><div><br></div><div>I have done this in the past, pretty much as you say, by promoting the inputs and outputs objects to class properties. Other elements like title, abstract, etc, can be treated in the same way. This would all go into an "abstract" class from which actual process inherited. Perhaps there might be more elegant solutions, but to me this setting served well (I am a man of simple tastes).<br></div><div><br></div><div>All that said, it could make sense defining inputs, outputs, etc as class properties in the Process class itself. Something to think about.</div><div><br></div><div>Happy coding. Cheers.</div><div><br></div><div class="m_-2203781666092854549protonmail_signature_block"><div class="m_-2203781666092854549protonmail_signature_block-user"><div>-- <br></div><div>Luís Moreira de Sousa<br></div><div>Bowlespark 8<br></div><div>6701 DN Wageningen<br></div><div>The Netherlands<br></div><div>Phone: +31 628 544 755<br></div><div>Email: <a href="mailto:luis.de.sousa@protonmail.ch" target="_blank">luis.de.sousa@protonmail.ch</a><br></div><div>RingID: ring:7ca91d83f4f9dec82fec9f1144b8e5c1ef2a110c<br></div><div>URL: <a href="https://ldesousa.github.io" target="_blank">https://ldesousa.github.io</a><br></div></div><div><br></div><div class="m_-2203781666092854549protonmail_signature_block-proton">Sent with <a href="https://protonmail.com" target="_blank">ProtonMail</a> Secure Email.<br></div></div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On April 11, 2018 11:51 PM, David Huard <<a href="mailto:huard.david@ouranos.ca" target="_blank">huard.david@ouranos.ca</a>> wrote:<br></div><div> <br></div><blockquote type="cite" class="m_-2203781666092854549protonmail_quote"><div dir="ltr"><div>Hi all, <br></div><div><br></div><div>I often find myself in situations where it would be useful to subclass a Process and avoid copy-pasting shared inputs and outputs. The way most processes are written does not lend itself well to this, inputs being instance objects rather than class objects. I was wondering if any of you had experience with an elegant way to subclass pywps processes that is readable and does not pollute the class namespace too much. <br></div><div><br></div><div>Thanks, <br></div><div><br></div><div>david<br></div></div></blockquote><div><br></div>_______________________________________________<br>
pywps-dev mailing list<br>
<a href="mailto:pywps-dev@lists.osgeo.org" target="_blank">pywps-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pywps-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/pywps-dev</a></blockquote></div>