lutaml 0.10.3 → 0.10.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +11 -1
  3. data/.rubocop_todo.yml +73 -228
  4. data/CHANGELOG.md +108 -0
  5. data/TODO.cleanups/01-resolve-production-todos.md +65 -0
  6. data/TODO.cleanups/02-reduce-metrics-offenses.md +37 -0
  7. data/TODO.cleanups/03-reduce-rspec-multiple-expectations.md +54 -0
  8. data/TODO.cleanups/04-reduce-rspec-example-length.md +45 -0
  9. data/TODO.cleanups/05-replace-marshal-load.md +37 -0
  10. data/TODO.cleanups/06-replace-eval-in-tests.md +41 -0
  11. data/TODO.cleanups/07-fix-lint-offenses.md +74 -0
  12. data/TODO.cleanups/08-reduce-memoized-helpers-and-nesting.md +43 -0
  13. data/TODO.cleanups/09-reduce-verified-doubles-and-rspec-style.md +57 -0
  14. data/TODO.cleanups/10-split-large-files.md +47 -0
  15. data/bin/console +0 -1
  16. data/lib/lutaml/cli/element_identifier.rb +3 -6
  17. data/lib/lutaml/cli/interactive_shell/bookmark_commands.rb +88 -0
  18. data/lib/lutaml/cli/interactive_shell/command_base.rb +28 -0
  19. data/lib/lutaml/cli/interactive_shell/export_handler.rb +67 -0
  20. data/lib/lutaml/cli/interactive_shell/help_display.rb +114 -0
  21. data/lib/lutaml/cli/interactive_shell/navigation_commands.rb +135 -0
  22. data/lib/lutaml/cli/interactive_shell/query_commands.rb +185 -0
  23. data/lib/lutaml/cli/interactive_shell.rb +116 -802
  24. data/lib/lutaml/cli/uml/build_command.rb +5 -5
  25. data/lib/lutaml/cli/uml/verify_command.rb +0 -1
  26. data/lib/lutaml/cli/uml_commands.rb +2 -2
  27. data/lib/lutaml/converter/xmi_to_uml.rb +3 -153
  28. data/lib/lutaml/converter/xmi_to_uml_generalization.rb +193 -0
  29. data/lib/lutaml/formatter/graphviz.rb +1 -2
  30. data/lib/lutaml/model_transformations/parsers/base_parser.rb +1 -1
  31. data/lib/lutaml/model_transformations/transformation_engine.rb +1 -1
  32. data/lib/lutaml/qea/database.rb +1 -47
  33. data/lib/lutaml/qea/factory/association_builder.rb +187 -0
  34. data/lib/lutaml/qea/factory/base_transformer.rb +0 -1
  35. data/lib/lutaml/qea/factory/class_transformer.rb +42 -594
  36. data/lib/lutaml/qea/factory/diagram_transformer.rb +0 -3
  37. data/lib/lutaml/qea/factory/document_builder.rb +1 -1
  38. data/lib/lutaml/qea/factory/generalization_builder.rb +211 -0
  39. data/lib/lutaml/qea/factory/package_transformer.rb +1 -2
  40. data/lib/lutaml/qea/factory/stereotype_loader.rb +34 -0
  41. data/lib/lutaml/qea/lookup_indexes.rb +54 -0
  42. data/lib/lutaml/qea/models/ea_datatype.rb +0 -2
  43. data/lib/lutaml/qea/repositories/base_repository.rb +6 -6
  44. data/lib/lutaml/qea/validation/base_validator.rb +2 -3
  45. data/lib/lutaml/qea/validation/validation_engine.rb +0 -2
  46. data/lib/lutaml/qea/validation/validation_message.rb +2 -2
  47. data/lib/lutaml/qea/validation/validation_result.rb +2 -2
  48. data/lib/lutaml/uml/has_members.rb +1 -2
  49. data/lib/lutaml/uml/inheritance_walker.rb +91 -0
  50. data/lib/lutaml/uml/model_helpers.rb +129 -0
  51. data/lib/lutaml/uml/node/attribute.rb +3 -1
  52. data/lib/lutaml/uml/node/class_node.rb +3 -3
  53. data/lib/lutaml/uml/operation.rb +2 -0
  54. data/lib/lutaml/uml/parsers/dsl.rb +1 -1
  55. data/lib/lutaml/uml.rb +1 -1
  56. data/lib/lutaml/uml_repository/class_lookup_index.rb +40 -0
  57. data/lib/lutaml/uml_repository/exporters/markdown/class_page_builder.rb +177 -0
  58. data/lib/lutaml/uml_repository/exporters/markdown/formatting.rb +36 -0
  59. data/lib/lutaml/uml_repository/exporters/markdown/index_page_builder.rb +73 -0
  60. data/lib/lutaml/uml_repository/exporters/markdown/link_resolver.rb +40 -0
  61. data/lib/lutaml/uml_repository/exporters/markdown/package_page_builder.rb +107 -0
  62. data/lib/lutaml/uml_repository/exporters/markdown_exporter.rb +25 -538
  63. data/lib/lutaml/uml_repository/index_builder.rb +3 -271
  64. data/lib/lutaml/uml_repository/index_builders/association_index.rb +141 -0
  65. data/lib/lutaml/uml_repository/index_builders/class_index.rb +94 -0
  66. data/lib/lutaml/uml_repository/index_builders/package_index.rb +57 -0
  67. data/lib/lutaml/uml_repository/package_exporter.rb +10 -20
  68. data/lib/lutaml/uml_repository/package_loader.rb +37 -17
  69. data/lib/lutaml/uml_repository/queries/inheritance_query.rb +0 -1
  70. data/lib/lutaml/uml_repository/repository/deprecated.rb +39 -0
  71. data/lib/lutaml/uml_repository/repository/loader.rb +112 -0
  72. data/lib/lutaml/uml_repository/repository.rb +8 -59
  73. data/lib/lutaml/uml_repository/static_site/association_serialization.rb +142 -0
  74. data/lib/lutaml/uml_repository/static_site/configuration.rb +0 -2
  75. data/lib/lutaml/uml_repository/static_site/data_transformer.rb +41 -878
  76. data/lib/lutaml/uml_repository/static_site/search_index_builder.rb +1 -4
  77. data/lib/lutaml/uml_repository/static_site/serializers/attribute_serializer.rb +78 -0
  78. data/lib/lutaml/uml_repository/static_site/serializers/class_serializer.rb +119 -0
  79. data/lib/lutaml/uml_repository/static_site/serializers/diagram_serializer.rb +59 -0
  80. data/lib/lutaml/uml_repository/static_site/serializers/inheritance_resolver.rb +250 -0
  81. data/lib/lutaml/uml_repository/static_site/serializers/metadata_builder.rb +48 -0
  82. data/lib/lutaml/uml_repository/static_site/serializers/operation_serializer.rb +57 -0
  83. data/lib/lutaml/uml_repository/static_site/serializers/package_serializer.rb +87 -0
  84. data/lib/lutaml/uml_repository/static_site/serializers/package_tree_builder.rb +89 -0
  85. data/lib/lutaml/version.rb +1 -1
  86. data/lib/lutaml/xmi/liquid_drops/association_drop.rb +13 -35
  87. data/lib/lutaml/xmi/liquid_drops/attribute_drop.rb +12 -18
  88. data/lib/lutaml/xmi/liquid_drops/cardinality_drop.rb +14 -6
  89. data/lib/lutaml/xmi/liquid_drops/connector_drop.rb +0 -3
  90. data/lib/lutaml/xmi/liquid_drops/constraint_drop.rb +1 -3
  91. data/lib/lutaml/xmi/liquid_drops/data_type_drop.rb +13 -70
  92. data/lib/lutaml/xmi/liquid_drops/dependency_drop.rb +2 -5
  93. data/lib/lutaml/xmi/liquid_drops/diagram_drop.rb +5 -11
  94. data/lib/lutaml/xmi/liquid_drops/enum_drop.rb +8 -16
  95. data/lib/lutaml/xmi/liquid_drops/enum_owned_literal_drop.rb +3 -9
  96. data/lib/lutaml/xmi/liquid_drops/generalization_attribute_drop.rb +11 -13
  97. data/lib/lutaml/xmi/liquid_drops/generalization_drop.rb +27 -85
  98. data/lib/lutaml/xmi/liquid_drops/klass_drop.rb +39 -91
  99. data/lib/lutaml/xmi/liquid_drops/operation_drop.rb +3 -9
  100. data/lib/lutaml/xmi/liquid_drops/package_drop.rb +16 -44
  101. data/lib/lutaml/xmi/liquid_drops/root_drop.rb +3 -11
  102. data/lib/lutaml/xmi/liquid_drops/source_target_drop.rb +2 -5
  103. data/lib/lutaml/xmi/parsers/xmi_base.rb +2 -749
  104. data/lib/lutaml/xmi/parsers/xmi_class_members.rb +45 -0
  105. data/lib/lutaml/xmi/parsers/xmi_connector.rb +251 -0
  106. data/lib/lutaml/xmi/parsers/xml.rb +7 -120
  107. data/lib/lutaml/xmi/xmi_lookup_service.rb +42 -0
  108. data/lib/lutaml.rb +3 -2
  109. data/lutaml.gemspec +2 -2
  110. metadata +51 -23
  111. data/lib/lutaml/cli/commands/base_command.rb +0 -118
  112. data/lib/lutaml/command_line.rb +0 -272
  113. data/lib/lutaml/sysml/allocate.rb +0 -9
  114. data/lib/lutaml/sysml/allocated.rb +0 -9
  115. data/lib/lutaml/sysml/binding_connector.rb +0 -9
  116. data/lib/lutaml/sysml/block.rb +0 -32
  117. data/lib/lutaml/sysml/constraint_block.rb +0 -14
  118. data/lib/lutaml/sysml/copy.rb +0 -8
  119. data/lib/lutaml/sysml/derive_requirement.rb +0 -9
  120. data/lib/lutaml/sysml/nested_connector_end.rb +0 -13
  121. data/lib/lutaml/sysml/refine.rb +0 -9
  122. data/lib/lutaml/sysml/requirement.rb +0 -44
  123. data/lib/lutaml/sysml/requirement_related.rb +0 -9
  124. data/lib/lutaml/sysml/satisfy.rb +0 -9
  125. data/lib/lutaml/sysml/test_case.rb +0 -25
  126. data/lib/lutaml/sysml/trace.rb +0 -9
  127. data/lib/lutaml/sysml/verify.rb +0 -8
  128. data/lib/lutaml/sysml/xmi_file.rb +0 -486
  129. data/lib/lutaml/sysml.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ded60358e2c376c21bdb7ebf2c7f64b3aa679b33110da44a42e52f1e65cf5d8c
