Repository navigation
Expose general tolerance note contents and linear rules - #602
Merged
Merged
Conversation
Expose structured ISO 9013 cut quality on roughness
werk24
approved these changes
Oct 5, 2026
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Tolerance rows accept conflicting selectors and invalid intervals without enforcing their documented contract.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Extends the public client models with structured general-tolerance notes and thermal-cut-quality information.
Changes:
- Adds optional v2 tolerance-note text and linear tolerance rules.
- Adds shared ISO 9013 quality data to v1/v2 roughness models.
- Adds compatibility, validation, and serialization tests.
| File | Description |
|---|---|
| werk24/models/v2/models.py | Adds tolerance-note fields, rule rows, and roughness quality data. |
| werk24/models/v1/roughness.py | Adds optional thermal-cut quality. |
| werk24/models/thermal_cut_quality.py | Defines the shared ISO 9013 designation model. |
| tests/test_thermal_cut_quality.py | Tests designation validation, defaults, and serialization. |
| tests/test_general_tolerance_note.py | Tests legacy payloads and tolerance-note round trips. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+161
to
+166
| decimal_places: Optional[int] = Field(default=None, ge=0) | ||
| nominal_min: Optional[Decimal] = None | ||
| nominal_max: Optional[Decimal] = None | ||
| deviation_min: Decimal | ||
| deviation_max: Decimal | ||
| unit: str = Field(pattern=r"^(mm|inch)$", description="Length unit: mm or inch.") |
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.

Expose the printed general tolerance note and its explicit linear rules in API v2. GeneralTolerances gains optional tolerance_note text and a default-empty tolerance_table containing decimal-place or nominal-range rules, signed deviations, and mm/inch units. Existing payloads remain valid; v1 models are unchanged.
Validation: 41 model and compatibility tests passed, including legacy payload parsing and JSON round trips. Field defaults preserve compatibility with responses that predate the new fields.
Questions for the owner
0 questions; none block merge.