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

V3 compatible, Recalc improved, progress bars fixed #296

Merged
merged 2 commits into from
Aug 13, 2023
Merged

V3 compatible, Recalc improved, progress bars fixed #296

merged 2 commits into from
Aug 13, 2023

Conversation

mortii
Copy link

@mortii mortii commented Aug 10, 2023

  • Now works on the V3 scheduler (fixes 2021 (v3) scheduler support #276)
  • Exponentially faster recalc action
  • Progress dialogs are now shown when recalcing and anki no longer freezes (background thread is used instead of main thread)
  • Renamed some files that were poorly named
  • Refactored init file and extracted hidden hooks to make the code execution logic much clearer
  • Added some type hints for clearer logic
  • refactored some variable names to follow PEP conventions

@landonepps landonepps self-requested a review August 11, 2023 15:59
Copy link
Collaborator

@landonepps landonepps left a comment

Choose a reason for hiding this comment

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

Overall looks good, I appreciate the attention to detail like renaming variables.
I'm happy to merge it if you can address the linter warnings.

Also, the master branch is outdated. The latest version on AnkiWeb is using the qt6-migration branch. I'll merge your changes into that branch after it gets merged to master.

morph/main.py Outdated Show resolved Hide resolved
morph/main.py Outdated Show resolved Hide resolved
@mortii mortii changed the base branch from master to qt6-migration August 12, 2023 12:22
@mortii
Copy link
Author

mortii commented Aug 12, 2023

I fixed the lint errors and I rebased onto qt6-migration

@mortii
Copy link
Author

mortii commented Aug 12, 2023

hold on, a very a sneaky error appeared that needs to be fixed

- Now works on the V3 scheduler
- Exponentially faster recalc action
- Progress dialogs are now shown when recalcing and anki no longer freezes (background thread is used instead of main thread)
- Renamed some files that were poorly named
- Refactored init file and extracted hidden hooks to make the code execution logic much clearer
- Added some type hints for clearer logic
- refactored some variable names to follow PEP conventions
@mortii
Copy link
Author

mortii commented Aug 12, 2023

there was an invisible input parameter after removing a lambda, but it's fixed now.

@mortii
Copy link
Author

mortii commented Aug 12, 2023

Also this should probably be placed in the ankiweb description until we get a proper wiki/guide (next on my todo-lis):

NB! If the deck you are studying has sub-decks then new cards will by default only be gathered from the first sub-deck until it is empty before looking for new cards in the next sub-deck. If you instead want to get new i+1 cards from all sub-decks do the following:

  1. Activate the v3 scheduler: Tools -> Review -> Scheduler -> V3 scheduler
  2. Deck that has sub-decks: Deck options -> Display Order -> New card gather order -> Ascending position

The writing is kinda clunky, feel free to improve it in whatever way you see fit , lol.

@landonepps landonepps merged commit e597ae3 into kaegi:qt6-migration Aug 13, 2023
3 checks passed
@landonepps
Copy link
Collaborator

Looks good to me, thanks for all the work you did here.
And I appreciate the AnkiWeb note, I'll be sure to add it.

@PrentissLiu
Copy link

PrentissLiu commented Aug 15, 2023

Thank you so much for your work. I am the version of QT5. I tried to modify:
readability_ui.py and readability_settings_ui.py :

from PyQt6 import QtCore, QtGui, QtWidgets

to:

from PyQt5 import QtCore, QtGui, QtWidgets

it works!

@landonepps
Copy link
Collaborator

Awesome, I really appreciate the report!
Both of my computers are arm-based Macs, which don't support Qt5, making it quite annoying to test.

If this is really all that's needed, I should be able to modify the UI generation code to replace these imports with the aqt version and have full backwards compatibility.

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.

2021 (v3) scheduler support
3 participants