Skip to content

v0.4.1 — Closes #121: AltiumSchematicParser DNP/MPN/pin-net mapping

Choose a tag to compare

@RFingAdam RFingAdam released this 27 May 23:41

Closes #121. Schematic-aware analyzers (3-way cross-reference, signal-flow, schematic-layout validator) no longer run in degraded mode against `.SchDoc` input.

Added

  • `AltiumSchematicParser`: PIN (#2), SHEET_SYMBOL (#15), SHEET_ENTRY (#16), FILE_NAME (#33), WIRE (#27), JUNCTION (#29) record-type handling. NET_LABEL (#25) records now also capture coordinates for geometric pin-net resolution.
  • Pin → net resolution for `.SchDoc` input: explicit `NetIdentifier` parameter on a pin record wins; pins without one fall back to the shared geometric resolver (label-anchor snap, same algorithm as KiCad).
  • Sheet-symbol hierarchy — `AltiumSchematicData.sheet_symbols` and `child_sheets` populated from SHEET_SYMBOL + FILE_NAME owner-index linkage. Hierarchy now surfaces in `ParsedSchematicData.sheet_count` and `properties['child_sheets']`.
  • `altium_to_parsed_schematic()` converter (in `altium_parser.py`): maps `AltiumSchematicData` to the canonical `ParsedSchematicData` shape downstream analyzers expect. `SchematicParserFactory.parse()` wires it in so `.SchDoc` input flows through the same analyzer surface as `.kicad_sch`.
  • 17 integration tests in `test_altium_parameter_records.py` that exercise the real `_parse_fileheader` against synthetic FileHeader byte streams. The previous test scaffolding duplicated parameter-mapping logic inside the test file; that helper is gone.

Changed

  • `KiCadSchematicParser._resolve_pin_nets` extracted to `parsers/_pin_net_geometric.py:resolve_pins_by_geometry()` so both parsers share one implementation.

Verification

  • Full suite: 1616 passed, 11 skipped, 0 failed.
  • Lint clean (`ruff check`), mypy clean on touched files.

Part of the eng-mcp-suite toolkit.