Deltares / Ribasim

Water resources modeling
https://deltares.github.io/Ribasim/
MIT License
36 stars 5 forks source link

Test QGIS plugin #320

Open Hofer-Julian opened 1 year ago

Hofer-Julian commented 1 year ago

We have an ever-growing of QGIS issues, and we typically notice them weeks after it broke in the code. The data loading was broken for three months and nobody noticed: https://github.com/Deltares/Ribasim/issues/291 That is because we don't have any kind of automatic tests for the QGIS plugin at the moment. This is not only the case because it was never prioritized, but also because it is exceptionally hard to do. This is the case because of two reasons:

To elaborate on the second point: We don't ship QGIS with our plugin, but expect users to install the plugin on top of their existing QGIS application. This means that we are confined by QGIS' API, making testing (and many other things) much harder.

I think this issue needs further discussion, mostly because it is unclear to me if the QGIS plugin is valuable enough to justify that kind of investment. https://github.com/Deltares/Ribasim/issues/321

Hofer-Julian commented 1 year ago

This is how the iMOD QGIS plugin tests its functionality: https://github.com/Deltares/imod-qgis/blob/main/.github/workflows/tests.yml

Huite commented 1 year ago

I think this issue needs further discussion, mostly because it is unclear to me if the QGIS plugin is valuable enough to justify that kind of investment. https://github.com/Deltares/Ribasim/issues/321

It's worth noting that we have multiple QGIS plugins (iMOD-QGIS, QGIS-Tim, Ribasim), and the picture painted above is more or less true for all. Joeri has done some figuring out for iMOD-QGIS but it needs more work. So any investment into figuring things out (which to be honest doesn't look that complicated; EDIT: with this I mean actually writing the tests, not the docker stuff...) should be combined so all plugins can benefit.

There is a good amount of logic that isn't Qt/GUI related. Writing the tests for these parts isn't especially hard (after you have a QGIS interpreter installed and running, that is...).

evetion commented 3 days ago

Let's test whether it works now (with QGIS bugs fixed)