4
- data.tar.gz: 15dc9978e43a8a6d58d351593ee51121d97400c601b9af614873407a4ba850db
3
+ metadata.gz: 2d1caee886e1e27cbbd7db3101f510bd0a1169050cbab47f48bdb31622e46c16
4
+ data.tar.gz: 4d42b151859f65339b67dffc2e5070e2851819daaf145295b05285d2cecc5e50
5
5
  SHA512:
6
- metadata.gz: eca6cd5f0852c060a99b8a7b0535d72fff5012ac4b1ac2a882b80a0dd0908cb8fe765a9ab4f2b2d0e62ba5a63b922b250c3075389beebe3a56aab5d0be9ca836
7
- data.tar.gz: fc00eca740523779c80a84d95b42cd93ff0b5e7bd407f42326c833db26317eaedad6917c409c6286e9f1c60bf47d0a00bad2e3f6fc1dfaed31db9a884126406f
6
+ metadata.gz: 62f845a38a4336cee141fb710ced850a20332db561ab44fe08d16c9e780c75c2844b982176902c0eab600175561e7efd7b63136ba9eabc707ce07d424f1c0c9f
7
+ data.tar.gz: 0ce0fd5ae74fdd0ba9f795e39e4b7b0ead7492443f06eeee34dbbeaaf31fdab16601174dbf53f72d412c13581a8cac82cefdf4906c060f317d7f7afd2a8f3b1d
data/.rubocop.yml CHANGED
@@ -16,4 +16,14 @@ plugins:
16
16
  - rubocop-rake
17
17
 
18
18
  AllCops:
19
- TargetRubyVersion: 3.0
19
+ TargetRubyVersion: 3.2
20
+
21
+ # VerifiedDoubles is disabled because many spec files use double() to mock
22
+ # UML model classes (Lutaml::Uml::Class, Package, etc.) that don't implement
23
+ # all stubbed methods as real Ruby methods (they use Lutaml::Model::Serializable
24
+ # attribute declarations). Converting to instance_double would cause test failures
25
+ # due to method verification.
26
+ RSpec/VerifiedDoubles:
27
+ Enabled: false
28
+ Exclude:
29
+ - 'spec/**/*'
data/.rubocop_todo.yml CHANGED
@@ -1,137 +1,51 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-04-24 10:12:08 UTC using RuboCop version 1.86.1.
3
+ # on 2026-04-28 10:51:28 UTC using RuboCop version 1.86.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 28
10
- # This cop supports safe autocorrection (--autocorrect).
11
- # Configuration parameters: EnforcedStyle, IndentationWidth.
12
- # SupportedStyles: with_first_argument, with_fixed_indentation
13
- Layout/ArgumentAlignment:
14
- Exclude:
15
- - 'lib/lutaml/qea/database.rb'
16
- - 'spec/lutaml/qea/database_spec.rb'
17
- - 'spec/lutaml/qea/factory/class_transformer_spec.rb'
18
- - 'spec/lutaml/qea/factory/package_transformer_spec.rb'
19
- - 'spec/lutaml/qea/verification/comprehensive_equivalence_spec.rb'
20
-
21
- # Offense count: 2
22
- # This cop supports safe autocorrection (--autocorrect).
23
- # Configuration parameters: EnforcedStyle, IndentationWidth.
24
- # SupportedStyles: with_first_element, with_fixed_indentation
25
- Layout/ArrayAlignment:
26
- Exclude:
27
- - 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
28
-
29
- # Offense count: 2
30
- # This cop supports safe autocorrection (--autocorrect).
31
- # Configuration parameters: EnforcedStyleAlignWith.
32
- # SupportedStylesAlignWith: either, start_of_block, start_of_line
33
- Layout/BlockAlignment:
34
- Exclude:
35
- - 'lib/lutaml/uml_repository/queries/class_query.rb'
36
- - 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
37
-
38
- # Offense count: 1
39
- # This cop supports safe autocorrection (--autocorrect).
40
- Layout/BlockEndNewline:
41
- Exclude:
42
- - 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
43
-
44
- # Offense count: 2
45
- # This cop supports safe autocorrection (--autocorrect).
46
- # Configuration parameters: AllowForAlignment.
47
- Layout/CommentIndentation:
48
- Exclude:
49
- - 'lib/lutaml/qea/factory/class_transformer.rb'
50
-
51
- # Offense count: 2
9
+ # Offense count: 16
52
10
  # This cop supports safe autocorrection (--autocorrect).
53
- Layout/ElseAlignment:
11
+ Layout/EmptyLineAfterGuardClause:
54
12
  Exclude:
55
- - 'lib/lutaml/qea/factory/class_transformer.rb'
56
- - 'lib/lutaml/uml_repository/queries/class_query.rb'
13
+ - 'lib/lutaml/qea/factory/association_builder.rb'
14
+ - 'lib/lutaml/uml/inheritance_walker.rb'
15
+ - 'lib/lutaml/uml_repository/static_site/data_transformer.rb'
16
+ - 'lib/lutaml/uml_repository/static_site/serializers/class_serializer.rb'
17
+ - 'lib/lutaml/uml_repository/static_site/serializers/diagram_serializer.rb'
18
+ - 'lib/lutaml/uml_repository/static_site/serializers/inheritance_resolver.rb'
19
+ - 'lib/lutaml/uml_repository/static_site/serializers/package_serializer.rb'
57
20
 
58
- # Offense count: 1
21
+ # Offense count: 4
59
22
  # This cop supports safe autocorrection (--autocorrect).
60
23
  # Configuration parameters: EmptyLineBetweenMethodDefs, EmptyLineBetweenClassDefs, EmptyLineBetweenModuleDefs, DefLikeMacros, AllowAdjacentOneLineDefs, NumberOfEmptyLines.
61
24
  Layout/EmptyLineBetweenDefs:
62
25
  Exclude:
63
- - 'lib/lutaml/uml_repository/statistics_calculator.rb'
26
+ - 'lib/lutaml/cli/interactive_shell/command_base.rb'
64
27
 
65
28
  # Offense count: 1
66
29
  # This cop supports safe autocorrection (--autocorrect).
67
- Layout/EmptyLines:
30
+ Layout/EmptyLinesAfterModuleInclusion:
68
31
  Exclude:
69
- - 'lib/lutaml/uml_repository/statistics_calculator.rb'
70
-
71
- # Offense count: 2
72
- # This cop supports safe autocorrection (--autocorrect).
73
- # Configuration parameters: EnforcedStyle.
74
- # SupportedStyles: empty_lines, no_empty_lines
75
- Layout/EmptyLinesAroundBlockBody:
76
- Exclude:
77
- - 'lib/lutaml/qea/factory/class_transformer.rb'
78
- - 'lib/lutaml/qea/factory/enum_transformer.rb'
79
-
80
- # Offense count: 1
81
- # This cop supports safe autocorrection (--autocorrect).
82
- # Configuration parameters: EnforcedStyleAlignWith.
83
- # SupportedStylesAlignWith: keyword, variable, start_of_line
84
- Layout/EndAlignment:
85
- Exclude:
86
- - 'lib/lutaml/qea/factory/class_transformer.rb'
87
-
88
- # Offense count: 16
89
- # This cop supports safe autocorrection (--autocorrect).
90
- # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
91
- # SupportedHashRocketStyles: key, separator, table
92
- # SupportedColonStyles: key, separator, table
93
- # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
94
- Layout/HashAlignment:
95
- Exclude:
96
- - 'spec/lutaml/qea/factory/class_transformer_spec.rb'
97
- - 'spec/lutaml/qea/factory/package_transformer_spec.rb'
98
-
99
- # Offense count: 1
100
- # This cop supports safe autocorrection (--autocorrect).
101
- # Configuration parameters: EnforcedStyle.
102
- # SupportedStyles: normal, indented_internal_methods
103
- Layout/IndentationConsistency:
104
- Exclude:
105
- - 'lib/lutaml/qea/factory/class_transformer.rb'
106
-
107
- # Offense count: 6
108
- # This cop supports safe autocorrection (--autocorrect).
109
- # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
110
- # SupportedStylesAlignWith: start_of_line, relative_to_receiver
111
- Layout/IndentationWidth:
112
- Exclude:
113
- - 'lib/lutaml/qea/factory/class_transformer.rb'
114
- - 'lib/lutaml/uml_repository/queries/class_query.rb'
115
- - 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
32
+ - 'lib/lutaml/uml_repository/repository.rb'
116
33
 
117
- # Offense count: 99
34
+ # Offense count: 183
118
35
  # This cop supports safe autocorrection (--autocorrect).
119
36
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
120
37
  # URISchemes: http, https
121
38
  Layout/LineLength:
122
39
  Enabled: false
123
40
 
124
- # Offense count: 22
41
+ # Offense count: 2
125
42
  # This cop supports safe autocorrection (--autocorrect).
126
- # Configuration parameters: AllowInHeredoc.
127
- Layout/TrailingWhitespace:
43
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
44
+ # SupportedStyles: space, no_space, compact
45
+ # SupportedStylesForEmptyBraces: space, no_space
46
+ Layout/SpaceInsideHashLiteralBraces:
128
47
  Exclude:
129
- - 'lib/lutaml/qea/database.rb'
130
- - 'spec/lutaml/qea/database_spec.rb'
131
- - 'spec/lutaml/qea/factory/class_transformer_spec.rb'
132
- - 'spec/lutaml/qea/factory/package_transformer_spec.rb'
133
- - 'spec/lutaml/qea/verification/comprehensive_equivalence_spec.rb'
134
- - 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
48
+ - 'lib/lutaml/uml/model_helpers.rb'
135
49
 
136
50
  # Offense count: 1
137
51
  Lint/BinaryOperatorWithIdenticalOperands:
@@ -149,23 +63,12 @@ Lint/ConstantDefinitionInBlock:
149
63
  - 'spec/lutaml/model_transformations_spec.rb'
150
64
  - 'spec/lutaml/uml_repository/presenters/presenter_factory_spec.rb'
151
65
 
152
- # Offense count: 1
153
- Lint/CopDirectiveSyntax:
154
- Exclude:
155
- - 'lib/lutaml/uml_repository/repository.rb'
156
-
157
- # Offense count: 8
66
+ # Offense count: 2
158
67
  # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
159
68
  Lint/DuplicateBranch:
160
69
  Exclude:
161
- - 'lib/lutaml/cli/element_identifier.rb'
162
- - 'lib/lutaml/cli/uml/verify_command.rb'
163
- - 'lib/lutaml/qea/factory/base_transformer.rb'
164
- - 'lib/lutaml/qea/models/ea_datatype.rb'
165
- - 'lib/lutaml/qea/validation/validation_engine.rb'
70
+ - 'lib/lutaml/uml/model_helpers.rb'
166
71
  - 'lib/lutaml/uml_repository/queries/package_query.rb'
167
- - 'lib/lutaml/uml_repository/static_site/configuration.rb'
168
- - 'lib/lutaml/uml_repository/static_site/search_index_builder.rb'
169
72
 
170
73
  # Offense count: 4
171
74
  # Configuration parameters: AllowComments, AllowEmptyLambdas.
@@ -195,6 +98,13 @@ Lint/MissingSuper:
195
98
  Exclude:
