Skip to content

Add a Qt6 compatibility check when releasing a version#282

Open
florentfougeres wants to merge 6 commits intoqgis:masterfrom
florentfougeres:feat/add-qt6-check-with-celery
Open

Add a Qt6 compatibility check when releasing a version#282
florentfougeres wants to merge 6 commits intoqgis:masterfrom
florentfougeres:feat/add-qt6-check-with-celery

Conversation

@florentfougeres
Copy link
Copy Markdown

@florentfougeres florentfougeres commented Mar 31, 2026

Goals

The purpose of this PR is to run the Qt6 compatibility script pyqt5_to_pyqt6.py everytime when a new plugin version is uploaded. You can then access to the compatibility result in the web interface.

Our goal is to enforce the QGIS 4 compatibility for new plugins. It was already discussed in QEP #287 (see Trigger linters on plugins.qgis.org)

This is still a work in progress, tests and mail notifications are missing. I'd like to check that the overall looks good before continuing any further.

I'm aware of #266 and I'm prepared to rebase this work on it once merged. I'm wondering if Qt6 compatbility tests shall be synchronous with the #266 ones. This could be tricky because they require to be run in the appropriate docker environnement. I'm open to suggestions.

To sum up this PR:

  • Starts a new docker from https://github.com/qgis/pyqgis4-checker/ which contans the script pyqt5_to_pyqt6.py
  • Triggers a celery task to run the script inside this docker when a new plugin version is created
  • Save the results in the database once the script is finished
  • Display the results in a table in a new tab in the version view

Screenshots

This is how it looks like

image image

Author's checklist

  • I have read the contributing guidelines and my pull request follows them.
  • my commits tend to comply with Conventional Commits; so they are descriptive and explain the rationale for changes. Messages and description are self-explanatory to make the git log a readable story of the project.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if appropriate).
  • commits which fix bugs include Fixes #11111 at the bottom of the commit message.

Tip

If you forgot to do this, don't be shy and write the same statement into this text field with the pull request description.

AI tool usage

  • AI tool(s) (Copilot, Claude, or something similar) supported my development of this PR. See our policy about AI tool use. Use of AI tools must be indicated. Failure to be honest might result in banning.

Reviewer's checklist

  • I remember to check the "Author's checklist" above and ask the author to update the PR description if any of the items are not checked.
  • I remember that welcoming new contributors is more important than nitpicking on code style. I will be kind and respectful in my review comments.

ping @Xpirix @troopa81

Funded by Oslandia

@Xpirix
Copy link
Copy Markdown
Collaborator

Xpirix commented Apr 2, 2026

Thanks so much for this @florentfougeres . This looks awesome. I will try it locally to check out how it works and get back to you.

Copy link
Copy Markdown
Collaborator

@Xpirix Xpirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this @florentfougeres . I was able to spin it locally (with some tweaks), and it's working as you described. This will definitely be a huge addition to the Plugins Website.

I've also reviewed the code implementation, and I have some suggestions/questions.

Thanks again!

Comment thread dockerize/docker-qt6-validator.dockerfile Outdated
Comment thread dockerize/Makefile
Comment thread qgis-app/plugins/tasks/__init__.py Outdated
Comment thread qgis-app/plugins/templates/plugins/version_detail.html Outdated
Comment thread qgis-app/plugins/templates/plugins/version_detail.html Outdated
Comment thread qgis-app/plugins/validator.py Outdated
Comment thread qgis-app/plugins/validator.py Outdated
Comment thread qgis-app/plugins/validator.py
Comment thread qt6-validator/plugins/tasks/run_check_qt6.py Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain why this (qt6-validator) is implemented outside the Django App?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we need access to a QGIS installation with Qt6 and the pyqt5_to_pyqt6.py script, we use the Docker image provided by the pyqgis4-checker project. This allows us to keep it well isolated from the rest of Django.

We will also ask QGIS Container to flag deprecated methods in a future validator that we plan to release later (see this QEP)

If you have any other ideas for accessing this in a Django app, I’m of course open to any suggestions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation. That sounds fine.

@Xpirix Xpirix requested a review from timlinux April 3, 2026 09:14
@Xpirix
Copy link
Copy Markdown
Collaborator

Xpirix commented Apr 3, 2026

I wonder if you could also please share your thoughts on this @timlinux ? Thanks!

@Xpirix
Copy link
Copy Markdown
Collaborator

Xpirix commented Apr 3, 2026

It will also be appreciated if you could please add unit tests and perhaps add docs or update the Qt6 migration docs (https://plugins.qgis.org/docs/migrate-qgis4) for this new implementation @florentfougeres. Thanks!

@timlinux
Copy link
Copy Markdown
Member

timlinux commented Apr 7, 2026

This is a really great addition, thank you for sharing @florentfougeres - happy for @Xpirix to merge when he is happy with the code quality.

@florentfougeres
Copy link
Copy Markdown
Author

Thanks @Xpirix for the review. I'll take the time to reply to you and make the necessary changes next week.

@florentfougeres florentfougeres force-pushed the feat/add-qt6-check-with-celery branch 4 times, most recently from fd44620 to fd42034 Compare April 13, 2026 14:48
@florentfougeres florentfougeres force-pushed the feat/add-qt6-check-with-celery branch from fd42034 to 5e08afe Compare April 13, 2026 14:49
@florentfougeres florentfougeres requested a review from Xpirix April 16, 2026 13:09
Copy link
Copy Markdown
Collaborator

@Xpirix Xpirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall changes look good to me!

This is still a work in progress, tests and mail notifications are missing. I'd like to check that the overall looks good before continuing any further.

Are you still planning to add these to this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants