solidworks_mcp.selftest.report¶
solidworks_mcp.selftest.report ¶
The selftest's report: a line per area, a Markdown summary, and an issue link.
Attributes¶
ISSUE_FORM_URL
module-attribute
¶
ISSUE_FORM_URL = 'https://github.com/andrewbartels1/SolidworksMCP-python/issues/new?template=compatibility.yml'
Classes¶
AreaResult
dataclass
¶
Check
dataclass
¶
Check(name: str, expected: Any, measured: Any, tolerance: Any = None, unit: str = '', passed: bool | None = None)
One value read back from SolidWorks against the hand calculation.
passed is None when the value could not be measured, which
counts as a failure.
Outcome ¶
Bases: StrEnum
An area's result.
Functions:¶
_expected ¶
_templates ¶
The default templates by file name, marking any that are missing.
Source code in src/solidworks_mcp/selftest/report.py
_tolerance ¶
A check's tolerance: relative for a volume, absolute otherwise.
A count is "exact"; a yes/no or a condition such as "> 0" has none.
Source code in src/solidworks_mcp/selftest/report.py
_tools ¶
The tools an area called, in first-call order, with repeat counts.
Source code in src/solidworks_mcp/selftest/report.py
_unit ¶
_value ¶
A check value as the report shows it.
Source code in src/solidworks_mcp/selftest/report.py
area_line ¶
One line for an area: outcome, name, checks passed, and why if not PASS.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
result
|
AreaResult
|
The area's result. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
e.g. |
Source code in src/solidworks_mcp/selftest/report.py
issue_link ¶
The issue-form link with summary filled in, if it's short enough.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
summary
|
str
|
The Markdown summary. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
str | None: The link, or |
Source code in src/solidworks_mcp/selftest/report.py
render ¶
Everything the command prints after the run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
environment
|
dict[str, Any]
|
From |
required |
results
|
list[AreaResult]
|
The areas' results. |
required |
problems
|
list[str]
|
Cleanup problems, printed but kept out of the summary. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The area lines, any cleanup problems, the summary and the link. |
Source code in src/solidworks_mcp/selftest/report.py
summary_markdown ¶
The summary to paste into a compatibility issue.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
environment
|
dict[str, Any]
|
From |
required |
results
|
list[AreaResult]
|
The areas' results. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Markdown: the environment, then each area's checks and tools. |