196
99
  - 'lib/lutaml/uml_repository/lazy_repository.rb'
197
100
 
101
+ # Offense count: 2
102
+ # This cop supports safe autocorrection (--autocorrect).
103
+ Lint/RedundantRequireStatement:
104
+ Exclude:
105
+ - 'lib/lutaml/qea/factory/generalization_builder.rb'
106
+ - 'lib/lutaml/uml_repository/static_site/serializers/inheritance_resolver.rb'
107
+
198
108
  # Offense count: 1
199
109
  # This cop supports safe autocorrection (--autocorrect).
200
110
  # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
@@ -203,69 +113,45 @@ Lint/UnusedMethodArgument:
203
113
  Exclude:
204
114
  - 'lib/lutaml/cli/uml/export_command.rb'
205
115
 
206
- # Offense count: 1
207
- # This cop supports safe autocorrection (--autocorrect).
208
- # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
209
- Lint/UselessAccessModifier:
116
+ # Offense count: 2
117
+ Lint/UselessConstantScoping:
210
118
  Exclude:
211
- - 'lib/lutaml/uml_repository/statistics_calculator.rb'
119
+ - 'lib/lutaml/cli/interactive_shell.rb'
212
120
 
213
- # Offense count: 8
121
+ # Offense count: 52
214
122
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
215
123
  Metrics/AbcSize:
216
- Exclude:
217
- - 'lib/lutaml/converter/xmi_to_uml.rb'
218
- - 'lib/lutaml/model_transformations/parsers/base_parser.rb'
219
- - 'lib/lutaml/qea/database.rb'
220
- - 'lib/lutaml/uml_repository/index_builder.rb'
221
- - 'lib/lutaml/uml_repository/queries/class_query.rb'
222
- - 'lib/lutaml/uml_repository/queries/inheritance_query.rb'
223
- - 'lib/lutaml/xmi/parsers/xmi_base.rb'
124
+ Enabled: false
224
125
 
225
- # Offense count: 1
126
+ # Offense count: 4
226
127
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
227
128
  # AllowedMethods: refine
228
129
  Metrics/BlockLength:
229
- Max: 28
130
+ Max: 53
230
131
 
231
- # Offense count: 11
132
+ # Offense count: 37
232
133
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
233
134
  Metrics/CyclomaticComplexity:
234
- Exclude:
235
- - 'lib/lutaml/cli/tree_view_formatter.rb'
236
- - 'lib/lutaml/converter/xmi_to_uml.rb'
237
- - 'lib/lutaml/qea/database.rb'
238
- - 'lib/lutaml/qea/factory/enum_transformer.rb'
239
- - 'lib/lutaml/uml_repository/index_builder.rb'
240
- - 'lib/lutaml/uml_repository/queries/class_query.rb'
241
- - 'lib/lutaml/uml_repository/queries/inheritance_query.rb'
242
- - 'lib/lutaml/uml_repository/queries/search_query.rb'
243
- - 'lib/lutaml/xmi/parsers/xmi_base.rb'
135
+ Enabled: false
244
136
 
245
- # Offense count: 11
137
+ # Offense count: 65
246
138
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
247
139
  Metrics/MethodLength:
248
- Max: 27
140
+ Max: 62
249
141
 
250
- # Offense count: 8
142
+ # Offense count: 29
251
143
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
252
144
  Metrics/PerceivedComplexity:
253
- Exclude:
254
- - 'lib/lutaml/converter/xmi_to_uml.rb'
255
- - 'lib/lutaml/qea/database.rb'
256
- - 'lib/lutaml/qea/factory/enum_transformer.rb'
257
- - 'lib/lutaml/uml_repository/index_builder.rb'
258
- - 'lib/lutaml/uml_repository/queries/class_query.rb'
259
- - 'lib/lutaml/uml_repository/queries/inheritance_query.rb'
260
- - 'lib/lutaml/xmi/parsers/xmi_base.rb'
145
+ Enabled: false
261
146
 
262
- # Offense count: 2
147
+ # Offense count: 3
263
148
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
264
149
  # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
265
150
  Naming/MethodParameterName:
266
151
  Exclude:
267
152
  - 'lib/lutaml/cli/tree_view_formatter.rb'
268
153
  - 'lib/lutaml/uml_repository/static_site/generator.rb'
154
+ - 'spec/lutaml/parsers/serialize_xmi_to_liquid_spec.rb'
269
155
 
270
156
  # Offense count: 1
271
157
  # Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
@@ -275,14 +161,13 @@ Naming/PredicateMethod:
275
161
  Exclude:
276
162
  - 'lib/lutaml/qea/factory/document_builder.rb'
277
163
 
278
- # Offense count: 5
164
+ # Offense count: 3
279
165
  # Configuration parameters: MinSize.
280
166
  Performance/CollectionLiteralInLoop:
281
167
  Exclude:
282
- - 'lib/lutaml/xmi/parsers/xmi_base.rb'
168
+ - 'lib/lutaml/xmi/parsers/xmi_connector.rb'
283
169
  - 'spec/lutaml/qea/infrastructure/table_reader_spec.rb'
284
170
  - 'spec/lutaml/uml_repository/index_builder_spec.rb'
285
- - 'spec/lutaml/uml_repository/queries/inheritance_query_spec.rb'
286
171
 
287
172
  # Offense count: 2
288
173
  Performance/MapMethodChain:
@@ -324,10 +209,10 @@ RSpec/ContextWording:
324
209
  RSpec/DescribeClass:
325
210
  Enabled: false
