Skip to content

Chore/wheel resources and dev comments - #6

Merged
SOSOVSKI merged 2 commits into
mainfrom
chore/wheel-resources-and-dev-comments
Oct 28, 2026
Merged

SOSOVSKI merged 2 commits into
mainfrom
chore/wheel-resources-and-dev-comments

Conversation

@SOSOVSKI

@SOSOVSKI SOSOVSKI commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

References to internal docs not available on the public repo were removed and where relevant replaced with independent text

algorithms in the for of .tex files were added to the package making the declared functionality and actual one coincide.

Installed from PyPI, mechdsl.lib.plasticity{,_kinematic,_mixed} and
algo2code.library.radial_return_j2{,_kinematic,_mixed} raised
FileNotFoundError at import time: they walked up from __file__ looking
for <repo>/dev/algorithms/*.tex, which no wheel ships. The solver seams
(seam_solve / seam_integrate) had the same latent defect behind their
Taichi import.

- Move dev/algorithms/*.tex to algo2code/library/algorithms/ (single
  source of truth, bundled by hatchling as package data).
- Add algo2code.library.sources with algorithm_source(name),
  algorithm_source_path(name) and ALGORITHM_SOURCES, backed by
  importlib.resources; the radial-return modules and the mechdsl solver
  seams load through it.
- Update docstring/doc references to the new location.
- Regression tests: build both wheels, install them into a fresh venv
  without the [verify] extra and import every module (only a missing
  taichi / ti_runtime is an accepted skip); in-process checks that every
  bundled source loads and that the wheel contains the .tex files.
The mechdsl-core and algo2code wheels carried internal planning
commentary (post_recovery_plan / PlanJune14 / Plan-B task ids such as
"P5-1", "Phase 4", dev/plans paths, cross-repo notes) in comments,
docstrings, error messages and emitted-code comments. Rewrite them to
keep the reasoning and drop the ids; error messages stay actionable.

- No identifiers, behaviour or public API changed (verified by an AST
  comparison with string constants blanked; the one difference is the
  parse_math non-str guard now reporting the received type in its
  message).
- Emitted-code comments cleaned in the Taichi/MFEM/MOOSE printers and
  the lawgen test emitter; golden snapshots regenerated for the affected
  comment lines only.
- The bundled algorithm .tex sources lose the same chatter from their
  "%" header comments; algorithm bodies are byte-identical.
- Survivors: the benchmark registry's task_id="P10-1".."P10-9" values
  are data keys matched by the committed perf baseline and tests, plus
  the two docstring lines that list them.
- Tests updated where they pinned a changed message
  (test_mfem_printer deferral markers, test_nrpylatex_round_trip wording,
  test_compile_latex_docstring assertion messages).
@SOSOVSKI
SOSOVSKI merged commit 08aecd5 into main Oct 28, 2026
7 checks passed
@SOSOVSKI
SOSOVSKI deleted the chore/wheel-resources-and-dev-comments branch October 28, 2026 10:40
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