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

QThread for fire_and_forget #156

Closed
wants to merge 43 commits into from
Closed

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Jul 26, 2022

This PR includes a migration from the threading library to asyncio. I tend to find it much more manageable. Using Async instead of Threaded logic for I/O operations. Still works when auto-controlled on Windows. Solved a few multi-threading issues on Linux, may do so as well on Windows 🤷
Added more error catching for unhandled exceptions in threaded/async code (I'd like to include this as part of the wrapper, but I haven't yet fully figured it out)

Avasam and others added 30 commits November 29, 2021 09:22
Configured VSCode and Markdownlint settings
Added and configured the following linters as strict as I could: pylint, flake8, mypy, bandit, pyright
Partially filled in some type stubs: cv2, imagehash, keyboard, pyautogui, pythonwin, win32helper
[Breaking change] Using interpolation=cv2.INTER_NEAREST everywhere as it is the fastest interlpolation method
Hide generated/compiled files
SelectRegionWidget width and height as functions
Added validate_images_before_parsing() to validate images both before maxFPS and starting autosplitter
Configured Building and linting workflow
Simplified and reduced image conversions
Reduced duplicated code, especially in settings
Build Artifact
…-Open'-immediatly

Fix issues with update checker and global error catching
Split screen_region in smaller functions
WIP towards Toufool#94:
No pop-up on loading settings with no capture window
 Don't stop/reset AutoSplit upon loosing capture window
 No pop-up on loosing capture window
 Don't allow selecting desktop.
Fixed regressions:
Fix crash on clising window mid-run
Forgot to migrate split_delay to image.delay
Removed dead load_pyqt_settings code
Fixed dummy groups
Pause time from filename not set correctly
Setting hotkeys on load
…e-window

Recover from closed capture window Fixes Toufool#94
Avasam and others added 5 commits December 11, 2021 10:17
Skip/udo will now actually call command
This makes grouping option obsolete as user now has finer control anyway
UI is a bit cramped, but that should be resolved with UI revamp
Updated README
…Next-Image-#130

Feature request  previous/next image Toufool#130
Don't close if user has cancelled "saving sattings as"
Removed more attributes from AutoSplit class
Don't update last_successfully_loaded_settings_file_path if load was not successful
"Save Settings As" defaults to the last_successfully_loaded_settings_file_path THEN the .exe
When closing app, ue save_settings instead of save_settings_as
…tuitive

Make Save Settings more intuitive
@Avasam Avasam changed the title Disable auto reset image toggle Disable auto reset image toggle + threading --> asyncio Jul 26, 2022
@Avasam Avasam force-pushed the temp-disable-auto-reset branch 2 times, most recently from f83cae7 to d0755a8 Compare July 29, 2022 02:59
@Avasam Avasam changed the title Disable auto reset image toggle + threading --> asyncio Disable auto reset image toggle + threading --> asyncio + automatically target the right fork Jul 29, 2022
* Initial UI update for 2.0.0. Add settings window.

* hooked new settings window to actual values

* Better "seconds remaining" text

* Undo split goes to the end of the group

Co-authored-by: Austin <37423484+Toufool@users.noreply.github.com>
@Samuel-Therrien-Beslogic Samuel-Therrien-Beslogic force-pushed the temp-disable-auto-reset branch 2 times, most recently from 8fff87e to 10a0d1d Compare September 2, 2022 17:10
Avasam and others added 5 commits September 2, 2022 19:58
* hooked new settings window to actual values

* Implemented image specific comparison method and default delay time.
Closes #26

* Initial UI update for 2.0.0. Add settings window.

* hooked new settings window to actual values

* Better "seconds remaining" text

* Undo split goes to the end of the group

* Fixed images comparison method defaulting to 0 rather than none

Co-authored-by: Austin <37423484+Toufool@users.noreply.github.com>
* hooked new settings window to actual values

* Better "seconds remaining" text

* Support modifiers the same way LiveSplit does. Closes #34

* Initial UI update for 2.0.0. Add settings window.

* hooked new settings window to actual values

* Better "seconds remaining" text

* Undo split goes to the end of the group

Co-authored-by: Austin <37423484+Toufool@users.noreply.github.com>
* hooked new settings window to actual values

* Linted pyi files

* Initial UI update for 2.0.0. Add settings window.

* hooked new settings window to actual values

* Better "seconds remaining" text

* Undo split goes to the end of the group

* Turn off pyright(reportFunctionMemberAccess) in favor of pylint(no-member)

* Massively sped up Flake tests
Removed 400+kb of type stubs

* Centralized qWait typing fix

* Autosort imports

* Resynced settings

Co-authored-by: Austin <37423484+Toufool@users.noreply.github.com>
* Typings update

* Full setup and configuration update

* User Profile, Revamped settings, Start image fixes & __auto_splitter method refactor
@Avasam Avasam changed the title Disable auto reset image toggle + threading --> asyncio + automatically target the right fork Disable auto reset image toggle + threading --> asyncio Sep 3, 2022
… Doc update + Fixes (Toufool#161)

* Doc + Setup update

* typings update

* Warning if AutoSplit is already open + Build number + Splash Screen

* Target the right repository/fork

* Fix Toufool#155

* Actions shortcut and prevent double open window
Closes Toufool#154

* ImageHash hotfix
@Avasam Avasam force-pushed the temp-disable-auto-reset branch from 2780a1e to 72883d4 Compare September 3, 2022 23:39
@Avasam Avasam changed the title Disable auto reset image toggle + threading --> asyncio autoreset image toggle + QThread for fire_and_forget Sep 3, 2022
@Avasam Avasam changed the title autoreset image toggle + QThread for fire_and_forget QThread for fire_and_forget Sep 4, 2022
@Avasam
Copy link
Collaborator Author

Avasam commented Sep 4, 2022

Moved autoreset image toggle to #162

@Avasam Avasam marked this pull request as draft September 15, 2022 14:02
@Avasam Avasam changed the base branch from 2.0.0 to dev March 3, 2023 06:55
@Avasam
Copy link
Collaborator Author

Avasam commented Apr 8, 2023

Closing this for now.
Using asyncio and/or QThread instead of threads is still something I'd like to revisit later.
As for catching exceptions in threads, we should be using an excepthook for global error handling: https://docs.python.org/3/library/threading.html#threading.excepthook

@Avasam Avasam closed this Apr 8, 2023
@Avasam Avasam deleted the temp-disable-auto-reset branch April 22, 2023 16:22
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