Skip to content

Stage 3: split constructs into per-category topic files - #17

Merged
MartinsMednis merged 1 commit into
mainfrom
stage3-split-construct-files
Sep 14, 2026
Merged

MartinsMednis merged 1 commit into
mainfrom
stage3-split-construct-files

Conversation

@MartinsMednis

Copy link
Copy Markdown
Collaborator

Splits the 229 module-level construct/utility functions Stage 2 hoisted into main.py into 14 per-category topic files, plus two new leaf modules.

  • Move the 229 construct/utility functions into 14 topic files by domain
  • Add _construct_shared.py for the 3 utilities called from more than one topic file
  • Add _exceptions.py for MathJSONException/MathJSONExpression, breaking a circular import
  • Keep If, the constructs dict, create_mathjson_solver, and extract_variables in main.py

No behavior change. 758 tests pass, 1 skipped (unchanged). main.py goes from 3,602 to 1,191 lines.

- Move the 229 module-level construct/utility functions into 14
  topic files by domain
- Add _construct_shared.py for the 3 utilities called from more
  than one topic file
- Add _exceptions.py for MathJSONException/MathJSONExpression,
  breaking a circular import
- Keep If, the constructs dict, create_mathjson_solver, and
  extract_variables in __main__.py

No behavior change.
@MartinsMednis
MartinsMednis merged commit 5946db6 into main Sep 14, 2026
2 checks passed
@MartinsMednis
MartinsMednis deleted the stage3-split-construct-files branch September 21, 2026 17:15
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.

1 participant