-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Segregate BusKill Package Module into multiple scripts #33
Comments
Functions for the following purposes could be boxed-up together into individual files:
|
this commit is my first attempt to split-up the contents of the buskill __init__.py file into distinct files. Here I've only attempted to make upgrade() separate, following this: * https://www.qtrac.eu/pyclassmulti.html * https://stackoverflow.com/a/57562083 Note that the new builds could't find the KEYS file (which here not in the APP_DIR on Linux, but in the root-owned /tmp/ dir in which the squashfs .AppDir is extracted), so I had to do some fuckery with APP_DATA and added a new instance field RUNTIME_DIR I've tested that this works on Linux, but I'm not sure if this works on Windows & MacOS (hence why I'm pushing this to git for the builds). If I broke the upgrade process on any platforms, I'll revert this * #33
Well, I tried to separate-out the
I don't know if I caused that or not with this change, but I'm going to revert for now. |
Well, we lost all our fucking history of that work because git is stupid. Not sure why "revert everything back to X commit" is so damn hard. Apparently if you say After fighting with git for 10 minutes, I finally just did a |
Rather than splitting things like 'triggers' into their own file, I think it would make more sense to split it by platform. So all the linux-specific triggers would go into '_buskill_lin.py I like this better because you could load less code at runtime as-needed. And because an developer probably wants to focus on one platform at at time. But if they want to view, for example, all of the "lockscreen" functions for each platform side-by-side, that's easier when it's in three distinct files. I'm writing this as I'm trying to edit the shutdown trigger on two platforms, and it's a pain to scroll up-and-down between the linux and MacOS implementations The only problem with this idea is the *nix functions that are used for both Linux and MacOS :/ |
At the time of writing (2022-10-01), The
buskill-app/src/packages/buskill/__init__.py
file is 1,656 lines long. And growing.This task is to track the effort to split this file up into multiple distinct files.
The text was updated successfully, but these errors were encountered: