qgis / QGIS-Django

Django project for QGIS related activities such as plugin repository
http://qgis.org
GNU General Public License v2.0
86 stars 59 forks source link

Show plugins with patch versions in plugin list #325

Closed Xpirix closed 5 months ago

Xpirix commented 7 months ago

This PR is for the issue #223

Changes summary:

According to the discussion at #224 and https://github.com/qgis/QGIS-Django/pull/224#issuecomment-1308214178, only request with major.minor QGIS version returns results in production because the plugins xml is pre-generated.

The suggestion in issue #223 is to include the plugins with patch versions in the plugin list :

As a short-term fix, I think we can assume the users are using the latest patch release and we should list the plugin in 3.16 list, even if it has minimumVersion=3.16.1.

Please find below a screenshot of a test plugin with minimumVersion=3.34.1: image

EDIT: This PR should also fix the issue #74

codecov-commenter commented 7 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (b661773) 32.51% compared to head (f54f1ab) 32.48%.

Files Patch % Lines
qgis-app/plugins/views.py 0.00% 4 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #325 +/- ## ========================================== - Coverage 32.51% 32.48% -0.04% ========================================== Files 71 71 Lines 4217 4221 +4 ========================================== Hits 1371 1371 - Misses 2846 2850 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

agiudiceandrea commented 5 months ago

Hi @xpirix, it looks like the issue is not yet fixed. Please see the thread at https://lists.osgeo.org/pipermail/qgis-user/2024-January/053900.html: the BADASS plugin experimental version 2.2 (which has Minimum QGIS Version: 3.34.2 and has been uploaded January 16th, 2024) is not listed in https://plugins.qgis.org/plugins/plugins.xml?qgis=3.34 while it is listed in https://plugins.qgis.org/plugins/plugins.xml?qgis=3.35

agiudiceandrea commented 5 months ago

It seems that such version is now listed in https://plugins.qgis.org/plugins/plugins.xml?qgis=3.34.

Xpirix commented 5 months ago

Hello @agiudiceandrea

Thanks for the feedback. I've just deployed this PR as it was not deployed before.

Best regards.

pathmapper commented 5 months ago

@Xpirix @agiudiceandrea nice to see progress here 👍

Would it be possible that the plugin list could be requested also with the patch version?

So for https://plugins.qgis.org/plugins/plugins.xml?qgis=3.34.1 the mentioned BADASS plugin with Minimum QGIS Version: 3.34.2 would NOT be included in the list but for https://plugins.qgis.org/plugins/plugins.xml?qgis=3.34.2 it would be included.

Here's a related stale PR on QGIS side to request with patch version: https://github.com/qgis/QGIS/pull/47907

If the plugin repository would be able to answer requests with patch version we could revive this PR.

pathmapper commented 5 months ago

This is already tracked in https://github.com/qgis/QGIS-Django/issues/222.

Xpirix commented 5 months ago

Thanks @pathmapper

This is also tracked in #224 and I noticed @dimasciput 's comment (https://github.com/qgis/QGIS-Django/pull/224#issuecomment-1308214178):

@pathmapper yes this wont work because the production pre-generated the plugins xml, and the staging doesn't do that. If we don't generate the plugins file, the server will crash since a lot of people requesting plugins every seconds. And I don't think it's a good idea to generate each patch number at this moment. Please check previous discussions https://github.com/qgis/QGIS-Django/pull/224#issuecomment-1025592381

@dimasciput @timlinux Could you give me some advice on that? Thanks.