qgis / QGIS-Enhancement-Proposals

QEP's (QGIS Enhancement Proposals) are used in the process of creating and discussing new enhancements for QGIS
118 stars 37 forks source link

QGIS 3.0: Break compatibility with 2.x processing models #95

Closed nyalldawson closed 4 years ago

nyalldawson commented 7 years ago

QGIS Enhancement: Break compatibility with 2.x processing models

Date 2017/06/12

Author Nyall Dawson @nyalldawson

Contact nyall dot dawson at gmail dot com

maintainer @volaya @alexbruy

Version QGIS 3.0

Summary

Currently, processing is being heavily reworked for 3.0 with the port of numerous core processing functions across to c++ classes. Additionally, numerous algorithms have been heavily reworked for 3.0.

This QEP proposes to drop compatibility with processing 2.x models. The rationale here is:

Proposed Solution

Break compatibility with existing 2.x models, and note this in the release notes. Clean up the existing algorithms and have a nice clean, logical base of algorithms for 3.x.

Backwards Compatibility

This QEP explicitly BREAKS backwards compatibility ;)

Votes

(required)

alexbruy commented 7 years ago

+1 from me

3nids commented 7 years ago

Can you provide some thoughts about an automatic migration (porting projects)? i.e. why it is not feasible? / is this too complicated with respect to the impact? missing funding? etc.

pcav commented 7 years ago

+1

ghtmtt commented 7 years ago

What about having some pop-up informing the user that the model won't work because of the algorithm X? So maybe it could be easier for the users to find the other algorithms and change them with the new ones

nirvn commented 7 years ago

@nyalldawson , +1

mbernasocchi commented 7 years ago

+1

mach0 commented 7 years ago

cleaner solutions are always better +1

nyalldawson commented 7 years ago

@3nids Can you provide some thoughts about an automatic migration (porting projects)? i.e. why it is not feasible? / is this too complicated with respect to the impact? missing funding? etc.

processing 2.x used json.dumps/json.loads to serialize models - this makes things very tricky, because the corresponding classes don't exist anymore, using json.loads to restore 2.x models won't work. At the same time, the json structure could lend itself to a separate "upgrading" script which just reads the json as a dict and then attempts to recreate a new model by matching the old algorithms across to new processing algs. It's not straightforward though.

Another issue with the current set of algorithms is the inconsistency in parameter naming. We use a bunch of different names for the same parameter - 'INPUT'/'INPUT_LAYER', 'OUTPUT'/'OUTPUT_LAYER', etc. This makes for confusing use. E.g.

processing.run("qgis:densifygeometries", {'INPUT':'some_layer,'VERTICES':12,'OUTPUT':'a.shp'})

vs

processing.run("qgis:boundary", {'INPUT_LAYER':'some_layer,'OUTPUT_LAYER':'a.shp'})

I'd like to standardise these, but that will further break 2.x model compatibility.

3nids commented 7 years ago

Thanks for the detailed explanation. A wholeheartedly 👍

nyalldawson commented 7 years ago

@NathanW2 can we lock this as accepted? There's been a wide approval from devs and non-devs alike here.

NathanW2 commented 7 years ago

Yes good with me. Generally it would be good to support translation but I can see that is super hard at the moment.

On Wed, 21 Jun 2017, 3:20 PM Nyall Dawson notifications@github.com wrote:

@NathanW2 https://github.com/nathanw2 can we lock this as accepted? There's been a wide approval from devs and non-devs alike here.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/qgis/QGIS-Enhancement-Proposals/issues/95#issuecomment-309966357, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXS3HAzre_QUlPUjjZrKbrtTiHiuch8ks5sGKgzgaJpZM4N2zr2 .

pcav commented 7 years ago

Good for me. Non standardized output names bothered me a lot in the past. Thanks.