GWSL-Source
GWSL-Source copied to clipboard
refactor: code rationalization - WIP
trafficstars
Hi there, happy new year!
this is a (still dirty) refactor of the code to make it more readable and maintainable.
Feature highlight:
- use src layout for python modules
- use
pydanticfor (json) settings management - centralize paths and url management / constants, using
pathlib - use
typerfor CLI design (I changed some options and organized them by commands) - move dashboard in systray process (it is still the default command in the CLI, but not used by the systray)
- use classes for
tkinter(Framesubclass) andpygame(SpriteandGroupsubclasses) windows and components - using a model class for each
tkinterwindow to handle variables and pass the data to the related methods - use the
Frame.mainloop()intkinterwindows instead of manually handle the loop.
Still need to extensively test, add animations and build the pyinstaller executables.
I'm publishing it as a Draft because I don't think I'll have much time in the following weeks to continue; I hope this all makes sense to you and that can be helpful to build the next iteration.