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
It happens quite often that we have a set of processes with common input (and output) parameters. In WPS the process signature (inputs+outputs) is called a profile (I think). To avoid copy+paste of this process parameters one could use Python decorators or mixin classes to define a commonly used profile which can be adapted by each individual process.
I like the mixins, but my concern is that relatively few developers will be familiar with this. In other words, it might look a bit too much like magic.
What I've started doing is simply create a module with all the common inputs and outputs used throughout the different WPS processes (wpsio.py). For a given Process definition, I then just import wpsio and refer to the objects in the inputs and outputs fields of the Process.init. See https://github.com/Ouranosinc/raven/blob/master/raven/processes/wps_regionalisation.py for an example.
Description
It happens quite often that we have a set of processes with common input (and output) parameters. In WPS the process signature (inputs+outputs) is called a profile (I think). To avoid copy+paste of this process parameters one could use Python decorators or mixin classes to define a commonly used profile which can be adapted by each individual process.
Here are some examples how it could look like:
Environment
Steps to Reproduce
Additional Information
The text was updated successfully, but these errors were encountered: