DHI-GRAS / qgis-processing-workflow

Plugin for QGIS Processing for creating processing workflows - private development version
GNU General Public License v3.0
5 stars 1 forks source link

Remove WOIS prefix #11

Closed ctottrup closed 5 years ago

ctottrup commented 6 years ago

When creating new workflows they all feature with a WOIS prefix, which should be removed: capture

j08lue commented 6 years ago

Good you raise this. I have looked through the repo already (https://github.com/DHI-GRAS/processing_workflow/search?utf8=%E2%9C%93&q=wois&type=) but there is nowhere the code mentions "WOIS", only the docstrings do.

@radosuav, do you have an idea where the logo and "WOIS Workflow" might come from?

radosuav commented 6 years ago

It's here.

It should be replaced by

self.provider.name

Then the string (and the icon) will come from the collection.conf file (see WorkflowCollection class).

j08lue commented 6 years ago

Thanks a bunch, @radosuav, I guess the GitHub search failed quite bad here...

I implemented that change in #12, so the window title for a new workflow went from

image

to

image

I don't know how logo and provider name are set in the case of WOIS or GWA or other providers. (What are providers, anyways?) But I will figure that out eventually. 😄 I guess this works fine, so I'll merge now.

radosuav commented 6 years ago

Providers provide algorithms ;) Basically each Processing provider has a set of algorithms under its own tree in the Processing Toolbox (PT) and sets up an interface between the algorithms' GUI visible in QGIS and the algorithm implementation in an outside software or library (e.g. GDAL or SNAP).

Workflows are treated as algorithms by the PT, even though they are composed of other PT algorithms (similarly to Processing models). In order to allow for customization of the workflow libraries (e.g. WOIS Workflow library), the workflows can be grouped into collections. Each collection is just a directory with a bunch of workflow files and collections.conf file which holds information about the logo, name and description of the collection. When the Workflows plugin is initialized it goes through all the collection directories and sets each one of them up as a separate algorithm provider. That way the collections can have individual trees in the Processing Toolbox (with separate logos and names), can be switched on and off individually, etc.

For a bit of an overview of the Processing architecture have a look at this paper. In QGIS 3 some of the details might have changed but the overall architecture should be similar.

Hope that makes sense :)