326
211
 
327
- # Offense count: 656
212
+ # Offense count: 649
328
213
  # Configuration parameters: CountAsOne.
329
214
  RSpec/ExampleLength:
330
- Max: 108
215
+ Max: 30
331
216
 
332
217
  # Offense count: 7
333
218
  # This cop supports safe autocorrection (--autocorrect).
@@ -354,20 +239,6 @@ RSpec/IndexedLet:
354
239
  - 'spec/lutaml/qea/repositories/base_repository_spec.rb'
355
240
  - 'spec/lutaml/qea/repositories/object_repository_spec.rb'
356
241
 
357
- # Offense count: 48
358
- # Configuration parameters: AssignmentOnly.
359
- RSpec/InstanceVariable:
360
- Exclude:
361
- - 'spec/lutaml/parsers/parse_xmi_spec.rb'
362
- - 'spec/lutaml/qea/verification/comprehensive_equivalence_spec.rb'
363
-
364
- # Offense count: 2
365
- # This cop supports safe autocorrection (--autocorrect).
366
- RSpec/IteratedExpectation:
367
- Exclude:
368
- - 'spec/lutaml/ea/diagram/layout_engine_spec.rb'
369
- - 'spec/lutaml/uml_repository/queries/inheritance_query_spec.rb'
370
-
371
242
  # Offense count: 15
372
243
  RSpec/LeakyConstantDeclaration:
373
244
  Exclude:
@@ -392,19 +263,19 @@ RSpec/MessageSpies:
392
263
  - 'spec/lutaml/uml_repository/presenters/diagram_presenter_spec.rb'
393
264
  - 'spec/lutaml/uml_repository/repository_spec.rb'
394
265
 
395
- # Offense count: 945
266
+ # Offense count: 35
396
267
  RSpec/MultipleExpectations:
397
- Max: 26
268
+ Max: 6
398
269
 
399
- # Offense count: 130
270
+ # Offense count: 151
400
271
  # Configuration parameters: AllowSubject.
401
272
  RSpec/MultipleMemoizedHelpers:
402
273
  Max: 11
403
274
 
404
- # Offense count: 29
275
+ # Offense count: 35
405
276
  # Configuration parameters: AllowedGroups.
406
277
  RSpec/NestedGroups:
407
- Max: 5
278
+ Max: 4
408
279
 
409
280
  # Offense count: 2
410
281
  # Configuration parameters: AllowedPatterns.
@@ -414,13 +285,12 @@ RSpec/NoExpectationExample:
414
285
  - 'spec/lutaml/qea/verification/comprehensive_equivalence_spec.rb'
415
286
  - 'spec/lutaml/uml_repository/static_site/generator_spec.rb'
416
287
 
417
- # Offense count: 16
288
+ # Offense count: 12
418
289
  RSpec/RepeatedExample:
419
290
  Exclude:
420
291
  - 'spec/lutaml/cli/package_commands_spec.rb'
421
292
  - 'spec/lutaml/ea/diagram/svg_renderer_spec.rb'
422
293
  - 'spec/lutaml/qea/validation/validation_engine_spec.rb'
423
- - 'spec/lutaml/uml_repository/presenters/diagram_presenter_spec.rb'
424
294
  - 'spec/lutaml/uml_repository/static_site/data_transformer_spec.rb'
425
295
 
426
296
  # Offense count: 2
@@ -428,7 +298,7 @@ RSpec/RepeatedExampleGroupDescription:
428
298
  Exclude:
429
299
  - 'spec/lutaml/uml/parsers/dsl_spec.rb'
430
300
 
431
- # Offense count: 6
301
+ # Offense count: 5
432
302
  # Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
433
303
  # SupportedInflectors: default, active_support
434
304
  RSpec/SpecFilePathFormat:
@@ -436,45 +306,18 @@ RSpec/SpecFilePathFormat:
436
306
  - 'spec/express/parsers/exp_spec.rb'
437
307
  - 'spec/lutaml/parser_qea_spec.rb'
438
308
  - 'spec/lutaml/parsers/parse_xmi_spec.rb'
439
- - 'spec/lutaml/parsers/serialize_generalization_by_name_spec.rb'
440
309
  - 'spec/lutaml/parsers/serialize_xmi_to_liquid_spec.rb'
441
310
  - 'spec/lutaml/uml_repository/web_ui/app_spec.rb'
442
311
 
443
- # Offense count: 6
444
- RSpec/UnspecifiedException:
445
- Exclude:
446
- - 'spec/lutaml/model_transformations/parsers/qea_parser_spec.rb'
447
- - 'spec/lutaml/model_transformations/parsers/xmi_parser_spec.rb'
448
- - 'spec/lutaml/model_transformations_spec.rb'
449
- - 'spec/lutaml/parser_qea_spec.rb'
450
- - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
451
-
452
- # Offense count: 212
453
- # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
454
- RSpec/VerifiedDoubles:
455
- Enabled: false
456
-
457
312
  # Offense count: 3
458
313
  Security/Eval:
459
314
  Exclude:
460
315
  - 'spec/lutaml/cli/uml/search_command_spec.rb'
461
316
 
462
- # Offense count: 4
317
+ # Offense count: 2
463
318
  Security/MarshalLoad:
464
319
  Exclude:
465
320
  - 'lib/lutaml/uml_repository/package_loader.rb'
466
- - 'spec/lutaml/uml_repository/package_exporter_spec.rb'
467
-
468
- # Offense count: 1
469
- # This cop supports safe autocorrection (--autocorrect).
470
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
471
- # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
472
- # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
473
- # FunctionalMethods: let, let!, subject, watch
474
- # AllowedMethods: lambda, proc, it
475
- Style/BlockDelimiters:
476
- Exclude:
477
- - 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
478
321
 
