Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyqt5 to pyqt6 migration #175

Conversation

RaghavaAlajangi
Copy link
Contributor

@RaghavaAlajangi RaghavaAlajangi commented Oct 25, 2024

Intro

This PR aims to migrate the codebase from pyqt5 to pyqt6
This is needed because QtCreator does not support PyQt5. It is explained in the issue #165.

To do:

  • Refactor code to be adopted to pyqt6
  • CI/CD pipeline passed
  • Tests pass locally (run pytest tests on your computer)
  • update CHANGELOG

@paulmueller
Copy link
Member

paulmueller commented Oct 25, 2024

Thanks for this effort!
It riddles me that CI fails. For the linux runners, apt install libgl1-mesa-glx in the workflow might help, but for Windows and macOS I am not sure what happens. Can you run python -m shapeout2 --version from the terminal on your Windows machine? Maybe the __main__ module needs refactoring.

I will be able to take a closer look in one or two weeks 👍

@RaghavaAlajangi
Copy link
Contributor Author

I get the below result when I run the command:

$ python -m shapeout2 --version
C:\Raghava_local\GITLAB\forks\ShapeOut2\shapeout2\__main__.py:3: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
0.0.post927+g3e770f4.d20241024
Segmentation fault


@paulmueller
Copy link
Member

OK, then the culprit is somewhere inside the __main__ module. You could try commenting things out or adding print statements to see where things go wrong.

@RaghavaAlajangi
Copy link
Contributor Author

RaghavaAlajangi commented Oct 28, 2024

Hi Paul,
I ran the application without any arguments like:

changed the below line in __main__

# window = ShapeOut2(*app.arguments()[1:])

window = ShapeOut2()

In this case, it is working. I can open the files and sessions. But, when I run the tests, they still fail.

@RaghavaAlajangi
Copy link
Contributor Author

Hi @paulmueller ,
I ran tests today without making any changes. Surprisingly, they were all passed.

@paulmueller
Copy link
Member

The tests still fail. I narrowed it down to the instantiation of the AnalysisView class, which probably should be implemented via promotion in QtDesigner. I will merge your changes into a separate branch and work on it from there.

Thanks!

@paulmueller paulmueller changed the base branch from master to pyqt6 November 4, 2024 15:24
@paulmueller paulmueller merged commit c9b1973 into ZELLMECHANIK-DRESDEN:pyqt6 Nov 4, 2024
0 of 3 checks passed
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.

2 participants