Repository navigation
Restructure app: split tests, previews and comparison helpers into modules - #281
Merged
Merged
Conversation
This was referenced Oct 14, 2026
m-messer
added this pull request to stack #291
October 20, 2026 13:09
m-messer
marked this pull request as ready for review
October 20, 2026 13:12
m-messer
removed this pull request from stack #291
October 20, 2026 14:19
m-messer
added this pull request to stack #293
October 20, 2026 14:20
2 tasks done
m-messer
requested review from
neagualexa
and removed request for
peterbjohnson
October 22, 2026 09:28
neagualexa
approved these changes
Oct 22, 2026
…rts, and revise documentation for consistency.
…types, and imports to `app/preview/`.
… numerical comparison logic into dedicated modules
… contexts into packages, update imports, and revise documentation for clarity
…inal_criterion`, `disable_nodes`, `outcome_tag`) and integrate them across symbolic and physical_quantity contexts
…package with specialized modules (`equivalence`, `set_equivalence`, `generic`, `substitution`), and extract comparison logic into `comparison.py`.
… (`graphs`, `parsing`, `criteria_parser`, `comparison`), update imports, and consolidate redundant code in `__init__.py`.
…ons (`_input_symbol_codes_and_aliases`, `_raise_on_collisions`, `_build_parameters`, etc.), remove redundant in-line implementations, and streamline `FrozenValuesDictionary` usage.
…dback logic with `outcome_tag`
…efaults.py` for shared default parameters, extract reusable parsing/comparison utilities (`parse_criterion_sides`, `COMPARISON_OPERATORS`) into dedicated modules, streamline evaluation graph imports and `disable_nodes` logic.
…TORS` in `app/context/operators.py`, replace `unused_input` with `_response` across evaluation methods, remove redundancy in comparison and substitution functions, and streamline parameter handling in criteria-related methods.
…for static type checking, enforce stricter type safety across the codebase, and integrate mypy checks into the CI workflow.
…ialization logic with `outcome_graph` helper function, update imports, and streamline related modules.
…parison, eliminate redundant structures, and streamline simplification handling.
…` dataclass, introduce `base.py` for shared context logic, update evaluation methods to use `Context` object, and streamline context selection logic in `select_context`.
…sedQuantity` dataclass, update type aliases and dependent methods, and streamline parameter lookups in evaluation logic.
…nd update documentation regarding import conventions.
… `EvaluationParameters` dataclass, update all affected modules and type hints, streamline parameter access, and update dev documentation accordingly.
…he codebase, refactor `requirements-dev.txt` to include dev tools, and streamline dependency management in workflows and CI.
…_report` helper to centralize feedback and exception handling logic, reduce redundancy, and streamline reserved expression evaluation.
… from `app/types.py`, remove unused imports, and refine function type hints.
… into them Use `split_criteria`, `build_quantity_criteria_parser` and `where_substitutions` from `lambdafeedback.criteria`, and `notation_warnings` from `lambdafeedback.expression_parsing`, in place of the local copies. Empty criteria in a criteria list now raise "Cannot parse criteria". Add tests for malformed criteria lists and update dev documentation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, internal references, and type hints across symbolic evaluation modules to streamline parameter usage and improve consistency.
m-messer
force-pushed
the
refactor/restructure-app
branch
from
October 23, 2026 09:43
821829c to
659ab57
Compare
m-messer
removed this pull request from stack #293
October 23, 2026 11:49
Update lambdafeedback packages to v0.3.0-rc.3 and adopt helpers moved into them
Design patterns: Context, EvaluationParameters and ParsedQuantity dataclasses, graph helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
This is the structural follow-up promised in #280; it's stacked on that PR. After the packages extraction,
app/still mixed tests, previews and comparison helpers in a few large modules.app/context/symbolic.pyheld the set-equivalence and numerical-comparison logic alongside the symbolic context.Changes
Files and code move; behaviour is unchanged.
app/evaluation_test.pyandapp/preview_test.pymove toapp/tests/, the latter assymbolic_preview_test.py. Imports and the healthcheck entry point (app/evaluation_tests.py) are updated to match.app/preview.py,app/symbolic_preview.pyand the physical-quantity preview move into anapp/preview/package. Shared preview types and helpers go inapp/preview/common.py.app/context/symbolic.pymove into their own modules:compare_numerically) intoapp/context/numerical.py;as_sets,add_set_equivalence_nodes) intoapp/context/set_equivalence.py.README.mdandapp/docs/dev.mdpaths are updated.Checklist
app/docs.md) if user-facing behaviour changed (n/a, no behaviour change)Testing
pytest app/tests: the same results as Extract parsing, units and criteria into lambda-feedback-packages #280, with the 1 knowntest_radians_to_frequencyfailure.🤖 Generated with Claude Code