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

Add generated ui.py files for qt6 #173

Merged
merged 4 commits into from
Nov 10, 2022
Merged

Add generated ui.py files for qt6 #173

merged 4 commits into from
Nov 10, 2022

Conversation

aplaice
Copy link
Collaborator

@aplaice aplaice commented Nov 6, 2022

Fix #170.

We're slavishly copying the convention used by anki in qt/aqt/forms/ (up to the presence of the type: ignore comment).

The old qt5 files are moved from *_ui.py to *_ui_qt5.py.

The new qt6 files are *_ui_qt6.py.

generate_ui.sh was run from within the pipenv (pipenv shell).

I've changed the script to have pipenv run ... at the start of all the lines, and updated CONTRIBUTING.md.

In order to have easy access to pyuic6, I added PyQt6 to our dev dependencies (while minimally changing Pipfile.lock — we don't want to fully update Pipfile.lock, since I've had issues with making pure-python (C-free) builds (for dist/) of the later versions of some of our dependencies (PyYAML, I think)).

AFAICT mostly pyuic6 isn't packaged in stable Linux distros, so running it from our pipenv is probably the cleanest solution, and we may as well switch to running pyuic5 from there, for consistency.


Ugh. I'm being bitten by #145. (aqt.qt is being mocked, so qtmajor is also a mock, so can't be compared... I'll probably solve this by going deeper in on the "hack-ish" test solution. :D )

We don't want to fully update Pipfile.lock, since I've had issues with
making pure-python (C-free) builds (for dist/) of the later versions
of some of our dependencies (PyYAML, I think).
This is to make it easier for git to follow the file history upon
rename.
Fix Stvad#170.

We're slavishly copying the convention used by anki in
`qt/aqt/forms/` (up to the presence of the type: ignore comment).

The old qt5 files are moved from *_ui.py to *_ui_qt5.py.

The new qt6 files are *_ui_qt6.py.

generate_ui.sh was run from within the pipenv (pipenv shell).  I'm not
yet sure whether to change the script to have `pipenv run ...` at the
start of all the lines, or to update CONTRIBUTING.md.
This means that we can run the script directly (rather than as `pipenv
run ./generate_ui.sh`).

This is for convenience and consistency with `fetch_dependencies.sh`.

CONTRIBUTING.md has been appropriately updated.
@aplaice aplaice merged commit 5612b89 into Stvad:master Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant