Skip to content

🐛 FIX: Make LONG-NAME optional in SpecRelationTypeParser#2

Open
szamier wants to merge 1 commit intomainfrom
fix/spec-relation-type-optional-long-name
Open

🐛 FIX: Make LONG-NAME optional in SpecRelationTypeParser#2
szamier wants to merge 1 commit intomainfrom
fix/spec-relation-type-optional-long-name

Conversation

@szamier
Copy link
Copy Markdown
Collaborator

@szamier szamier commented Apr 9, 2026

Summary

SpecRelationTypeParser was treating LONG-NAME as a required attribute and
crashing on spec-compliant ReqIF files that omit it. Per the ReqIF XSD,
LONG-NAME is use="optional" for SPEC-RELATION-TYPE — and every other
parser in this library already handles it as optional. This brings
SpecRelationTypeParser in line.

Test plan

  • python -m pytest tests/unit/ — 46 passed (3 new + 43 existing)

Refs

Reported via useblocks/ubconnect#155

Per the ReqIF XSD, LONG-NAME is `use="optional"` for SPEC-RELATION-TYPE.
The parser was treating it as required and crashing on spec-compliant
files. Brings SpecRelationTypeParser in line with the other spec-type
parsers (RelationGroupTypeParser, SpecObjectTypeParser,
SpecificationTypeParser), which already handle missing LONG-NAME with
a None fallback.

Refs: useblocks/ubconnect#155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants