Skip to content

v0.4.0

Choose a tag to compare

@csteinlxbp csteinlxbp released this 13 Aug 12:03
· 135 commits to main since this release
b784b8f

A correctness release. Several tools returned wrong values or did not work at all, so output changes for anything relying on 0.3.1 behaviour — hence a minor bump rather than a patch.

Full detail in CHANGELOG.md.

Output differs from 0.3.1

  • distribution_operation computes mean and variance analytically. mean previously evaluated get_random_element() — returning a random draw from the distribution, a different wrong answer on every call — and variance was hardcoded to null.
  • distribution_operation honours both normal-distribution parameters. mu was ignored and sigma dropped unless exactly one parameter was passed, so [0, 3] silently used sigma=1 and [5, 2] was centred on 0.
  • matrix_operation([]) is rejected. It previously reported a determinant of 1.0, because Sage reads [] as the 0×0 matrix.
  • geometry_operation("distance", ...) with fewer than two points is rejected. It previously returned {"result": null}.

Upgrading

The base image is now SageMath 10.9, where the sage account is uid/gid 1001 (it was 1000 in 10.5). Deployments pinning the old numeric UID must be updated — /home/sage is mode 0750, so a mismatched UID cannot reach the sage executable and the container exits immediately. docker-compose.yml no longer hardcodes a UID; the Helm chart uses 1001.

Fixed

  • solve_ode rejected the spelling its own documentation advertised (#12). Both diff(y(x), x) and diff(y, x) now work.
  • All three plot tools were non-functional — they passed a BytesIO to Sage's save(), which requires a path.
  • Results over 64 KiB failed with LimitOverrunError; the worker stream limit is now 8 MiB.
  • geometry_operation("distance", ...) computed sqrt(-3) for a 3-4-5 triangle — ^ is XOR in Python, not exponentiation.
  • boolean_algebra_operation rejected its documented x*y + x*z + y*z.
  • coding_theory_operation documented a Reed-Solomon constructor that does not exist in current Sage.
  • graph_operation rejected every parameterised constructor such as CompleteGraph(4).
  • Symbolic bounds now work in integrate_expression, limit_expression, series_expansion and symbolic_sum.
  • Newlines in expressions no longer raise a syntax error.

Testing

Three new suites run every tool against a real Sage runtime: its own documented examples, a syntax matrix over the input spellings it must accept, and static checks over the generated code. One of those checks requires that every documented example is exercised by a test, which is what makes the #12 class of bug structurally impossible.

Integration tests also now actually execute — the Makefile targeted a different container name than CI created, and the failure was masked by a tee pipe, so every previous green integration result was meaningless.