Repository navigation
test(layout): hold automatic drawing quality in a small corpus - #565
Merged
Merged
Conversation
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.
Summary
Adds a small behavioural regression corpus for automatic drawings. Eight scenarios must meet the hard geometry and routing invariants, draw the same sheet when routed and rendered again, and stay within crossing and extent budgets. Engine changes are deferred to #564.
Related Issues
Closes #550
Refs: #547, #564
Changes
tests/test_layout_workflows.pywith one test per scenario:11_ethanol_pid,20_molecular_sieve_dryerand21_alumina_refinerywith placement pins strippedroute()leaves the drawing fingerprint unchanged and that rendering twice gives the same SVG.3e88e38, with 1% allowance on extent. [Epic]: Lay out equipment by its nozzles and set pipe furniture on routed pipe #564 tightens them.No source, gallery or golden file changes.
How to Test
Run the corpus and the neighbouring layout tests:
Run the complete suite and static checks:
python3 -m pytest -q python3 -m ruff check . python3 -m ruff format --check tests python3 -m mypy pandid python3 -m pyright pandidRun the full corpus report:
Evidence
11_ethanol_pid, pins stripped20_molecular_sieve_dryer, pins stripped21_alumina_refinery, pins stripped105 passed.11481 passed, 188 skipped. The new file adds about 24 s, 12 s of it the ethanol P&ID.git diff --checkare clean. Pyright reports 0 errors forpandidand the new file, plus the existing__all__warning.biodiesel automatic: 20 crossings, budget 19.Checklist
mainand the branch is mergeable