GWSL-Source icon indicating copy to clipboard operation
GWSL-Source copied to clipboard

refactor: code rationalization - WIP

Open sanzoghenzo opened this issue 4 years ago • 0 comments
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 pydantic for (json) settings management
  • centralize paths and url management / constants, using pathlib
  • use typer for 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 (Frame subclass) and pygame (Sprite and Group subclasses) windows and components
  • using a model class for each tkinter window to handle variables and pass the data to the related methods
  • use the Frame.mainloop() in tkinter windows 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.

sanzoghenzo avatar Jan 03 '21 19:01 sanzoghenzo