Skip to content

0.4.0rc1: relational parsing, number precision helpers, big operator symbols - #17

Draft
m-messer wants to merge 11 commits into
mainfrom
0.4.0-rc1-preview
Draft

m-messer wants to merge 11 commits into
mainfrom
0.4.0-rc1-preview

Conversation

@m-messer

Copy link
Copy Markdown
Member

Features for 0.4.0rc1 (a minor version, since they are new features), merged from their feature branches. Further fixes may land before 0.4.0.

expression_parsing

  • Inequalities and != (feat/relational-parsing, from compareExpressions#276): x < 5, x <= 5, x > 5, x >= 5 give unevaluated SymPy relations, x != 5 gives Ne(x, 5), and a two-inequality chain in one direction (1 < x <= 5) gives And of both. ≠, ≤, ≥ are accepted. split_relations and RELATIONAL_OPERATORS are exported; split_relations replaces split_equation in parse_expression.
  • Chained equalities (compareExpressions#278): x = y = z gives And(Eq(x, y), Eq(y, z)) from parse_expression and parse_latex.
  • Number precision helpers (feat/number-precision-helpers, from compareExpressions#273 and #277): read_written_number returns a WrittenNumber with significant_figures and decimal_places; round_to_significant_figures and round_to_decimal_places.
  • Big operator symbols (feat/big-operator-symbols, from compareExpressions#261): a task symbol whose LaTeX starts with \sum, \int, \prod, \lim, \bigcup or \bigcap (BIG_OPERATOR_PREFIXES) wraps its argument when applied, so it previews as the operator followed by its argument.

Also merges rc4-preview (the units → physical_quantities rename, #14), and moves these CHANGELOG entries into a new 0.4.0 section, labelled "(since 0.4.0rc1)". All four packages are at 0.4.0rc1, with sibling ranges >=0.4.0rc1,<0.5.0.

Checks (on the merged branch): scripts/test.sh, ruff check, ruff format --check and mypy pass.

🤖 Generated with Claude Code

m-messer and others added 11 commits October 23, 2026 14:12
x = y = z parses as And(Eq(x, y), Eq(y, z)) in parse_expression and
parse_latex; an empty side is an error. Adds tests/test_relations.py,
which also covers the relational operators from the previous commit.
From compareExpressions#278.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	expression_parsing/src/lambdafeedback/expression_parsing/sympy_parsing.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The new expression-parsing features (relations, chained equalities,
read_written_number, big-operator symbols) are a minor version, so they
move from 0.3.0rc5 to a 0.4.0 section. All four packages are bumped to
0.4.0rc1, with sibling ranges >=0.4.0rc1,<0.5.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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