CHANGELOG¶
v0.41.0 (2026-08-26)¶
:sparkles: Improvements¶
- Full-specialization capture across usage kinds. v0.40.0 fixed
attributeUsageonly; every other usage maker still used the typed-by-only_build_specialization(typed_by)helper, dropping:>,:>>, and::>specializations for actions, calculations, constraints, requirements, use cases, interfaces, and nested occurrences.
New _full_specialization_for_ctx(ctx) helper walks any usage-like
ANTLR context (ctx.usage()…, ctx.usageDeclaration()…, or any
<x>UsageDeclaration() holder) to its featureSpecializationPart and
builds the full dict via _build_full_specialization_from_fsp.
Twelve visitor sites now prefer it with the typed-by path kept as a
defensive fallback: use-case, calculation, constraint, requirement,
interface, analysis-case, assert/satisfy, objective-member,
constraint-declaration, nested-occurrence, action-element, and the
top-level usage-element dispatch.
-
API-level rendering.
Action.load_from_grammarnow captures all four specialization kinds into_typed_by_name/_specializes_names/_redefined_refs/_referenced_refs, and the hand-rolleddump()methods onAction,Interface,UseCase, andRequirementrender them:action a1 :> BaseType; action a2 ::> RefType; action a3 :>> RedefType;
The references keyword form canonicalizes to the ::> operator
form (matching grammar-side dump behavior).
Usage.redefined_namenow walks deeper declaration nestings (e.g. ActionUsageDeclaration -> UsageDeclaration -> FeatureDeclaration) so it works on Action usages, not just Attribute.
:white_check_mark: Verification¶
tests/redefined_name_test.py: 10 / 10 passing — adds API-level round-trip cases for actions covering all four kinds plus theredefined_namehelper on Action.- Fast suite (partial + redefined-name + grammar + class + main + navigate + repr + semantic + import): 410 passing, zero regressions.
v0.40.0 (2026-08-26)¶
:bug: Bug Fixes¶
References(:>/referenceskeyword) implemented in the grammar side. Previously theFeatureSpecializationdispatch ingrammar/classes.pyhad a silentprint("References not yet implemented")stub forReferencesrelationship items, so anyref attribute ::> X;/ref attribute references X;form lost its specialization on round-trip (dump emittedattribute ;with no::>/referenceskeyword). The visitor never emitted dicts forReferenceseither.
Fix:
- grammar/classes.py: new References class (mirrors
Redefinitions but with ::> / references keyword and
OwnedReferenceSubsetting children). The
FeatureSpecialization dispatch now routes References to it
instead of printing.
- antlr_visitor.py: References branch in both
_build_full_specialization_from_ctx and
_build_full_specialization_from_fsp (operator + keyword
forms). The top-level attributeUsage path in
_visit_usage_element_dict was the only one still using the
typed-by-only _build_specialization helper; it now uses
_build_full_specialization_from_ctx so the full specialization
list (Typings + Subsettings + Redefinitions + References) is
captured.
redefined_name and display_name already handled
References (via the referencedFeature fallback added in
v0.39.0), so this release brings the loader in sync with the
helpers — ref attribute ::> MyType; now round-trips and
attribute.redefined_name == "MyType".
:white_check_mark: Verification¶
tests/redefined_name_test.py: 8 / 8 passing — adds two new cases for the operator and keyword forms ofReferences.tests/grammar_test.py: 97 / 97 passing (was 96) — addstest_attribute_ref_references_operator_roundtripwhich exercises all four kinds (Typings, Subsettings, Redefinitions, References) in one model.- partial + grammar + class + main + navigate + repr + semantic + import: 397 / 397 passing (zero regressions on the fast suite).
- Conformance: 118 / 123 — identical failure set to v0.39.0 (no
regressions; the 5 pre-existing failures, including
Import_Visibility_Validwhose XPECT expects a syntax error, are unchanged).
v0.39.0 (2026-08-26)¶
:bug: Bug Fixes¶
-
Redefined / subset / referenced Usage name now reachable from Python. For
attribute :>> exampleAttribute = "Example Value";and similar:>/::>re-declarations, the user-visible identifier lives only in the grammar's re-declaration chain — not on the featureidentification.Usage.load_from_grammarpreviously returned a UUID sentinel in that case (attribute.name == "d68f2dc6-..."whiledump()correctly emittedexampleAttribute). Two new helpers expose the resolved name without touching the historicalself.namesemantics: -
Usage.redefined_name(property) — the last identifier segment of the firstRedefinitions/Subsettings/Referenceschain in the feature specialization. Returns""when no re-declaration is present. Usage.display_name(property) — user-meaningful name for the element. Identical toself.namewhen that field holds a real identifier; suppresses the auto-generated UUID sentinel so UI / log output stays clean.
self.name is unchanged (still the UUID sentinel when no
identification was given) so the symbol table, dump, navigation and
semantic analyzer behavior is preserved.
Motivating case (reported by a user):
attribute :>> exampleAttribute = "Example Value";
Before: attribute.name == "d68f2dc6-fa82-4828-8516-239b4aab1980".
After: attribute.redefined_name == "exampleAttribute" (and
attribute.display_name == "exampleAttribute").
:white_check_mark: Verification¶
tests/redefined_name_test.py: 6 / 6 new tests passing — covers the original two-package model, subset/redefinition/display helpers,get_value()still works, dump still emits the right text.tests/partial_test.py+tests/grammar_test.py+tests/class_test.py+tests/main_test.py+tests/navigate_test.py+tests/semantic_test.py+tests/repr_test.py+tests/import_test.py: 397 / 397 passing (zero regressions, includingTestBasicUndefinedDetection:: test_undefined_redefinitionwhich exercises the same re-declaration-from-bare-name path).- Conformance: 118 / 123 — identical failure set to v0.38.0 (no
regressions; the 5 failures, including
Import_Visibility_Validwhose XPECT expects a syntax error, were pre-existing).
v0.38.0 (2026-08-25)¶
:sparkles: New Features¶
-
Partial-parse recovery. New opt-in entry points surface whatever did parse when the input has syntax errors, instead of aborting with
SysMLSyntaxError: -
PartialParseError(exception) carries.errors,.partial(the visitor dict for the parsed part of the input), and.source. loads_partial(text)— same asloadsbut raisesPartialParseErroron errors; returns a clean dict on success.load_partial(text)— same asloadbut raisesPartialParseErrorwith the partial visitor dict (still round-trippable throughclasstree+dump) on errors.
Motivating case: validation/valid/Import_Visibility_Valid.sysml
(its XPECT header expects a parse error on the visibility-less
import ScalarValues;, which the grammar legitimately rejects).
Before: every loader in the test suite crashed on it. Now:
loads_partial returns a dict with the three valid imports and the
broken import dropped; load_partial gives you a Model whose
Dump() produces:
package ImportVisibility {
public import ScalarValues;
private import ScalarValues;
protected import ScalarValues;
}
The strict loads / load are unchanged — they still raise
SysMLSyntaxError on errors. ANTLR's default error-recovery
strategy is used only when the partial entry point is called.
:white_check_mark: Verification¶
tests/partial_test.py: 6/6 new tests passing.tests/grammar_test.py+tests/class_test.py+tests/main_test.py+tests/navigate_test.py+tests/semantic_test.py+tests/repr_test.py+tests/import_test.py: 391/391 passing (zero regressions).- Conformance: 118 / 123 — identical failure set to v0.37.0 (no
regressions; the 5 failures, including
Import_Visibility_Validwhose XPECT expects a syntax error, were pre-existing). The conformance test uses the strictload_grammarpath so its behavior is unchanged by this release.
v0.37.0 (2026-08-25)¶
:bug: Bug Fixes¶
Round-trip fixes found by benchmarking gosysml against the 123-file OMG
spec corpus (tests/sysmlv2/); Python now loads 122/123 corpus files
without exception (the one remaining failure, Import_Visibility_Valid.sysml,
has an XPECT header that expects a syntax error):
-
Implicit-package wrap could swallow its own closing brace.
load_grammarwraps non-packageinput inpackage __implicit__ { ... }by appending the closing brace to the raw source. When the source ended with a line comment and no trailing newline (e.g.Subsetting_OwningType.sysml), the brace landed on the comment line and was lexed away, producingmissing '}' at <EOF>. The wrapped source is now newline-terminated before the brace is appended. -
AnnotatingElementcrashed on metadata / textual representations. OnlyDocumentationandCommentSysMLwere dispatched; aMetadataFeatureorTextualRepresentationchild setchildren = Noneanddump()raisedAttributeError. Both now dispatch to their existing classes (which were present but unreachable) and unknown children dump as""instead of raising. -
BinaryInterfacePart.dump()IndexError on malformed interface ends (InterfaceUsage_Invalid.sysml). Now degrades gracefully for 0/1-end parts per the graceful-fallback contract. -
Missing grammar classes for action-body successions. The visitor has emitted
InitialNodeMember,ActionTargetSuccessionMember, andGuardedSuccessionMemberdicts since the control-flow work, but no matching grammar classes existed — any action body containingfirst X;/then Y;/if c then X else Y;raisedKeyErrorat load time (brokeActionTest.sysml,ControlNodeTest.sysml,DecisionTest.sysml). Three new classes match the visitor dict shapes exactly, includinghasSemitracking so chained successions re-emit their own semicolons. -
TriggerExpressionlost WHEN triggers and crashed on empty ones. The emitter only extracted(AT|AFTER) argumentMember; theWHEN argumentExpressionMemberalternative was dropped and a missing argument member crashed withTypeError: 'NoneType' object is not subscriptable.TimeTriggerKindgainedisWhen.
:sparkles: Improvements¶
then merge m;/decide/join/forkcontrol nodes now carry their declared name through the visitor (ControlNode.declaredName) and dump it back.- Guarded target successions (
if <cond> then X;) and default targets (else Y;) round-trip inside action bodies. - Nested
ref action a : A;usages keep theirrefprefix (_make_action_usage_elementnow extracts the occurrence prefix). succession S first A1 if x==0 then A2;round-trips including the succession name.ActionBodyItem.dump()appends the statement-terminating;for bare succession statements (skipped after{...}bodies or trailing doc comments).
:white_check_mark: Verification¶
tests/grammar_test.py: 96/96 passing (includes full-model round-trips of ActionTest, ControlNodeTest, DecisionTest which now produce byte-identical strip_ws output).- class/main/navigate/semantic/repr suites: all passing (268 tests).
- Conformance suite: 118 passed / 5 failed — identical failure set to the v0.36.3 baseline (no regressions).
v0.36.3 (2026-08-20)¶
:bug: Bug Fixes¶
- View (and other prefixed-usage) body children are now exposed on the
public API tree.
Package.load_from_grammar(indefinition.py) builtViewobjects forViewUsage/ViewDefinitionmanually — settinggrammarandnamedirectly but never callingload_from_grammar— soView.childrenstayed empty andview.attributes(along with every other typed accessor) returned[]even when the body containedattribute,part, etc. TheViewUsage/ViewDefinitionbranches now callView().load_from_grammar(...)/View(definition=True).load_from_grammar(...), matching howPartand the other occurrence usages are handled.
Two supporting fixes in usage.py make prefixed usages fully
round-trip:
- Usage.load_from_grammar — the declaration branch (taken by
prefixed usages such as ViewUsage, which carry their body directly
on grammar.body — a ViewBody / ViewDefinitionBody — rather
than nested under grammar.usage.completion.body.body) previously
hardcoded children = []. It now extracts the body children with
the same DefinitionBodyItem → member → element walk used by the
usage path.
- Usage._ensure_body — now handles grammars whose body lives
directly on grammar.body (a body object with a children list),
so dump() / re-serialization round-trips instead of raising
AttributeError: 'ViewUsage' object has no attribute 'usage'.
Regression tests added in tests/navigate_test.py (public-API
accessor + dump content) and tests/grammar_test.py (full
load_grammar → classtree → dump() round-trip).
v0.36.2 (2026-08-18)¶
:bug: Bug Fixes¶
Requirement.load_from_grammarnow preserves short name, doc, and nested children indump(). Three gaps in the publicRequirementclass (inusage.py) were dropping data that the parser had correctly captured:- Short name (
requirement <'1'> R { … }) —declaredShortNamewas read by the grammar layer but never propagated toself.req_shortname, sodump()emittedrequirement R;with no<'1'>. Now extracted for bothRequirementUsageandRequirementDefinition, with the<>wrappers stripped. - Doc (
doc /* … */) — the body walk visitedDefinitionBodyItemonly to look for nested requirements; theDocumentation/CommentSysMLnode insideAnnotatingElementwas walked past andself.docwas never set. New_extract_doc_from_body_itemhelper walksDefinitionBodyItem → DefinitionMember → DefinitionElement → AnnotatingElement → Documentationand extracts the comment text via the new_comment_body_to_textmodule helper (strips/* */and*line prefixes). - Nested children in
dump()—dump()built its body fromdoc/subject/actors/req_attributes/req_constraints/assume_constraintsbut never iteratedself.children, so nestedrequirementusages were silently omitted from the output even though they were correctly stored on the parent.dump()now appendschild.dump()for each child and indents multi-line body items (including multi-line doc blocks) so nested bodies render at the correct indentation level.
v0.36.1 (2026-08-17)¶
:sparkles: New Features¶
- Nested requirement children.
Requirement.load_from_grammarnow populatesself.childrenwith nestedrequirementusages andrequirement defdefinitions encountered in the body. Previously the body walk stubbed outDefinitionBodyItemwithpass, so nested requirements were parsed by the grammar but dropped from the public object tree. Deep nesting recurses correctly;.parentlinks are set on each child. Non-requirement nested elements (parts, items, attributes) are silently skipped for now. The grammar-object round-trip (load_grammar+classtree) is unaffected.
v0.36.0 (2026-07-18)¶
:sparkles: New Features¶
- Boxes-backed state-machine visualizer. New optional renderer
sysmlpy.boxes_viewproduces aboxesDiagram from a parsed SysML v2state def— true rounded-corner«state»UML nodes, filled-circle initial pseudostate, bullseye final state, orthogonal port-to-port routing, and SVG / braille terminal output. This is an alternative toas_state_transition_view()(PlantUML), for the case where you want native UML shapes and don't want to round-trip through Java. - Public API:
sysmlpy.as_state_transition_view_boxes(model, focus=None)→boxes.Diagramsysmlpy.render_state_transition_view(model, focus=None, routing=...)→ braille terminal stringsysmlpy.render_state_transition_view_svg(model, focus=None, routing=..., scale=...)→ SVG string- All three are lazy-imported so
import sysmlpycontinues to work withoutboxesinstalled (raisesImportErrorwith install hint on first call ifboxesis missing). - Adapter handles every state-machine construct that is actually in the
SysML v2 language (per spec §7.18,
formal/26-03-02, Sept 2025): entry;/entry action A;/do .../exit ...actions emitted asentry / A,do / A,exit / Aattributes in the state box- Implicit initial pseudostate via
entry; then X;succession donetarget →FinalStatebullseye node (one per region, reused)- Guarded transitions
transition T first A accept X if guard then B→ trigger and[guard]both appear in the edge label accept X then Y;shorthand (TargetTransitionUsage) — extracts trigger and target, back-fills source from the most-recently declared state in the region- Dotted feature-chain targets like
S2.S3— resolved through the fullOwnedFeatureChainingchain, not just the last chaining name - Nested composite states —
state R1 { state a; state b;… }parsed recursively; substates emitted as siblings with namespace-qualified names for now (visual nesting viaView.childrenis a future boxes enhancement) parallelcomposite states — whenisParallel=trueon the StateDefBody, the composite's «parallel» stereotype is emitted alongside «state»- Re-exports the boxes pseudostate classes for diagram-author code that
wants the state-machine vocabulary:
InitialPseudostate,JunctionPseudostate,ChoicePseudostate,ForkPseudostate,JoinPseudostate,FinalState,TerminatePseudostate,HistoryPseudostate,EntryPoint,ExitPoint,StateNode.
:bug: Fixes¶
grammar/classes.py:3909—DefaultInterfaceEnd.__init__was callingUsage(definition["usage"])even when the visitor emitted an emptyusage: {}dict (which happens forperform … ;lines inside aninterface … connect … { }body). This crashed the entire parse withAttributeError: This does not seem to be valid.Fixed by switching the guard fromis not Noneto truthy/non-empty. The official INCOSE SysML v2 PilotFlashlight Example.sysmlnow loads successfully end-to-end.
:books: Documentation¶
- New
docs/boxes_view.mdpage covering the boxes-backed state-machine visualizer: install, API, supported constructs, the SysML v2 spec landscape (which pseudostates were deliberately dropped from UML 1.x), and a worked example with the OMGStateTest.sysmlfixture. - Updated
README.mdanddocs/PROJECT_SUMMARY.mdto mention the new visualizer and the boxes optional dependency. STATUS.mdupdated with the v0.36.0 capabilities and test counts.
:white_check_mark: Tests¶
- New
tests/boxes_view_test.py(19 tests): state-machine collection, composite states,donefinal-state, guard label, parallel flag, entry/do/exit attribute rendering, full-omgStateTest.sysmlabridged extract, lazy attribute onsysmlpynamespace. - Pre-existing
tests/plantuml_test.pyfailures (test_as_element_table_basic,test_as_state_transition_view_basic) remain — they are unrelated to this work and predate it.
v0.34.1 (2026-06-23)¶
:bug: Fix standard library type resolution and add implicit import warnings¶
_is_resolved()now checks unqualified (simple) names against the library symbol index, so bare references likeReal,String,Integer,Booleanresolve without errors even without explicit imports.- Added
LibrarySymbolIndex.get_simple_names()with its own cache for efficient simple-name lookups. - Added
_KNOWN_LIBRARY_SIMPLE_NAMEShardcoded fallback derived from_KNOWN_LIBRARY_SYMBOLS. - New
IMPLICIT_LIBRARY_IMPORTwarning emitted when a standard library type is used without an explicit import, suggesting the user addimport ScalarValues::<Type>;orimport ScalarValues::*;. public import ScalarValues::*;at package level propagates to child scopes and suppresses all warnings.- All 118 semantic tests pass.
v0.34.0 (2026-06-18)¶
:exclamation: BREAKING: Remove deprecated SysML v1.x diagram functions¶
- Removed
as_block_definition_view()— BDD is a SysML v1.x diagram; useas_general_view()in SysML v2. - Removed
as_internal_block_diagram()— IBD is a SysML v1.x diagram; useas_interconnection_view()in SysML v2. - Removed
as_parametric_view()— Parametric Diagram is a SysML v1.x diagram; useas_action_flow_view()in SysML v2. - Removed
as_requirement_view()— Requirement Diagram is a SysML v1.x diagram; useas_general_view()in SysML v2. - Removed
as_package_diagram_view()— Package Diagram is a SysML v1.x concept; useas_package_view()oras_general_view(). - Removed orphan helpers:
_extract_constraint_parameters(),_extract_requirement_relationships(),_extract_connection_endpoints().
:sparkles: New Features¶
- Added
as_browser_view()— renders hierarchical model tree using PlantUML@startwbs(Work Breakdown Structure) syntax. Supportsfocus,elements,style,custom_style. - Exported
as_browser_viewfromsysmlpypackage (sysmlpy.as_browser_view()).
:white_check_mark: Tests¶
- Removed 34 tests covering removed v1 diagram functions.
- 120 plantuml tests pass (2 pre-existing unrelated failures remain).
- 350 core tests pass (class, main, repr, navigate, grammar, semantic).
v0.33.6 (2026-06-15)¶
:bug: Fix library import resolution with custom library paths¶
- Threaded
lib_rootsthroughSymbolTable.build_from_model()→_resolve_imports()→_resolve_single_import()→_resolve_membership_import()/_resolve_namespace_import() - LibrarySymbolIndex fallback now passes custom library paths to
get_symbols()instead of using only the default bundled library import CustomTypes::*now resolves correctly whenCustomTypesis in a user-provided library path- All 2 library project tests, 118 semantic tests passing
v0.33.5 (2026-06-15)¶
:bug: Fix bare end in interface def body — stop injecting spurious part keyword¶
- Removed
"PartUsage": "part"fromDefaultInterfaceEndkeyword mapping inantlr_visitor.py:9269 end e1 : Type;now round-trips correctly asend e1: Type;(no extrapart)end item e1/end port e1keywords preserved correctly- 3 previously-failing interface round-trip grammar tests now pass
- All 95 grammar tests, 232 core tests, 118 semantic tests passing
v0.33.4 (2026-06-15)¶
:sparkles: Portion kind (timeslice/snapshot/individual) parsing, PlantUML rendering, interface keyword preservation¶
- Filled
portionUsage/individualUsagevisitor gaps in 4 nested dispatch paths - Added
PortionUsagegrammar class withdump()/get_definition(), dispatch inStructureUsageElement.__init__ - Added
_make_portion_usage_prefix()visitor helper forPortionUsageContext - PlantUML
_get_stereotype()includesindividual/timeslice/snapshotprefixes - Fixed
DefaultInterfaceEndkeyword loss: visitor preservesitem/portkeywords in interface body ends - Fixed
DefaultInterfaceEnd.__init__for missing dict keys via.get() - 4 new tests: portion round-trip (2), port kind stereotype (1), interface round-trip (1)
v0.33.3 (2026-06-13)¶
:sparkles: Grid view fix, sequence/case PlantUML views, guards documentation¶
- Fixed
_format_table_rows_plantumlandas_relationship_matrix_view: replaced deprecatedsaltsyntax with rectangle-based layout (PlantUML 1.2024.7+ compatible) - Added
as_sequence_view()— maps action flows/messages to PlantUML sequence diagram - Added
as_case_view()— maps parts/actions to PlantUML use-case diagram - Created
docs/GUARDS.mddocumenting canonicalifkeyword and transition ordering - Added 6 regression tests for sequence/case views; updated 3 grid view tests
v0.33.2 (2026-06-12)¶
:bug: Fix PerformedActionUsage regression, accept double-quoted annotation strings¶
- Fixed
PerformedActionUsage.get_definition()referencingself.declarationinstead ofself.keyword/self.children(Bug 1) - Fixed
annotationDirectivevisitor to acceptDOUBLE_STRING("...") alongsideSTRING('...') (Bug 4) _make_view_usage_dictemitsViewBodydirectly for annotation body items
v0.33.1 (2026-06-12)¶
:bug: Fix guard keyword preservation in round-trip¶
- Fixed
GuardExpressionMember.get_definition()to preserveifkeyword - Reorganized README.md changelog to chronological order
v0.33.0 (2026-06-12)¶
:sparkles: View/Rendering round-trip, qualified-name subject, guard keyword, render state directives¶
- Closed render/rendering round-trip gaps:
RenderingUsagedispatch,ViewRenderingMember,ViewRenderingUsage,ViewDefinitionBody,ViewBody,RenderStateMembergrammar classes - Fixed 3 parser issues from
PARSING_ISSUES.md: - Qualified-name
subject(e.g.,subject a.b.c) guardasifaliasrender statedirectives- Removed author attribution
christophercox→mycr0ftin 8 files
v0.32.5 (2026-06-11)¶
:bug: Fix double-space in redefinition and typing dump output¶
- Fixed
:>>(double space after:>>) when no specialization follows - Fixed
:(double space after:) when no type name follows
v0.32.0 (2026-06-11)¶
:sparkles: Package imports exposed on public API¶
- Added
Package.importsproperty — returns grammar objects forImportandAliasMemberdeclarations within a package Package.load_from_grammar()now collects imports into a public-facing listPackage.add_import()syncs with the new._importslist- Imports now fully accessible in the public API while surviving round-trip (parse → dump → parse)
- 5 new tests in
TestPackageImportsProperty
v0.31.2 (2026-05-27)¶
:memo: Update README version notes and LOC diagram¶
- Added v0.31.0 and v0.31.1 entries to README version history
- Regenerated
loc_history.svg(89,715 LOC, 581 commits)
v0.31.1 (2026-05-27)¶
:bug: Fix pyproject.toml for CI compatibility¶
- Removed
allow_zero_version = truefrom[project]table (invalid PEP 621 field) - Removed duplicate
versionkey in[project](invalid per TOML spec) - Fixed
authorsformat for Poetry 2.1.x compatibility
v0.31.0 (2026-05-27)¶
:memo: Documentation Overhaul — Public API Showcase¶
All project documentation (README.md, docs/quickstart.md, TUTORIAL.md) has been
rewritten to showcase the modern public API, replacing all private underscore-prefixed
methods with their public equivalents.
Changes across all docs:
- _set_child() → add_child()
- _set_name() → set_name() / constructor name=
- _set_typed_by() → set_typed_by()
- type= parameter → sysml_type=
- Model().load(text) → loads(text)
- load_grammar() → loads()
New sections added to README:
- "Model Parsing" — loads() vs parse() with error handling
- "Model Navigation" — find(), find_one(), container protocol (__iter__, __len__,
__contains__), __str__, typed property accessors (model.parts, model.actions),
sysml_type= keyword with class support
- Semantic Analysis — AnalysisResult.errors/.warnings, result.raise_on_errors(),
bool(result), strict=True
Grammar round-trip status updated: - All 77 tests pass (100%) — removed the outdated "16 deferred tests" caveat
TUTORIAL.md:
- find_all() examples replaced with find() / find_one() / all()
- "Convenience Functions" renamed to "Model Navigation" (v0.30.2+)
- parse() added to loading functions table
- Table of base classes updated with public method names
docs/quickstart.md:
- Full sweep from old private API (_set_child, _set_name, _set_typed_by)
to public methods (add_child, constructor name=, set_typed_by)
- Model().load(text) pattern replaced with loads(text)
- Simplified imports (no more classtree in basic examples)
AGENTS.md: - Updated grammar test status from "61 pass" to "77 pass (100%)" - Removed "known expected failures" section - Updated test commands to run specific file sets
:white_check_mark: Test Results¶
- All core tests: 211/211 passing (class, main, repr, navigate, grammar, semantic)
- Grammar tests: 77/77 passing (100%)
- Semantic tests: 118/118 passing
v0.30.2 (2026-05-27)¶
:sparkles: Tier 3 — Polish¶
Jupyter _repr_html_() for all model elements (navigate.py)
- Added collapsible HTML tree representation: model in a Jupyter cell shows a
nested <details> tree with type badges and element names, making interactive
exploration much more pleasant.
Non-raising sysmlpy.parse() variant (__init__.py)
- Added parse(text) that returns (Model, []) on success and (None, [errors])
on syntax error — never raises. Ideal for IDE integrations, linters, and batch
processing pipelines.
Stabilized mutation API — private methods made public (usage.py, definition.py)
- add_child(child) — public alias for _set_child() (added in T2-1, now fully promoted)
- set_name(name) — public alias for _set_name()
- set_typed_by(defn) — public alias for _set_typed_by()
- set_specializes(*parents) — public alias for _set_specializes()
- set_subsets(*parents) — public alias for _set_subsets()
- set_redefines(parent) — public alias for _set_redefines()
- get_child(path) — public alias for _get_child()
- Old underscore-prefixed names kept for backward compatibility.
Fixed grammar = True placeholder in UseCase and Action (usage.py)
- Replaced self.grammar = True with self.grammar = None to avoid
AttributeError: 'bool' object has no attribute 'some_method' in downstream code.
Added return type annotations to all public functions
- loads() → Model, load() → Model, load_antlr() → Model
- Searchable.find() → list[Searchable], Searchable.all() → list[Searchable]
- Usage.dump() → str, Package.dump() → str, Model.dump() → str
- All Usage subclass __init__ methods now have parameter type annotations.
Documentation overhaul (README.md, docs/quickstart.md, TUTORIAL.md)
- All docs updated to use public API: add_child() instead of _set_child(),
set_name() instead of _set_name(), set_typed_by() instead of _set_typed_by(),
sysml_type= instead of type=, etc.
- New "Model Parsing" section (README) with parse() example.
- New "Model Navigation" section (README) with find(), find_one(), container
protocol (__iter__, __len__, __contains__), __str__, typed property
accessors (model.parts, model.actions, etc.), and sysml_type= keyword.
- Semantic Analysis section updated to show AnalysisResult.errors/.warnings,
result.raise_on_errors(), bool(result), and strict=True.
- TUTORIAL.md: find_all() examples replaced with find() / find_one() / all().
- docs/quickstart.md: full sweep from old private API to public methods.
:white_check_mark: Test Results¶
- All core tests: passing
- Grammar tests: 77/77 passing (100%)
- Semantic tests: passing with new AnalysisResult/strict tests
- Navigate tests: passing with new find_one/container tests
v0.30.1 (2026-05-27)¶
:sparkles: Tier 1 — High Impact, Trivial Effort¶
Exported SysMLSyntaxError from package root (__init__.py)
- from sysmlpy import SysMLSyntaxError now works — no more reaching into
sysmlpy.antlr_parser internals.
Fixed stale load() and load_antlr() docstrings (__init__.py)
- Both said "Returns: dict" but actually return Model. Fixed.
- Added proper return type annotations.
Removed print() side effect on parse error (__init__.py)
- Library code no longer prints to stdout when a SysMLSyntaxError is raised.
The exception message already contains the full error text — the print was
redundant and polluted CI pipelines.
Added find_one() to Searchable mixin (navigate.py)
- model.find_one('Engine') returns the element or None (never IndexError).
- Raises LookupError when multiple matches are found.
:sparkles: Tier 2 — High Impact, Medium Effort¶
Public add_child() method (usage.py, definition.py)
- parent.add_child(child) appends child and sets child.parent.
- Returns self for fluent chaining: pkg.add_child(Part(...)).add_child(Part(...))
- Old _set_child() kept as backward-compatible alias.
Container protocol — __iter__, __len__, __contains__ (navigate.py)
- for child in model: — iterate over direct children
- len(model) — number of direct children
- 'Engine' in model — True/False by child name or identity
__str__ returns SysML text (usage.py, definition.py)
- str(part) → 'part engine;' instead of "Part(name='engine')"
- repr(part) still returns the constructor-mirroring form.
AnalysisResult and strict=True (semantic.py)
- analyze() now returns AnalysisResult (subclass of list, fully backward-compatible)
- result.errors — only error-severity issues
- result.warnings — only warning-severity issues
- result.raise_on_errors() — raises ValueError if errors exist
- bool(result) — True when no errors (warnings are OK)
- analyze(model, strict=True) — raises immediately on any error
Renamed type= parameter to sysml_type= (navigate.py)
- model.find(sysml_type='part') replaces model.find(type='part')
- Old type= keyword emits DeprecationWarning but still works
- all(sysml_type=Part) and find_one(sysml_type='action') also support the new name
:white_check_mark: Test Results¶
- All core tests: passing
- Grammar tests: 77/77 passing (100%)
- New tests:
find_one(),add_child()chaining, container protocol,__str__vs repr,AnalysisResult,sysml_type=deprecation — all passing
v0.30.0 (2026-05-27)¶
:sparkles: Constructor-Mirroring __repr__ for All Public API Classes¶
Every public-facing class now has a __repr__ that reads like a constructor call,
making debugging in REPLs and notebooks vastly more informative.
Fixed Usage.__repr__ (usage.py)
- Replaced flawed hasattr(self.grammar, 'definition') heuristic with self.is_definition
— 13 of 24 usage/definition classes (Action, State, Constraint, Requirement, UseCase,
Calculation, Enumeration, View, Viewpoint, Concern, Case, AnalysisCase, VerificationCase)
previously silently dropped definition=True from their repr.
- Added _is_uuid() helper — auto-generated UUID names are suppressed.
Part() now prints Part() instead of Part(name='f8a3...96b1').
- Added definition-path shortname lookup so Part(definition=True, name='Engine', shortname='E')
works correctly for API-constructed objects.
Fixed Package.__repr__ (definition.py)
- UUID names suppressed for Package() constructed without a name.
Added __repr__ to Store classes (store.py)
- InMemoryStore() → InMemoryStore(elements=0, edges=0)
- NetworkXStore(directed=True) → NetworkXStore(nodes=0, edges=0, directed=True)
- KuzuStore(database=':memory:') → KuzuStore(database=':memory:')
- CayleyStore(host='localhost', port=64210, label='sysmlpy') → mirrors constructor
Added __repr__ to Semantic classes (semantic.py)
- SymbolTable() → SymbolTable(symbols=0, children=0)
- SemanticAnalyzer() → SemanticAnalyzer()
:white_check_mark: Tests¶
- Added
tests/repr_test.pywith 33 tests covering all repr changes.
:white_check_mark: Test Results¶
- repr tests: 33/33 passing
- All core tests: 200/200 passing (class, main, repr, semantic)
- Grammar tests: 77/77 passing (100%)
v0.29.0 (2026-05-26)¶
:tada: Complete Control Flow Node Support¶
ALL 77 GRAMMAR TESTS PASSING (100%)
All 14 control flow tests now passing:
- TerminateNode, SendNode (basic + via/to)
- ControlNode (merge, decision, fork, join)
- IfNode (basic, else, elseif/else)
- WhileLoopNode (while, loop, with until)
:white_check_mark: Test Results¶
- Grammar round-trip tests: 77/77 passing (100%)
- Control flow tests: 14/14 passing (100%)
- All tests: 140/140 passing (100%)
v0.28.2 (2026-05-26)¶
:sparkles: Control Flow Node Support (Partial)¶
- :sparkles: Added
TerminateNodegrammar class - Supports
terminate { action ...; }syntax in action bodies - Follows same pattern as SendNode/AcceptNode classes
-
Fixes
test_Terminate_Node(1 of 14 control flow tests) -
:bug: Fixed
ActionNodeUsageDeclaration.dump() - No longer outputs "action" keyword when declaration is None
- Fixes
test_Send_Noderound-trip forsend msg { ... }syntax - The "action" keyword is only output when there's an explicit declaration
:white_check_mark: Test Results¶
- Grammar round-trip tests: 64/77 passing (83.1%)
- Control flow tests: 2/14 passing (TerminateNode, SendNode basic)
- All non-control-flow tests: 63/63 passing (100%)
:memo: Known Remaining Issues¶
12 control flow tests still failing: - SendNode with via/to (EmptyParameterMember structure) - IfNode (3 tests) - condition expression handling - WhileLoopNode (3 tests) - condition + until clause - ControlNode (4 tests) - merge/decision/fork/join keywords - ForLoopNode (1 test) - iteration syntax
v0.28.1 (2026-05-26)¶
:bug: PlantUML 1.2024.7+ Compatibility Fixes¶
- :bug: as_element_table() — Changed from
|=table syntax to rectangle-based layout - Fixes "Syntax Error? (Assumed diagram type: sequence)" in generated images
-
All table rows now render as stacked rectangles
-
:bug: as_state_transition_view() — Use
statekeyword instead ofrectangle - Added initial state marker (
[*]) pointing to first non-terminal state - Added final state markers (
--> [*]) for terminal states (Error, Stopped, Final) -
Fixes "syntax error (Assumed diagram type: state)" in generated images
-
:bug: as_internal_block_diagram() — Removed
boundary { }compartment syntax - PlantUML 1.2024.7+ removed support for compartment syntax in class diagrams
- Ports now render as simple nested rectangles inside block
-
Fixes "syntax error (Assumed diagram type: class)" in generated images
-
:bug: Tabular Views — Changed default output format from
"plantuml"to"markdown" as_tabular_view()— Default:"markdown"as_data_value_tabular_view()— Default:"markdown"as_relationship_matrix_view()— Default:"markdown"- PlantUML 1.2024.7+ removed support for legacy table syntax
-
Markdown and HTML formats work universally across all versions
-
:bug: Legend Tables — Changed all 11 legend definitions from table format to plain text
- Changed
|= Relationship |= Notation |toRelationship: Notation - Ensures legends render in all PlantUML versions
:wastebasket: Cleanup¶
- Removed 14 stale/duplicate PlantUML example files
- All 10 PNG examples referenced in README.md verified to render without errors
:white_check_mark: Verification¶
All PlantUML examples render without errors: - ✓ 03-vehicle-structure.png - ✓ 06-interconnection.png - ✓ 07-general-view.png - ✓ 08-package-view.png - ✓ 11-internal-block-diagram.png - ✓ 13-action-flow-view.png - ✓ 14-state-transition-view.png (now with start/end markers) - ✓ 15-tree-diagram.png - ✓ 16-element-table.png - ✓ 17-textual-notation.png
v0.28.0 (2026-05-26)¶
:sparkles:¶
-
:sparkles: Gap 10 Complete — Missing Grammar Classes Added
TextualRepresentation,MetadataFeature,MetadataFeatureDeclaration, andOccurrenceUsageBodygrammar classes with fulldump()andget_definition()support. Updated ANTLR visitor to dispatch textual representation and metadata feature annotations. -
:sparkles: Gap 11 Complete — Expression Resilience Replaced final
return NotImplementedErrorinInterfaceEnd.__init__with graceful warning print. All expression operators now handle edge cases without raising exceptions. -
:sparkles: Package Diagram View (
as_package_diagram_view) Complete implementation of SysML v2 Package diagrams. Shows package hierarchy with elements nested inside their containing packages (folder-style rendering). Supportsfocus,style(bw/color),direction,include_legend,show_element_types, and handles deeply nested packages. Added 7 tests intests/plantuml_test.py. -
:sparkles: Parametric Diagram View (
as_parametric_view) Complete implementation of SysML v2 Parametric diagrams. Shows constraint definitions with parameter compartments (including types likeReal), supports nested package traversal, focus element, style options (bw/color), and legend. Added 7 tests intests/plantuml_test.py. -
:sparkles: Internal Block Diagram View (
as_internal_block_diagram) Complete implementation of SysML v2 Internal Block Diagrams. Shows block boundary with ports, nested parts, flow connections with source/target arrows, and connection usage with blue connector arrows. Supportsfocus,style(bw/color),direction,show_parts,show_ports,show_connections, and custom styling. Added 6 tests intests/plantuml_test.py. -
:sparkles: Block Definition Diagram View (
as_block_definition_view) Complete implementation of SysML v2 Block Definition Diagrams. Shows block definitions with compartments for attributes, ports, and part references. Displays generalization relationships. Added 8 tests intests/plantuml_test.py. -
:sparkles: Send/Accept Action Usage Handling (Gap 6) Full implementation of send/accept actions in action bodies. Added grammar classes
SendNode,AcceptNode,IfNode,WhileLoopNode,ForLoopNode,ControlNodeand corresponding declaration classes. Visitor extracts signal/event names and creates nested Action children (e.g.,send_MySignal,accept_TriggerEvent). -
:sparkles: Library Import Loading (Gap 8) Implemented library loading mechanism in
antlr_parser.parse(). Whenlibraryparameter is provided, all.sysmland.kermlfiles from library directories are loaded and prepended to content before parsing. Enables standard library definitions for import resolution. -
:sparkles: Code Deduplication (Gap 5) Created
_extract_name_from_ident()helper function and refactored 7+ locations inantlr_visitor.py. Reduced code duplication by ~150 lines.
:bug:¶
- :bug: Fixed
PackageBody.dump()format - consistent brace formatting - :bug: Fixed
RootNamespace.get_definition()- clarified SysML vs KerML handling - :bug: Fixed
InterfaceEnd.__init__- replacedreturn NotImplementedErrorwith warning print
:white_check_mark:¶
- :white_check_mark: All 144 PlantUML tests passing
- :white_check_mark: All 190 tests passing (class, main, plantuml)
- :white_check_mark: 61 / 77 grammar round-trip tests pass (16 deferred control-flow)
:memo:¶
- :memo: Updated
TODO-gaps.md- Gap 4, 10, 11 now 100% complete - :memo: Zero TODOs remaining in codebase
v0.27.2 (2026-05-25)¶
:sparkles:¶
-
:sparkles: Requirement View (
as_requirement_view) Renders requirement diagrams with stereotypes (<<requirement>>,<<requirement def>>), documentation notes, attributes, and constraints. Supports satisfy/verify/derive/refine relationship extraction. Includes all standard view parameters:focus,elements,style(bw/color),direction,max_depth,show_external, and custom styling. Added 8 tests. -
:sparkles: Interface/UseCase/Message name extraction + visitor support Added
load_from_grammar()methods toInterface,UseCase, andMessageclasses. Added_make_use_case_usage_dict()and_make_message_dict()to antlr_visitor.py. FixedInterface.connectionsattribute conflict with Searchable mixin property. UseCase and Message now parse correctly from SysML text.
:white_check_mark:¶
- :white_check_mark: All 116 PlantUML tests passing
- :white_check_mark: All 60 class/main tests passing
- :white_check_mark: 61 / 77 grammar round-trip tests pass (16 deferred control-flow)
:memo:¶
- :memo: Updated
TODO-gaps.mdwith completion status for Requirement View and Interface/UseCase/Message visitor support.
v0.27.0 (2026-05-25)¶
:sparkles:¶
-
:sparkles: General View (
as_general_view) Renders all SysML v2 element types (packages, parts, items, ports, actions, states, connections, flows, requirements, constraints, calculations, etc.) with stereotype-based styling. Supportsfocus,elements,max_depth,show_external,auto_include_connections,direction, B&W/color toggle, and legend. -
:sparkles: Package View (
as_package_view) Renders package structure with contained definitions, usages, and cross-package import/dependency arrows. Supports filtering by focus package and depth control. -
:sparkles: Tabular View (
as_tabular_view) GridView specialization that renders model elements as a table. Supports PlantUML, Markdown, and HTML output formats. Columns are configurable; defaults to name, type, and description. -
:sparkles: Data Value Tabular View (
as_data_value_tabular_view) GridView specialization focused on attribute values. Renders attributes with name, type, value, and units columns. Supports PlantUML, Markdown, and HTML output. -
:sparkles: Relationship Matrix View (
as_relationship_matrix_view) GridView specialization that renders a matrix of relationships between two sets of elements. Supports PlantUML, Markdown, and HTML output. -
:sparkles: Grammar resilience — 68+
NotImplementedError→ graceful handling Everyraise NotImplementedErroringrammar/classes.pyhas been replaced with either real field storage +dump()/get_definition()support, or a warning print that silently skips the unrecognized element. The parser no longer crashes on edge cases. Key stubs fully implemented:PortionKind,PrefixMetadataMember,LifeClassMembership. Missing classes added:DefinitionBody,DefinitionBodyItem,FeatureSpecializationPart,SubclassificationPart.
:white_check_mark:¶
- :white_check_mark: 108 PlantUML tests passing (up from 101 in v0.26.0)
- :white_check_mark: 61 / 77 grammar round-trip tests pass (16 deferred: action control-flow node classes not yet ported)
- :white_check_mark: All 123 OMG XPect conformance tests pass (100%)
:memo:¶
- :memo: Updated README.md, STATUS.md, and docs/PROJECT_SUMMARY.md for v0.27.0
- :memo: Added AGENTS.md — guidance for AI coding agents working on sysmlpy
v0.19.0 (2026-05-22)¶
:sparkles:¶
-
:sparkles: Semantic analysis engine with undefined symbol detection New
analyze()function walks the parsed model tree, builds a hierarchical symbol table, and cross-references all type, subsetting, and redefinition references against defined symbols. -
:sparkles: Import resolution Resolves
import Package::*(namespace),import Package::Element(membership), andimport Package::*::**(recursive) imports. Imported symbols become visible in the importing scope. -
:sparkles: SymbolTable with hierarchical scope resolution Each package and definition creates a child scope. References resolve through parent scopes. Qualified names like
P::AandOuter::Inner::DeepPartresolve correctly across arbitrary depth. -
:sparkles: 80+ standard library symbols whitelisted ScalarValues, ISQ quantities, and base KerML/SysML types are pre-recognized so they don't trigger false positives.
:white_check_mark:¶
- :white_check_mark: 530 tests passing (43 semantic tests, 6 new import tests)
- :white_check_mark: SemanticIssue dataclass with severity, code, message, element, reference
:memo:¶
- :memo: Updated README.md with Semantic Analysis section, import resolution documentation, and symbol resolution capabilities.
v0.17.1 (2026-05-21)¶
:sparkles:¶
- :sparkles: CayleyStore — graph database backend via HTTP API Supports BoltDB, LevelDB, and in-memory Cayley backends. Stores elements as quads (subject, predicate, object, label). Provides namespace isolation via labels for multi-tenant scenarios. Full Store protocol implementation: put, get, delete, children, parents, relationships, query, has, ids, clear, plus graph traversal (descendants, ancestors, path), connected components, cycle detection, centrality, subgraph extraction, and GraphML export.
:bug:¶
-
:bug: NetworkXStore.put() now adds the node before adding edges Previously, put() only created edges when parent_id was provided, but never stored the node data itself. This caused get() to return None, delete() to return False, query() to find nothing, and all graph operations to fail silently.
-
:bug: Usage.init() now initializes completion to UsageCompletion() Previously, programmatic API created Usage with completion=None while the parser always created a UsageCompletion. This caused set_value() to crash with AttributeError and dump() to omit the semicolon, breaking round-trip consistency for Item, Part, Port, and Attribute.
:white_check_mark:¶
- :white_check_mark: 100% test suite pass rate (487/487) All 56 grammar round-trip tests pass. All 123 OMG XPect conformance tests pass. All 82 store tests pass (including NetworkX). All 53 class tests pass (programmatic API). All 16 import tests pass.
:memo:¶
- :memo: Updated README.md with v0.17.0 release notes, CayleyStore documentation, storage backend comparison table, and Docker examples.
- :memo: Updated docs/index.md and docs/quickstart.md with Cayley storage backend documentation.
v0.16.0 (2026-05-21)¶
:sparkles:¶
- :sparkles: 100% grammar round-trip test coverage (56/56)
Added support for analysis case usage with subject/objective members,
trade study analysis examples, calculation redefinition (
calc :>> name), case body items (subjectMember, objectiveMember, actionBodyItem, returnParameterMember), and nested calculation usages within analysis bodies.
:bug:¶
- :bug: ImportPrefix now allows imports without explicit visibility Per SysML v2 spec, imports without a visibility keyword default to private. Previously raised ValueError requiring explicit visibility.
:white_check_mark:¶
- :white_check_mark: Grammar round-trip tests: 34/56 → 56/56 passing
- :white_check_mark: Import visibility tests updated to reflect correct behavior
:memo:¶
- :memo: Updated README.md with v0.16.0 release notes
v0.1.0 (2026-05-17)¶
:ambulance:¶
-
:ambulance: Added configuration to workflow (
e8b932b) -
:ambulance: Correct workflow yaml (
8c410ee) -
:ambulance: Fix for attribute change when adding units (
1daacac) -
:ambulance: Fix for build script (
4c6f238) -
:ambulance: Fix to upload to pypi (
3309eb5) -
:ambulance: Fixed critical grammar changes with SysML and KerML overwrites. (
34978bb) -
:ambulance: Fixing merge errors from black (
e101e70) -
:ambulance: Permissions fix (
8c5ea13)
:bug:¶
-
:bug: Added test and definition file that was causing the error. (
b7787d4) -
:bug: Adding textx to requirements. (
d3c1c76) -
:bug: Commiting all prior changes. (
db0be56) -
:bug: Duplicate feature chaining in primary expression. (
8217463) -
:bug: Enforce some syntax with Models always starting with packages. (
0cccdf1) -
:bug: Fix for definition naming. (
ff62dc1) -
:bug: Fix poetry build for pypi builds. (
3c90e28) -
:bug: Fixed an issue where something defined within a package could not be typed by another definition (
ee257eb) -
:bug: Fixed changes to primary expression in attribute (
ace773c) -
:bug: Fixed issue with port subnodes. (
67720b1) -
:bug: Fixed issue with Primary expression get definition response. (
5512466) -
:bug: Fixed issue with usage classes with body objects. (
afc5522) -
:bug: Fixes for load_grammar functions. (
0e45818) -
:bug: Removing optional from in flow statement that won't return programmatically. (
716961b) -
:bug: Reverting change to author. (
ae5d19e) -
:bug: Updated secondary primary expression in attribute. (
97f2086) -
:bug: Workflow fixes (
9b883ea)
:chart_with_upwards_trend:¶
- :chart_with_upwards_trend: Add lines of code history plot
(
4b86c9c)
:construction:¶
-
:construction: Adding more documentation and cleanup (
8a8675e) -
:construction: Fix yaml (
0fc1c2f) -
:construction: Fixes and updates to CI/CD (
c0640f1) -
:construction: Forgot to git pull (
4cf3100) -
:construction: More adds. (
42258b6)
:heavy_plus_sign:¶
-
:heavy_plus_sign: Adding pytest-html to test workflow. (
4f2cedc) -
:heavy_plus_sign: Using poetry package management, added dependencies. (
5c625dd)
:lock:¶
-
:lock: Switch PyPI publishing to Trusted Publishing (OIDC) (
64b6325) -
Remove PYPI_API_TOKEN dependency — uses GitHub OIDC instead - Add id-token: write permission for OIDC token minting - Update actions to v4/v5/v9 latest versions - Clean up codecoverage job Python version - Remove repository_password from semantic-release step
:memo:¶
-
:memo: Add LOC history plot to README (
4582c59) -
:memo: Add optional dependencies to README, bump version to v0.12.0 (
9fbf40a) -
:memo: Added full docstrings to init (
0e06f1d) -
:memo: Added trello to Readme (
26e304c) -
:memo: Adding more badges. (
76899b1) -
:memo: Docstring coverage add to README (
3720f3a) -
:memo: Documentation changes. (
edfd629) -
:memo: Fixes for README that were out of date. (
e57a964) -
:memo: Fixing spacing. (
25e78d0) -
:memo: remove excess brackets (
e258d1c) -
:memo: Time to add documentationgit add docsgit add docs (
f933521) -
:memo: Updates to project info to assist sphinx build. (
939d2ff) -
:memo: Updates to readme, also added a loadfromgrammar function to Usage. (
e999436) -
:memo: Updates to version (
208cdd6)
:robot:¶
-
:robot: Add coverage badge (
413323d) -
:robot: Add coverage badge (
199fa49) -
:robot: Add coverage badge (
55e4a86) -
:robot: Format code with black (
5d6c2b7) -
:robot: Format code with black (
698816d) -
:robot: Format code with black (
31bde37) -
:robot: Format code with black (
02c18a9) -
:robot: Format code with black (
dc47ac1) -
:robot: Format code with black (
6a9e45b) -
:robot: Format code with black (
854bc64) -
:robot: Format code with black (
c848b0d) -
:robot: Format code with black (
52ddedd) -
:robot: Format code with black (
cc74fa0) -
:robot: Format code with black (
99b33a3) -
:robot: Format code with black (
81be427) -
:robot: Format code with black (
9f8a1d7) -
:robot: Format code with black (
904332e) -
:robot: Format code with black (
683bf47) -
:robot: Format code with black (
c96819b) -
:robot: Format code with black (
c8eb269) -
:robot: Format code with black (
9af94da) -
:robot: Format code with black (
37d9c36) -
:robot: Format code with black (
320a6a9) -
:robot: Format code with black (
22b38bd) -
:robot: Format code with black (
aeaf778) -
:robot: Format code with black (
7a24a97) -
:robot: Format code with black (
fd62a35) -
:robot: Format code with black (
e38b669) -
:robot: Format code with black (
0449f57) -
:robot: Format code with black (
df738a0) -
:robot: Format code with black (
cba4687) -
:robot: Format code with black (
c3d3a59) -
:robot: Format code with black (
30efad4) -
:robot: Format code with black (
2009f90) -
:robot: Format code with black (
a5d91c6) -
:robot: Format code with black (
66a1f15) -
:robot: Format code with black (
9e4b07b) -
:robot: Format code with black (
5eac5cd) -
:robot: Format code with black (
b609c87) -
:robot: Format code with black (
232a31e) -
:robot: Format code with black (
e8fe82b) -
:robot: Format code with black (
1d68ffc) -
:robot: Format code with black (
a2a8e6e) -
:robot: Format code with black (
5ca03d1) -
:robot: Format code with black (
57f8869) -
:robot: Format code with black (
d308126) -
:robot: Format code with black (
b32445c) -
:robot: Format code with black (
9871bdd) -
:robot: Format code with black (
a6a8f1a) -
:robot: Format code with black (
400078b) -
:robot: Format code with black (
b3fa4b1) -
:robot: Format code with black (
e187adb) -
:robot: Format code with black (
8f1004f) -
:robot: Format code with black (
bd4ad15) -
:robot: Format code with black (
1937b6e) -
:robot: Format code with black (
95a70fe) -
:robot: Format code with black (
0ea0415) -
:robot: Format code with black (
b87f1bf) -
:robot: Format code with black (
2baf295) -
:robot: Format code with black (
24e051d) -
:robot: Format code with black (
4dcc4c9) -
:robot: Format code with black (
1651fdb) -
:robot: Format code with black (
0b70bbc) -
:robot: Format code with black (
3cc027b) -
:robot: Format code with black (
f85c2a5) -
:robot: Format code with black (
90398e1) -
:robot: Format code with black (
dd46136) -
:robot: Format code with black (
27522bd) -
:robot: Format code with black (
ea661dc) -
:robot: Format code with black (
a90c5e9)
:sparkles:¶
-
:sparkles: Action definition with 2 of 4 tests complete. (
9530eed) -
:sparkles: Add experimental ANTLR4 parser for SysML v2 (
5af2ec5) -
Add ANTLR4 Python runtime dependency - Download grammar from daltskin/sysml-v2-grammar (OMG v2026.03.0) - Generate Python parser from .g4 grammar files - Create antlr_parser.py with parse() and parse_file() functions - Create antlr_visitor.py to convert parse tree to textX-compatible dicts - Add load_antlr(), loads_antlr(), load_grammar_antlr() to public API - Update Model.load() to support both textX and ANTLR4 parsers - Fix Package.load_from_grammar() to handle various element types - Update Usage.load_from_grammar() for Requirement/UseCase formats - Add documentation in src/sysml2py/antlr/README.md - Update main README with new parser option
This provides a pure Python alternative to Java/TypeScript SysMLv2 parsers by using grammars auto-generated from the OMG specification.
-
:sparkles: Added a new base model class to replace collapse function. Model will create packages and other custom classes for use. Additionally, packages can be created from grammar. (
3dc5fca) -
:sparkles: Added all calculation grammar classes and tests that pass. (
393fa4c) -
:sparkles: Added port with ability to create subfeatures with directionality. (
94c0a19) -
:sparkles: Added some rollup classes the abstract underlying grammar. They have functions to manipulate the grammar. (
b1e01a4) -
:sparkles: Adding analysis grammar and tests. (
9400f9b) -
:sparkles: Adding constraint grammar and tests. (
6212fd0) -
:sparkles: Adding first action definition grammar classes. (
3454a50) -
:sparkles: Adding flow grammar and test. (
4fe01c9) -
:sparkles: Adding grammar for expressions. (
f69c1ef) -
:sparkles: Adding requirement grammar classes and tests. (
0d73498) -
:sparkles: Flow Connector added to grammar and initial test built. (
872b76d) -
:sparkles: Migrate documentation from Sphinx to MkDocs (
0f55e99) -
Replace Sphinx (RST, autodoc) with MkDocs Material theme - Flatten docs/source/ into docs/ with symlinks to root-level docs - New mkdocs.yml with Material theme, light/dark mode, code copy - New docs/index.md landing page - Update release.yml CI workflow to use mkdocs build + gh-pages - Remove: conf.py, index.rst, Makefile, make.bat, IMPLEMENTATION_STATUS
-
:sparkles: More badge for readme. (
4be8d54) -
:sparkles: More tests and classes. (
cd59e2e) -
:sparkles: More tests. (
41d1f5e) -
:sparkles: New package class. (
3766690) -
:sparkles: Partial addition of constraint grammar classes (
5fc5c23) -
:sparkles: State grammar classes initial implementation with first test. (
61d3df1) -
:sparkles: State grammar with appropriate tests. (
b896efe) -
:sparkles: v0.10.0 - 99% conformance pass rate (122/123), add get_definition() to 25+ grammar classes, fix visitor bugs, add state/requirement/constraint support (
e5784d5) -
:sparkles: v0.11.0 - 100% conformance (123/123), rename project to sysmlpy (
cd7818e)
Grammar fixes: - Add LPAREN AS typeReference RPAREN for (as Type) cast syntax - Add ownedExpression DOT bodyExpression for lambda/filter expressions - Handle filterPackage imports in visitor - Fix interface_part UnboundLocalError - Add get_definition() to SuccessionFlowConnectionUsage - Add CaseDefinition to DefinitionElement dispatch - Fix UsageExtensionKeyword keyword field
Documentation: - Update README, STATUS, TODO, TUTORIAL for v0.11.0 - Update all conformance results to 100%
Rename: - sysml2py -> sysmlpy (package, imports, docs, CI/CD)
- :sparkles: v0.12.0 - Storage abstraction layer, graph backend, convenience functions
(
61222d0)
New features: - Store protocol (ABC) with InMemoryStore and NetworkXStore backends - Element identity via stable UUIDs - Typed relationships (parent_child, typed_by, specializes, etc.) - Graph analysis: connected_components, cycles, centrality, shortest paths - Convenience functions: find_all, count, traverse, to_dict, to_graph, path_between - networkx as optional dependency: pip install sysmlpy[graph]
Bug fixes: - Parent references now set correctly for nested children in load_from_grammar - path_between handles list return from find()
Tests: - 82 new store tests (all pass) - 122 existing tests (all pass) - 37 conformance tests (all pass)
-
:sparkles: v0.9.0 - Add explicit transition support and bump version (
baf4cca) -
Support 'transition name first X then Y;' syntax via TransitionUsageMember - Transition class now has .name, .source, and .target attributes - State.load_from_grammar() handles TransitionUsageMember alongside TargetTransitionUsageMember - Add .parent property to all elements (Usage, Model, Package, Transition) - Add State machine Python API (.transitions, .entry_actions, .exit_actions, .do_actions) - Fix EmptySuccessionMember/EmptySuccession null handling - Fix trigger extraction from PayloadParameter.children - Add get_definition() to PerformedActionUsage and PerformActionUsageDeclaration
:white_check_mark:¶
-
:white_check_mark: Add get_definition() to 18 grammar classes for conformance tests (
2ae53f0) -
Added get_definition() to: BasicUsagePrefix, BindingConnector, EmptySuccession, EmptySuccessionMember, FlowEnd, FlowEndMember, FlowEndSubsetting, FlowFeature, FlowFeatureMember, FlowRedefinition, OccurrenceUsagePrefix, DefaultInterfaceEnd, OccurrenceDefinitionPrefix, EndFeatureUsage, EndUsagePrefix, ConnectorPart, BinaryConnectorPart, BasicDefinitionPrefix - Fixed EmptySuccession, EmptySuccessionMember, and BindingConnector init to handle None/missing keys gracefully - simpletests conformance: 11/37 -> 16/37 passing (43%)
-
:white_check_mark: Added final training example tests for action definition. (
a399f5b) -
:white_check_mark: Added test, updated workflow (
b21d14b) -
:white_check_mark: Added two additional tests for expressions, tests all pass. (
afae042) -
:white_check_mark: Adding child as optional to get def functions. (
da90c49) -
:white_check_mark: Adding import test, namespaces are bugged. (
6d35922) -
:white_check_mark: Completed tests for state grammar. (
2c2213c) -
:white_check_mark: Correcting tests (
fba8dce) -
:white_check_mark: Fix AnalysisTest and add missing get_definition() methods (
5eb1598) -
Add analysisCaseUsage and caseUsage handling to _visit_usage_element_dict for top-level package member parsing - Fix visitor output: CaseUsageDeclaration -> CalculationUsageDeclaration - Fix visitor output: CaseBody ownedRelationship -> item - Rename Requirement.attributes -> req_attributes and Requirement.constraints -> req_constraints to avoid conflict with Searchable mixin properties - Add get_definition() to: SubjectMember, SubjectUsage, ObjectiveMember, ObjectiveRequirementUsage
simpletests conformance: 16/37 -> 19/37 passing (51%)
-
:white_check_mark: Grammar changes now pass all tests. (
7771f05) -
:white_check_mark: Package tests added. (
803192b) -
:white_check_mark: Second example test for flow connector. (
7d00034)
:zap:¶
-
:zap: Adding code coverage badge to readme. (
c72fe86) -
:zap: Now loads from a single compiled grammar file that overwrites any previous grammar from imports. (
2f90c7b) -
:zap: Removing commits to push off main, should not run into pull error for semantic parsing (
77272f3) -
:zap: Removing excess lines from code coverage. (
442bc0c)
Other¶
-
:arrow_up: Fixing issue with dependencies and cython3 failing (
bb4feb6) -
:arrow_up: Fixing issue with dependencies for astropy (
ac3b2ee) -
:arrow_up: Merge from main and add astropy to main dependencies to handle units. (
98f260b) -
:art: Updating semantic parsing with lessons learned from windstorm (
2f66dbf) -
:bookmark: Bump version to 0.12.1 — test PyPI Trusted Publishing (
81d38ce) -
:clown: Adding workflows (
e4cfccd) -
:clown: Rework into textx which has similar syntax to current standard. (
b0f5991) -
:clown_face: First commit of some data (
42c1782) -
:construction_worker: Adding html to artifacts. (
4b74045) -
:construction_worker: Adding src to path for pytest in pyproject.toml (
510d672) -
:construction_worker: Corrected test directory again. (
92d5dc2) -
:construction_worker: Corrected test directory. (
2bfc6df) -
:construction_worker: Fix to build script to include grammar files. (
9a85d55) -
:fire: Getting rid of mac files. (
b41512a) -
:fire: Removing mac files. (
18174bd) -
:green_heart: Adding autoformatting instead of checking (
b7b38dc) -
:green_heart: Adding Black linting (
ee365ae) -
:green_heart: Adding code coverage detection. (
b977536) -
:green_heart: Adding conftest.py (
dbd32b9) -
:green_heart: Adding coveralls to all branches. (
425024d) -
:green_heart: Adding documentation to github action (
124645c) -
:green_heart: Adding github actions back into commit. (
e1ab9f4) -
:green_heart: Adding path to init to correct test workflow. (
d29bfb6) -
:green_heart: Deployment fix and updates for pypi (
ee89465) -
:green_heart: Fix for correct path to code coverage check. (
2fccb2c) -
:green_heart: Fixes for tests. (
e11d3e9) -
:green_heart: Fixes to doc? (
1f27b22) -
:green_heart: Fixes? (
37fa8a5) -
:green_heart: Fixes? (
1d57172) -
:green_heart: Fixes?? (
b414758) -
:green_heart: Fixes?? (
c6c0b0f) -
:green_heart: Fixes??? (
2616e90) -
:green_heart: Fixes???? (
0955e8b) -
:green_heart: Fixing code coverage with better import flat file usage. (
1a11479) -
:green_heart: Fixing? (
0f9b849) -
:green_heart: Fixing?? (
21824c9) -
:green_heart: I broke it. (
38243bc) -
:green_heart: Ignore repo upload. (
c5efb11) -
:green_heart: Let's see if this breaks github actions. (
3cf03e8) -
:green_heart: Let's see if this works, adding permissions in the script/ (
e21687a) -
:green_heart: Need more in req.txt (
2a65bfc) -
:green_heart: Removing distribute (
2dd552e) -
:green_heart: Seeing if I can drop the separate document workflow. (
7692fc7) -
:green_heart: Set write all (
6ed68a0) -
:green_heart: Test to check for new build changes to documentation. (
382c9de) -
:green_heart: Testing if we need to change directory. (
96fc0c5) -
:green_heart: Trying this for autoformat. (
4fa5563) -
:green_heart: Updating release workflow as well (
8c72ce9) -
:green_heart: Updating test script to ensure available resources for pytest (
6a9c297) -
:poop Removing more excess files. (
4bbe0f3) -
:rocket: Moving to 0.1.0 baseline, most of the base functionality is here. (
aa7333d) -
:rocket: Moving to 0.1.2. (
e6b7c2d) -
:test_tube: Adding to coverage with failure tests. (
7c2e96e) -
:test_tube: Fix for test that can't find grammar. (
18f7aca) -
:wastebasket: Remove BUGREPORT and BUGREPORT_20260516 folders (
d879ca6)