Repository navigation
Chore/wheel resources and dev comments - #6
Merged
Merged
Conversation
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).
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.
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.