Repository navigation
Audit follow-up: leaner tests, app defaults from Config, two small fixes - #7
Merged
Merged
Conversation
Follow-up to an over-engineering audit of the suite. Removed, because another test or the shipped code already pins the same: - TestConfigDefaults: ten literal checks. A changed default is a deliberate edit; what can drift is a second copy of the defaults, so test_app_render now checks that the web app starts with Config's values. - three file_hash tests implied by test_known_content, the selection_key and is_rotation_axis mapping tests (both branches run through AppTest and quantize_axis_value), the unused cylinder fixtures, two no-throw dilate tests, a decimation test that only checked "no error", the signature check for individual_recess_positions and five unused imports. Sharpened, because they could not fail for the reason they exist: - TestEffectiveWorkers pins os.cpu_count: on the 4-core CI runner min(100, 4) is 4 with or without the RAM cap. - Removed build_inlay keywords are checked by calling - a signature check misses a **kwargs swallowing them. Binding fails before the body runs, so the test needs no fixture any more. - The rotation order test rebuilt the implementation's own matrices; it now pins where the unit vectors land (order and direction). - normalize: "de.UTF-8" and "de.utf8" are the only inputs that need the split at "." and no case covered them. - DYNAMIC_KEYS lost four keys app.py now passes as literals. New: format_int per language; a coarser rotation step snaps slider, number field and stored value together; the gap's number field sets the gap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ults
- app.py read its start values from literals of its own (value=0.4, 2.0,
...) while the CLI reads Config's defaults - nothing kept the two in sync.
Every widget with a Config counterpart now starts at inlayer.Config.<field>,
like the CLI; test_app_render checks it and AGENTS.md records it.
- The per-axis plain session key (offset_x, rot_z, ...) is gone. Only
_requantize_axes read it, to rewrite the slider and number field from it;
it now rewrites them from the slider itself. The stored per-figure values
stay the source, and rewriting the keys on every run is what keeps them
while their section is hidden - documented in the docstring.
- One gap callback with args instead of two mirrored ones; GAP_KEYS names
the three keys that move together.
- Single-use aliases _file_hash and _selection_key inlined.
- apply_euler_rotation uses trimesh's euler_matrix ("sxyz" is Rz·Ry·Rx,
identical to the hand-built product); the zero-rotation branch went too,
apply_transform skips an identity matrix anyway.
- Each range rule carries its message; the parallel _RANGE_MESSAGES dict
is gone. _is_manifold (one caller) is inlined.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The pipeline formatted triangle counts with f"{n:,}" in every language,
so the German CLI printed "1,448 Dreiecke" - a decimal number to a German
reader. The ten counts now go through i18n.format_int, like the app's
triangle metric already did.
- The gap slider carried the help text, but Streamlit only shows a tooltip
next to a visible label and that slider's label is collapsed - the text
was never displayed. It now sits on the caption above slider and number
field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- .dockerignore listed docker-compose.yml, a file the repo never had (it ships compose.yaml). The note on why the Dockerfile stays in the build context now closes the file instead of sitting above an unrelated entry. - requirements.txt still said build_inlay calls trimesh.boolean with engine='manifold'; it calls manifold3d directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to an over-engineering audit of the repo. Four self-contained commits:
1. Tests: drop redundant tests, sharpen the weak ones
TestConfigDefaults(literal checks), threefile_hashtests implied bytest_known_content, theselection_key/is_rotation_axismapping tests (both branches run through AppTest), unused cylinder fixtures, no-throwdilate/ decimation tests, theindividual_recess_positionssignature check, five unused imports.TestEffectiveWorkerspinsos.cpu_count: on the 4-core CI runnermin(100, 4)is 4 with or without the RAM cap.build_inlaykeywords are checked by calling, since a signature check misses a**kwargsswallowing them; no fixture needed.normalize("de.UTF-8")/"de.utf8": the only inputs that need the split at., previously uncovered.DYNAMIC_KEYSentries.2. Simplify app and pipeline plumbing; the app starts from Config's defaults
inlayer.Config.<field>like the CLI instead of literals of their own (new AppTest, one sentence in AGENTS.md)._requantize_axesread it, the stored per-figure values stay the source. Rewriting the display keys on every run is what keeps them while a section is hidden (Streamlit only drops hidden widget state that nothing set) - documented in the docstring.euler_matrix("sxyz"== Rz·Ry·Rx); messages folded into_RANGE_RULES;_is_manifoldinlined.3. German thousands separator in pipeline logs; show the gap's help text
i18n.format_int.4. Packaging: stale
docker-compose.ymlentry in.dockerignore, outdated manifold3d comment inrequirements.txt.Deliberately unchanged: folding the gap row into
_axis_row(would change the UI) and the web app'sfigure.stlfallback (product decision).Test plan
**kwargs, rotation order,normalize, step requantization, app defaults, gap tooltip, log separator)pyrefly check: the same 21 pre-existing errors asmain, none new🤖 Generated with Claude Code