Skip to content

Refactor: extract linalg dispatch into linalg.py#27

Merged
sacchen merged 1 commit into
mainfrom
refactor/extract-linalg-module
Apr 11, 2026
Merged

Refactor: extract linalg dispatch into linalg.py#27
sacchen merged 1 commit into
mainfrom
refactor/extract-linalg-module

Conversation

@sacchen

@sacchen sacchen commented Apr 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Moves consume_bracket_literal, parse_linalg_keyed_literals, and evaluate_linalg_alias out of cli.py into a new src/calc/linalg.py module
  • Follows the exact same pattern as ode.py: evaluate_fn callback parameter, no circular imports, thin wrapper in cli.py
  • Tests updated to call linalg.consume_bracket_literal / linalg.parse_linalg_keyed_literals directly
  • cli.py: 839 → 740 lines

Test plan

  • 279 tests pass, no behavior changes
  • Pure refactor — all existing linalg integration and unit tests unchanged in behavior

🤖 Generated with Claude Code

Move consume_bracket_literal, parse_linalg_keyed_literals, and
evaluate_linalg_alias from cli.py into src/calc/linalg.py, following
the same pattern as ode.py (evaluate_fn callback, no circular imports).
cli.py now imports evaluate_linalg_alias and delegates via a thin
wrapper. Tests updated to reference linalg module directly.

No behavior changes. cli.py: 839 -> 740 lines.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sacchen
sacchen merged commit ce566bc into main Apr 11, 2026
10 checks passed
@sacchen
sacchen deleted the refactor/extract-linalg-module branch April 11, 2026 07:25
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