479
322
  # Offense count: 2
480
323
  # This cop supports safe autocorrection (--autocorrect).
@@ -493,24 +336,18 @@ Style/EvalWithLocation:
493
336
  Exclude:
494
337
  - 'spec/lutaml/cli/uml/search_command_spec.rb'
495
338
 
496
- # Offense count: 2
497
- # This cop supports unsafe autocorrection (--autocorrect-all).
498
- Style/IdenticalConditionalBranches:
499
- Exclude:
500
- - 'lib/lutaml/qea/factory/class_transformer.rb'
501
-
502
339
  # Offense count: 1
503
340
  # This cop supports safe autocorrection (--autocorrect).
504
- # Configuration parameters: AllowIfModifier.
505
- Style/IfInsideElse:
341
+ # Configuration parameters: AllowMethodComparison, ComparisonsThreshold.
342
+ Style/MultipleComparison:
506
343
  Exclude:
507
- - 'lib/lutaml/uml_repository/queries/class_query.rb'
344
+ - 'lib/lutaml/cli/interactive_shell.rb'
508
345
 
509
346
  # Offense count: 1
510
347
  # This cop supports unsafe autocorrection (--autocorrect-all).
511
348
  Style/PartitionInsteadOfDoubleSelect:
512
349
  Exclude:
513
- - 'lib/lutaml/qea/factory/class_transformer.rb'
350
+ - 'lib/lutaml/qea/factory/generalization_builder.rb'
514
351
 
515
352
  # Offense count: 3
516
353
  # Configuration parameters: Max.
@@ -521,8 +358,16 @@ Style/SafeNavigationChainLength:
521
358
 
522
359
  # Offense count: 1
523
360
  # This cop supports safe autocorrection (--autocorrect).
524
- # Configuration parameters: EnforcedStyle, MinSize.
525
- # SupportedStyles: percent, brackets
526
- Style/SymbolArray:
361
+ # Configuration parameters: EnforcedStyleForMultiline.
362
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
363
+ Style/TrailingCommaInArguments:
364
+ Exclude:
365
+ - 'lib/lutaml/qea/factory/class_transformer.rb'
366
+
367
+ # Offense count: 2
368
+ # This cop supports safe autocorrection (--autocorrect).
369
+ # Configuration parameters: EnforcedStyleForMultiline.
370
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
371
+ Style/TrailingCommaInHashLiteral:
527
372
  Exclude:
528
- - 'lib/lutaml/xmi/parsers/xmi_base.rb'
373
+ - 'lib/lutaml/cli/interactive_shell.rb'
data/CHANGELOG.md ADDED
@@ -0,0 +1,108 @@
1
+ # Changelog
2
+
3
+ ## v0.10.3 (2026-04-25)
4
+
5
+ ### Performance
6
+
7
+ - Replace O(n) linear scans with O(1) hash lookups in QEA transformers
8
+ and XMI parsers (connector, diagram, element lookups)
9
+ - Single-pass IndexBuilder replacing 9 separate tree traversals
10
+ - Memoized inheritance depth in StatisticsCalculator
11
+ - Set-based dedup in Repository associations_index
12
+
13
+ ### Bug fixes
14
+
15
+ - Fix Windows EACCES: replace Tempfile.new with temp_lur_path helper
16
+ to avoid file handle conflicts with rubyzip
17
+ - Fix xml_spec: use include matcher for platform-varying content nodes
18
+
19
+ ### Improvements
20
+
21
+ - Consistent error hierarchy: all module error classes now inherit from
22
+ `Lutaml::Error` (single rescue point for consumers)
23
+ - Fix gemspec email typo (mismatched quote)
24
+ - Bump required_ruby_version from >= 2.7 to >= 3.2 (matching CI)
25
+ - Rubocop: 0 offenses remaining
26
+
27
+ ## v0.10.2 (2026-04-24)
28
+
29
+ ### Bug fixes
30
+
31
+ - Fix Windows Errno::EACCES in PackageExporter: retry on file lock race
32
+ - Remove moxml git override (0.1.15 released)
33
+
34
+ ## v0.10.1 (2026-04-23)
35
+
36
+ ### Bug fixes
37
+
38
+ - Fix flaky CI tests: benchmark speedup assertion and Windows Tempfile race
39
+ - Fix xmi 0.5.6 compatibility: rename SparxRoot to Sparx::Root
40
+ - Fix nil @xmi_index in liquid drops: auto-init via xmi_index method
41
+ - Fix infinite loop in resolve_package_path with circular package hierarchy
42
+ - Fix stereotype type bugs, diagram package_id overwrite, and
43
+ DataTypeTransformer crash
44
+ - Fix 46 pending/failing spec tests across QEA, verification, and liquid specs
45
+
46
+ ## v0.10.0 (2026-04-21)
47
+
48
+ ### Breaking changes
49
+
50
+ - Update to lutaml-model 0.8.0, expressir 2.3, and xmi 0.5.x
51
+ - Migrate Lutaml::Uml models to lutaml-model serialization
52
+ - Unify namespace of Sysml module
53
+
54
+ ### Features
55
+
56
+ - Complete QEA to UML document migration
57
+ - Add PackagePresenter for structured output
58
+ - Add option to skip queries
59
+ - Add function to get qualified name
60
+ - Add Lutaml::Uml::Fidelity class
61
+ - Add attributes type, weight and status to Lutaml::Uml::Constraint
62
+ - Add generalization into Lutaml::Uml::Class
63
+ - Transform option keys to symbol
64
+ - Output find result based on format option
65
+ - Implement default sorting for diff_with_score comparison
66
+ - find_by_name returns single object instead of array
67
+
68
+ ### Bug fixes
69
+
70
+ - Fix Windows EACCES file rename issues (Tempfile handle conflicts)
71
+ - Fix YAML disallowed class loading error
72
+ - Fix attribute parsing values
73
+ - Fix association loading by QEA parser
74
+ - Fix association_generalization parsed by xmi parser
75
+ - Fix certificate CRL error
76
+
77
+ ## v0.9.43 (2025-11-20)
78
+
79
+ - Refactor klass_hash to use KlassDrop object in upper_klass
80
+
81
+ ## v0.9.42 (2025-11-18)
82
+
83
+ - Directly convert XMI into UML
84
+
85
+ ## v0.9.41 (2025-11-12)
86
+
87
+ - Remove unneeded version files
88
+ - Fix error when imports key is nil
89
+ - Unify Sysml namespace
90
+
91
+ ## v0.9.40 (2025-11-10)
92
+
93
+ - Convert DSL to UML
94
+ - Change namespace of Formatter and HasAttributes
95
+ - Update GraphViz and related specs
96
+ - Add Lutaml::Uml::Fidelity class
97
+ - Remove duplicated GraphViz code
98
+ - Create Lutaml::Uml models by Xmi hash
99
+ - Migrate Lutaml::Uml models to lutaml-model
100
+
101
+ ## v0.9.39 (2025-11-03)
102
+
103
+ - Change selection criteria for dependencies
104
+
105
+ ## v0.9.38 (2025-10-31)
106
+
107
+ - Add subtype_of to klass and enum drop models
108
+ - Get stereotype by type idref in owned attribute
@@ -0,0 +1,65 @@
1
+ # 01 — Resolve 7 production TODOs
2
+
3
+ ## Problem
4
+
5
+ Seven `TODO`/`FIXME` comments in `lib/` represent incomplete features, missing validation, or known tech debt. They risk silent data loss or incorrect behavior.
6
+
7
+ ## Items
8
+
9
+ ### 1. `lib/lutaml/qea/factory/diagram_transformer.rb:28`
10
+ ```ruby
11
+ # TODO: Fix diagram_type assignment -
12
+ # lutaml-model compatibility issue
13
+ # diagram.diagram_type = ea_diagram.diagram_type
14
+ ```
15
+ **Impact**: Diagram type is silently dropped during QEA→UML transformation. The `diagram_type` attribute exists on `Lutaml::Uml::Diagram` but is never populated from QEA.
16
+ **Fix**: Investigate lutaml-model compatibility (likely a type mismatch or missing attribute). Either fix the assignment or document why it's intentionally omitted.
17
+
18
+ ### 2. `lib/lutaml/qea/factory/package_transformer.rb:32`
19
+ ```ruby
20
+ # TODO: Fix tagged_values assignment - temporarily commented out
21
+ # pkg.tagged_values = load_tagged_values(ea_package.ea_guid)
22
+ ```
23
+ **Impact**: Tagged values (metadata/annotations) are silently dropped from packages during QEA→UML transformation. This causes XMI/QEA equivalence mismatches.
24
+ **Fix**: Check if `load_tagged_values` returns correct type. Likely needs the same serialization pattern used in class_transformer.
25
+
26
+ ### 3. `lib/lutaml/formatter/graphviz.rb:56`
27
+ ```ruby
28
+ # TODO: set rankdir
29
+ # @graph['rankdir'] = 'BT'
30
+ ```
31
+ **Impact**: Graph direction can't be configured. The value is commented out.
32
+ **Fix**: Either expose as configurable option or remove dead code.
33
+
34
+ ### 4. `lib/lutaml/uml/node/class_node.rb:19`
35
+ ```ruby
36
+ @modifier = value.to_s # TODO: Validate?
37
+ ```
38
+ **Impact**: No validation on modifier values — invalid strings accepted silently.
39
+ **Fix**: Add enum validation for known modifiers (`public`, `private`, `protected`, etc.) or remove the TODO if validation isn't needed.
40
+
41
+ ### 5. `lib/lutaml/uml/node/attribute.rb:27`
42
+ ```ruby
43
+ @access = value.to_s # TODO: Validate?
44
+ ```
45
+ **Impact**: Same as #4 but for access modifiers on attributes.
46
+ **Fix**: Same as #4 — validate or remove TODO.
47
+
48
+ ### 6. `lib/lutaml/uml/node/class_node.rb:24`
49
+ ```ruby
50
+ type = member.to_a[0][0] # TODO: This is dumb
51
+ ```
52
+ **Impact**: Fragile parsing of member data structure. The `TODO: This is dumb` indicates the developer knew it was wrong but shipped it.
53
+ **Fix**: Replace with structured member parsing using named access.
54
+
55
+ ### 7. `lib/lutaml/uml/has_members.rb:8`
56
+ ```ruby
57
+ # TODO: move to Parslet::Transform
58
+ ```
59
+ **Impact**: Member type logic is in the model instead of the parser layer.
60
+ **Fix**: Evaluate whether moving to Parslet::Transform is still desirable. If not, remove the TODO.
61
+
62
+ ## Verification
63
+
64
+ - `grep -rn "TODO\|FIXME" lib/ --include="*.rb"` should return 0 results (or only intentional ones)
65
+ - Full test suite passes: `bundle exec rspec`