Skip to content

Refactor: Split the __main__.py monolith into focused modules#151

Open
D-VR wants to merge 8 commits into
masterfrom
refactor-monolith-split
Open

Refactor: Split the __main__.py monolith into focused modules#151
D-VR wants to merge 8 commits into
masterfrom
refactor-monolith-split

Conversation

@D-VR

@D-VR D-VR commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Extract the first low-risk parts out, and move everything into fitting submodules.
This PR mostly moves code around without modifying the actual functions.
First step in addressing #97, next step is breaking down the syncMyMoodle class in app.py as it's still way too big

New modules:

  • constants, totp, node: leaf values/helpers
  • context: SyncContext state holder (owns per-run state, wired transitionally via delegating properties on SyncMyMoodle)
  • pathing, filters: sanitize/path-safety and skip/prefix logic, now pure functions taking config explicitly
  • storage: gzip-JSON + cookie serialization
  • cli : main() + argparse, console script repointed to syncmymoodle.cli:main, __main__.py is now just a thin shim
  • app: now holds the main syncMyMoodle class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant