lutaml 0.10.15 → 0.10.18

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 (231) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop_todo.yml +186 -30
  4. data/CLAUDE.md +38 -0
  5. data/lib/lutaml/cli/element_identifier.rb +0 -2
  6. data/lib/lutaml/cli/enhanced_formatter.rb +0 -1
  7. data/lib/lutaml/cli/interactive_shell/bookmark_commands.rb +0 -3
  8. data/lib/lutaml/cli/interactive_shell/export_handler.rb +0 -2
  9. data/lib/lutaml/cli/interactive_shell/help_display.rb +37 -38
  10. data/lib/lutaml/cli/interactive_shell/navigation_commands.rb +0 -3
  11. data/lib/lutaml/cli/interactive_shell/query_commands.rb +0 -3
  12. data/lib/lutaml/cli/interactive_shell.rb +8 -8
  13. data/lib/lutaml/cli/lml_commands.rb +0 -6
  14. data/lib/lutaml/cli/uml/build_command.rb +151 -222
  15. data/lib/lutaml/cli/uml/diagram_command.rb +262 -260
  16. data/lib/lutaml/cli/uml/export_command.rb +0 -1
  17. data/lib/lutaml/cli/uml/find_command.rb +0 -3
  18. data/lib/lutaml/cli/uml/info_command.rb +0 -1
  19. data/lib/lutaml/cli/uml/inspect_command.rb +0 -3
  20. data/lib/lutaml/cli/uml/ls_command.rb +0 -3
  21. data/lib/lutaml/cli/uml/repl_command.rb +0 -1
  22. data/lib/lutaml/cli/uml/search_command.rb +0 -3
  23. data/lib/lutaml/cli/uml/serve_command.rb +0 -1
  24. data/lib/lutaml/cli/uml/shared_helpers.rb +0 -2
  25. data/lib/lutaml/cli/uml/spa_command.rb +0 -5
  26. data/lib/lutaml/cli/uml/stats_command.rb +0 -3
  27. data/lib/lutaml/cli/uml/tree_command.rb +0 -3
  28. data/lib/lutaml/cli/uml/validate_command.rb +0 -5
  29. data/lib/lutaml/cli/uml/verify_command.rb +0 -3
  30. data/lib/lutaml/cli/uml.rb +24 -0
  31. data/lib/lutaml/cli/uml_commands.rb +0 -18
  32. data/lib/lutaml/cli.rb +14 -2
  33. data/lib/lutaml/converter/xmi_to_uml.rb +2 -2
  34. data/lib/lutaml/converter/xmi_to_uml_generalization.rb +1 -1
  35. data/lib/lutaml/converter.rb +10 -0
  36. data/lib/lutaml/ea/diagram/element_renderers/class_renderer.rb +0 -2
  37. data/lib/lutaml/ea/diagram/element_renderers/connector_renderer.rb +0 -2
  38. data/lib/lutaml/ea/diagram/element_renderers/package_renderer.rb +0 -2
  39. data/lib/lutaml/ea/diagram/element_renderers.rb +18 -0
  40. data/lib/lutaml/ea/diagram/extractor.rb +0 -2
  41. data/lib/lutaml/ea/diagram/layout_engine.rb +0 -2
  42. data/lib/lutaml/ea/diagram/path_builder.rb +0 -2
  43. data/lib/lutaml/ea/diagram/style_resolver.rb +0 -3
  44. data/lib/lutaml/ea/diagram/svg_renderer.rb +0 -6
  45. data/lib/lutaml/ea/diagram.rb +10 -25
  46. data/lib/lutaml/ea.rb +7 -0
  47. data/lib/lutaml/formatter/base.rb +0 -3
  48. data/lib/lutaml/formatter/graphviz.rb +15 -13
  49. data/lib/lutaml/layout/graph_viz_engine.rb +0 -1
  50. data/lib/lutaml/model_transformations/format_registry.rb +0 -2
  51. data/lib/lutaml/model_transformations/parsers/qea_parser.rb +0 -3
  52. data/lib/lutaml/model_transformations/parsers/xmi_parser.rb +0 -3
  53. data/lib/lutaml/model_transformations/transformation_engine.rb +0 -4
  54. data/lib/lutaml/qea/benchmark.rb +0 -2
  55. data/lib/lutaml/qea/database.rb +128 -289
  56. data/lib/lutaml/qea/factory/association_builder.rb +0 -2
  57. data/lib/lutaml/qea/factory/association_transformer.rb +0 -4
  58. data/lib/lutaml/qea/factory/attribute_tag_transformer.rb +0 -3
  59. data/lib/lutaml/qea/factory/attribute_transformer.rb +0 -4
  60. data/lib/lutaml/qea/factory/class_transformer.rb +0 -11
  61. data/lib/lutaml/qea/factory/constraint_transformer.rb +0 -3
  62. data/lib/lutaml/qea/factory/data_type_transformer.rb +0 -8
  63. data/lib/lutaml/qea/factory/diagram_transformer.rb +0 -5
  64. data/lib/lutaml/qea/factory/document_builder.rb +0 -2
  65. data/lib/lutaml/qea/factory/ea_to_uml_factory.rb +0 -7
  66. data/lib/lutaml/qea/factory/enum_transformer.rb +0 -5
  67. data/lib/lutaml/qea/factory/generalization_builder.rb +0 -5
  68. data/lib/lutaml/qea/factory/generalization_transformer.rb +0 -3
  69. data/lib/lutaml/qea/factory/instance_transformer.rb +0 -4
  70. data/lib/lutaml/qea/factory/object_property_transformer.rb +0 -3
  71. data/lib/lutaml/qea/factory/operation_transformer.rb +0 -3
  72. data/lib/lutaml/qea/factory/package_transformer.rb +0 -7
  73. data/lib/lutaml/qea/factory/tagged_value_transformer.rb +0 -3
  74. data/lib/lutaml/qea/factory/transformer_registry.rb +0 -8
  75. data/lib/lutaml/qea/factory.rb +37 -0
  76. data/lib/lutaml/qea/infrastructure.rb +12 -0
  77. data/lib/lutaml/qea/models/ea_attribute.rb +0 -2
  78. data/lib/lutaml/qea/models/ea_attribute_tag.rb +0 -2
  79. data/lib/lutaml/qea/models/ea_complexity_type.rb +0 -2
  80. data/lib/lutaml/qea/models/ea_connector.rb +0 -2
  81. data/lib/lutaml/qea/models/ea_connector_type.rb +0 -2
  82. data/lib/lutaml/qea/models/ea_constraint_type.rb +0 -2
  83. data/lib/lutaml/qea/models/ea_datatype.rb +0 -2
  84. data/lib/lutaml/qea/models/ea_diagram.rb +0 -2
  85. data/lib/lutaml/qea/models/ea_diagram_link.rb +0 -2
  86. data/lib/lutaml/qea/models/ea_diagram_object.rb +0 -2
  87. data/lib/lutaml/qea/models/ea_diagram_type.rb +0 -2
  88. data/lib/lutaml/qea/models/ea_document.rb +0 -2
  89. data/lib/lutaml/qea/models/ea_object.rb +0 -2
  90. data/lib/lutaml/qea/models/ea_object_constraint.rb +0 -2
  91. data/lib/lutaml/qea/models/ea_object_property.rb +0 -2
  92. data/lib/lutaml/qea/models/ea_object_type.rb +0 -2
  93. data/lib/lutaml/qea/models/ea_operation.rb +0 -2
  94. data/lib/lutaml/qea/models/ea_operation_param.rb +0 -2
  95. data/lib/lutaml/qea/models/ea_package.rb +0 -2
  96. data/lib/lutaml/qea/models/ea_script.rb +0 -2
  97. data/lib/lutaml/qea/models/ea_status_type.rb +0 -2
  98. data/lib/lutaml/qea/models/ea_stereotype.rb +0 -2
  99. data/lib/lutaml/qea/models/ea_tagged_value.rb +0 -2
  100. data/lib/lutaml/qea/models/ea_xref.rb +0 -2
  101. data/lib/lutaml/qea/models.rb +35 -0
  102. data/lib/lutaml/qea/parser.rb +0 -4
  103. data/lib/lutaml/qea/repositories/object_repository.rb +0 -2
  104. data/lib/lutaml/qea/repositories.rb +10 -0
  105. data/lib/lutaml/qea/services/database_loader.rb +0 -29
  106. data/lib/lutaml/qea/services.rb +10 -0
  107. data/lib/lutaml/qea/validation/association_validator.rb +0 -2
  108. data/lib/lutaml/qea/validation/attribute_validator.rb +0 -2
  109. data/lib/lutaml/qea/validation/base_validator.rb +0 -2
  110. data/lib/lutaml/qea/validation/class_validator.rb +0 -2
  111. data/lib/lutaml/qea/validation/database/circular_reference_validator.rb +0 -2
  112. data/lib/lutaml/qea/validation/database/orphan_validator.rb +0 -2
  113. data/lib/lutaml/qea/validation/database/referential_integrity_validator.rb +0 -2
  114. data/lib/lutaml/qea/validation/database.rb +10 -0
  115. data/lib/lutaml/qea/validation/diagram_validator.rb +0 -2
  116. data/lib/lutaml/qea/validation/operation_validator.rb +0 -2
  117. data/lib/lutaml/qea/validation/package_validator.rb +0 -2
  118. data/lib/lutaml/qea/validation/validation_engine.rb +0 -14
  119. data/lib/lutaml/qea/validation/validation_result.rb +0 -2
  120. data/lib/lutaml/qea/validation.rb +27 -0
  121. data/lib/lutaml/qea/verification/document_verifier.rb +0 -7
  122. data/lib/lutaml/qea/verification.rb +14 -0
  123. data/lib/lutaml/qea.rb +13 -14
  124. data/lib/lutaml/uml/association.rb +0 -4
  125. data/lib/lutaml/uml/class.rb +0 -8
  126. data/lib/lutaml/uml/classifier.rb +0 -4
  127. data/lib/lutaml/uml/data_type.rb +0 -6
  128. data/lib/lutaml/uml/diagram.rb +0 -4
  129. data/lib/lutaml/uml/document.rb +0 -12
  130. data/lib/lutaml/uml/enum.rb +0 -4
  131. data/lib/lutaml/uml/generalization.rb +0 -2
  132. data/lib/lutaml/uml/model_helpers.rb +21 -0
  133. data/lib/lutaml/uml/node/attribute.rb +0 -4
  134. data/lib/lutaml/uml/node/base.rb +0 -2
  135. data/lib/lutaml/uml/node/class_node.rb +0 -7
  136. data/lib/lutaml/uml/node/class_relationship.rb +0 -3
  137. data/lib/lutaml/uml/node/document.rb +0 -3
  138. data/lib/lutaml/uml/node/method_argument.rb +0 -4
  139. data/lib/lutaml/uml/node/operation.rb +0 -4
  140. data/lib/lutaml/uml/node/relationship.rb +0 -4
  141. data/lib/lutaml/uml/operation.rb +0 -2
  142. data/lib/lutaml/uml/package.rb +0 -6
  143. data/lib/lutaml/uml/parsers/dsl.rb +0 -4
  144. data/lib/lutaml/uml/qualified_name.rb +0 -2
  145. data/lib/lutaml/uml/top_element.rb +0 -3
  146. data/lib/lutaml/uml/validation/document_structure_validator.rb +0 -2
  147. data/lib/lutaml/uml.rb +26 -11
  148. data/lib/lutaml/uml_repository/exporters/json_exporter.rb +0 -1
  149. data/lib/lutaml/uml_repository/exporters/markdown/formatting.rb +0 -2
  150. data/lib/lutaml/uml_repository/exporters/markdown.rb +20 -0
  151. data/lib/lutaml/uml_repository/exporters/markdown_exporter.rb +0 -7
  152. data/lib/lutaml/uml_repository/index_builder.rb +4 -6
  153. data/lib/lutaml/uml_repository/index_builders/association_index.rb +113 -111
  154. data/lib/lutaml/uml_repository/index_builders/class_index.rb +86 -78
  155. data/lib/lutaml/uml_repository/index_builders/package_index.rb +45 -40
  156. data/lib/lutaml/uml_repository/index_builders.rb +13 -0
  157. data/lib/lutaml/uml_repository/lazy_repository.rb +0 -2
  158. data/lib/lutaml/uml_repository/package_exporter.rb +0 -1
  159. data/lib/lutaml/uml_repository/package_loader.rb +5 -5
  160. data/lib/lutaml/uml_repository/presenters/association_presenter.rb +0 -3
  161. data/lib/lutaml/uml_repository/presenters/attribute_presenter.rb +0 -3
  162. data/lib/lutaml/uml_repository/presenters/class_presenter.rb +0 -3
  163. data/lib/lutaml/uml_repository/presenters/datatype_presenter.rb +0 -3
  164. data/lib/lutaml/uml_repository/presenters/diagram_presenter.rb +0 -5
  165. data/lib/lutaml/uml_repository/presenters/enum_presenter.rb +1 -4
  166. data/lib/lutaml/uml_repository/presenters/package_presenter.rb +0 -3
  167. data/lib/lutaml/uml_repository/presenters/presenter_factory.rb +0 -2
  168. data/lib/lutaml/uml_repository/queries/association_query.rb +0 -3
  169. data/lib/lutaml/uml_repository/queries/class_query.rb +0 -4
  170. data/lib/lutaml/uml_repository/queries/diagram_query.rb +0 -3
  171. data/lib/lutaml/uml_repository/queries/inheritance_query.rb +0 -3
  172. data/lib/lutaml/uml_repository/queries/package_query.rb +0 -3
  173. data/lib/lutaml/uml_repository/queries/search_query.rb +125 -281
  174. data/lib/lutaml/uml_repository/query_dsl/conditions/block_condition.rb +0 -2
  175. data/lib/lutaml/uml_repository/query_dsl/conditions/hash_condition.rb +0 -2
  176. data/lib/lutaml/uml_repository/query_dsl/conditions/package_condition.rb +0 -3
  177. data/lib/lutaml/uml_repository/query_dsl/query_builder.rb +0 -6
  178. data/lib/lutaml/uml_repository/repository/loader.rb +0 -3
  179. data/lib/lutaml/uml_repository/repository.rb +24 -56
  180. data/lib/lutaml/uml_repository/repository_enhanced.rb +22 -30
  181. data/lib/lutaml/uml_repository/static_site/association_serialization.rb +11 -28
  182. data/lib/lutaml/uml_repository/static_site/data_transformer.rb +0 -28
  183. data/lib/lutaml/uml_repository/static_site/generator.rb +20 -40
  184. data/lib/lutaml/uml_repository/static_site/models/spa_association.rb +0 -3
  185. data/lib/lutaml/uml_repository/static_site/models/spa_association_end.rb +0 -3
  186. data/lib/lutaml/uml_repository/static_site/models/spa_attribute.rb +0 -3
  187. data/lib/lutaml/uml_repository/static_site/models/spa_cardinality.rb +0 -2
  188. data/lib/lutaml/uml_repository/static_site/models/spa_class.rb +0 -5
  189. data/lib/lutaml/uml_repository/static_site/models/spa_diagram.rb +0 -2
  190. data/lib/lutaml/uml_repository/static_site/models/spa_document.rb +0 -11
  191. data/lib/lutaml/uml_repository/static_site/models/spa_inherited_association.rb +0 -2
  192. data/lib/lutaml/uml_repository/static_site/models/spa_inherited_attribute.rb +0 -3
  193. data/lib/lutaml/uml_repository/static_site/models/spa_literal.rb +0 -2
  194. data/lib/lutaml/uml_repository/static_site/models/spa_metadata.rb +0 -3
  195. data/lib/lutaml/uml_repository/static_site/models/spa_operation.rb +0 -3
  196. data/lib/lutaml/uml_repository/static_site/models/spa_package.rb +0 -2
  197. data/lib/lutaml/uml_repository/static_site/models/spa_package_tree_node.rb +0 -3
  198. data/lib/lutaml/uml_repository/static_site/models/spa_parameter.rb +0 -2
  199. data/lib/lutaml/uml_repository/static_site/models/spa_search_entry.rb +0 -2
  200. data/lib/lutaml/uml_repository/static_site/models/spa_statistics.rb +0 -2
  201. data/lib/lutaml/uml_repository/static_site/models/spa_tree_class_ref.rb +0 -2
  202. data/lib/lutaml/uml_repository/static_site/models.rb +46 -0
  203. data/lib/lutaml/uml_repository/static_site/search_index_builder.rb +0 -3
  204. data/lib/lutaml/uml_repository/static_site/serializers/attribute_serializer.rb +0 -18
  205. data/lib/lutaml/uml_repository/static_site/serializers/class_serializer.rb +0 -18
  206. data/lib/lutaml/uml_repository/static_site/serializers/diagram_serializer.rb +0 -3
  207. data/lib/lutaml/uml_repository/static_site/serializers/inheritance_resolver.rb +13 -28
  208. data/lib/lutaml/uml_repository/static_site/serializers/metadata_builder.rb +0 -3
  209. data/lib/lutaml/uml_repository/static_site/serializers/operation_serializer.rb +0 -3
  210. data/lib/lutaml/uml_repository/static_site/serializers/package_serializer.rb +0 -19
  211. data/lib/lutaml/uml_repository/static_site/serializers/package_tree_builder.rb +0 -4
  212. data/lib/lutaml/uml_repository/static_site/serializers.rb +26 -0
  213. data/lib/lutaml/uml_repository/static_site.rb +12 -6
  214. data/lib/lutaml/uml_repository/statistics_calculator.rb +0 -2
  215. data/lib/lutaml/uml_repository/validators/repository_validator.rb +40 -52
  216. data/lib/lutaml/uml_repository/web_ui/app.rb +0 -1
  217. data/lib/lutaml/uml_repository.rb +21 -1
  218. data/lib/lutaml/version.rb +1 -1
  219. data/lib/lutaml/xmi/liquid_drops/klass_drop.rb +15 -13
  220. data/lib/lutaml/xmi/parsers/xmi_base.rb +3 -2
  221. data/lib/lutaml/xmi/parsers/xmi_class_members.rb +1 -1
  222. data/lib/lutaml/xmi/parsers/xmi_connector.rb +1 -1
  223. data/lib/lutaml/xmi/parsers/xml.rb +0 -2
  224. data/lib/lutaml/xmi/xmi_lookup_service.rb +0 -2
  225. data/lib/lutaml/xmi.rb +5 -1
  226. data/lib/lutaml.rb +11 -9
  227. metadata +19 -6
  228. data/lib/lutaml/qea/lookup_indexes.rb +0 -72
  229. data/lib/lutaml/xml/parsers/xml.rb +0 -45
  230. data/lib/lutaml/xml/parsers/xsd.rb +0 -35
  231. data/lib/lutaml/xml.rb +0 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb62e96e62545c49b005e89cc972bc7dfb9510dbd9867831db9b6f4ab0bbcc40
4
- data.tar.gz: 3975abff3b9a8e54714a76209d5917ed1bcf291baf9dcdf405c658d211934714
3
+ metadata.gz: 9c53820c1a0daa57dc4a07ee45bdd249600b22a194d47f0e011fcc14147d15fd
4
+ data.tar.gz: d03fce90025ce62a4715d187b8e723dd63cb8a768a7e8e016bf4d9160a0ba2dd
5
5
  SHA512:
6
- metadata.gz: a09b2b6074e7fb3fa04d2084b16c35ac5f9c115708ac8f50efaac08b5999cd21613053df9eebe487a714c361317e4411de2ecc8d2286b8100e3fe23102854265
7
- data.tar.gz: 6d6c1dd06afac86c94ba1047087914b59b95d09e11308482f90bb3b99b4b65633eb443a565200842f07ce51064b14e2441a4406f408697a8fe55ef67ce33c9eb
6
+ metadata.gz: cebc1ecb62b6a0daa11b21206995fac13a9a45d4ef9707ed248e97ff20757ee6c1a59216b96b00e2fb568bb48966a4660f03a171bc97183b343003796ea1f895
7
+ data.tar.gz: 0b3280443cd693c733f82a4a43e6b68ba4276bfabf9400d9dddd098e918315ec9bdcdec4138ffd57e0f72d2509b2f388d4de4262e0a6cf24b541f6a2bf89520c
data/.gitignore CHANGED
@@ -21,4 +21,5 @@ old-docs
21
21
 
22
22
  # Transient planning files
23
23
  TODO.*/
24
+ TODO.*.md
24
25
  .rubocop_todo.yml.tmp
data/.rubocop_todo.yml CHANGED
@@ -1,18 +1,144 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-05-13 02:18:49 UTC using RuboCop version 1.86.1.
3
+ # on 2026-05-14 13:10:59 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: 155
9
+ # Offense count: 67
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
12
+ # SupportedStyles: with_first_argument, with_fixed_indentation
13
+ Layout/ArgumentAlignment:
14
+ Enabled: false
15
+
16
+ # Offense count: 1
17
+ # This cop supports safe autocorrection (--autocorrect).
18
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
19
+ # SupportedStyles: with_first_element, with_fixed_indentation
20
+ Layout/ArrayAlignment:
21
+ Exclude:
22
+ - 'lib/lutaml/uml_repository/repository_enhanced.rb'
23
+
24
+ # Offense count: 12
25
+ # This cop supports safe autocorrection (--autocorrect).
26
+ # Configuration parameters: IndentationWidth.
27
+ Layout/AssignmentIndentation:
28
+ Exclude:
29
+ - 'lib/lutaml/cli/uml/build_command.rb'
30
+ - 'lib/lutaml/cli/uml/diagram_command.rb'
31
+ - 'lib/lutaml/uml_repository/index_builders/class_index.rb'
32
+ - 'lib/lutaml/uml_repository/index_builders/package_index.rb'
33
+ - 'lib/lutaml/uml_repository/queries/search_query.rb'
34
+ - 'lib/lutaml/uml_repository/repository_enhanced.rb'
35
+
36
+ # Offense count: 13
37
+ # This cop supports safe autocorrection (--autocorrect).
38
+ # Configuration parameters: EnforcedStyleAlignWith.
39
+ # SupportedStylesAlignWith: either, start_of_block, start_of_line
40
+ Layout/BlockAlignment:
41
+ Exclude:
42
+ - 'lib/lutaml/cli/uml/build_command.rb'
43
+ - 'lib/lutaml/cli/uml/diagram_command.rb'
44
+ - 'lib/lutaml/uml_repository/queries/search_query.rb'
45
+ - 'spec/lutaml/cli/search_commands_spec.rb'
46
+ - 'spec/lutaml/cli/uml/search_command_spec.rb'
47
+ - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
48
+
49
+ # Offense count: 12
50
+ # This cop supports safe autocorrection (--autocorrect).
51
+ Layout/BlockEndNewline:
52
+ Exclude:
53
+ - 'lib/lutaml/cli/uml/build_command.rb'
54
+ - 'lib/lutaml/cli/uml/diagram_command.rb'
55
+ - 'lib/lutaml/uml_repository/queries/search_query.rb'
56
+ - 'spec/lutaml/cli/search_commands_spec.rb'
57
+ - 'spec/lutaml/cli/uml/search_command_spec.rb'
58
+ - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
59
+
60
+ # Offense count: 11
61
+ # This cop supports safe autocorrection (--autocorrect).
62
+ # Configuration parameters: AllowForAlignment.
63
+ Layout/CommentIndentation:
64
+ Exclude:
65
+ - 'lib/lutaml/uml_repository/index_builders/association_index.rb'
66
+ - 'lib/lutaml/uml_repository/index_builders/class_index.rb'
67
+ - 'lib/lutaml/uml_repository/index_builders/package_index.rb'
68
+
69
+ # Offense count: 1
70
+ # This cop supports safe autocorrection (--autocorrect).
71
+ Layout/ElseAlignment:
72
+ Exclude:
73
+ - 'lib/lutaml/uml_repository/validators/repository_validator.rb'
74
+
75
+ # Offense count: 137
76
+ # This cop supports safe autocorrection (--autocorrect).
77
+ Layout/EmptyLines:
78
+ Enabled: false
79
+
80
+ # Offense count: 2
81
+ # This cop supports safe autocorrection (--autocorrect).
82
+ Layout/EmptyLinesAfterModuleInclusion:
83
+ Exclude:
84
+ - 'lib/lutaml/converter/xmi_to_uml.rb'
85
+ - 'lib/lutaml/xmi/parsers/xmi_base.rb'
86
+
87
+ # Offense count: 3
88
+ # This cop supports safe autocorrection (--autocorrect).
89
+ Layout/EmptyLinesAroundMethodBody:
90
+ Exclude:
91
+ - 'lib/lutaml/cli/uml/build_command.rb'
92
+ - 'lib/lutaml/cli/uml/spa_command.rb'
93
+ - 'lib/lutaml/cli/uml/validate_command.rb'
94
+
95
+ # Offense count: 4
96
+ # This cop supports safe autocorrection (--autocorrect).
97
+ # Configuration parameters: EnforcedStyleAlignWith.
98
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
99
+ Layout/EndAlignment:
100
+ Exclude:
101
+ - 'lib/lutaml/uml_repository/index_builders/association_index.rb'
102
+ - 'lib/lutaml/uml_repository/index_builders/class_index.rb'
103
+ - 'lib/lutaml/uml_repository/index_builders/package_index.rb'
104
+ - 'lib/lutaml/uml_repository/validators/repository_validator.rb'
105
+
106
+ # Offense count: 51
107
+ # This cop supports safe autocorrection (--autocorrect).
108
+ # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
109
+ # SupportedStylesAlignWith: start_of_line, relative_to_receiver
110
+ Layout/IndentationWidth:
111
+ Exclude:
112
+ - 'lib/lutaml/cli/uml/build_command.rb'
113
+ - 'lib/lutaml/cli/uml/diagram_command.rb'
114
+ - 'lib/lutaml/uml_repository/index_builders/association_index.rb'
115
+ - 'lib/lutaml/uml_repository/index_builders/class_index.rb'
116
+ - 'lib/lutaml/uml_repository/index_builders/package_index.rb'
117
+ - 'lib/lutaml/uml_repository/queries/search_query.rb'
118
+ - 'lib/lutaml/uml_repository/validators/repository_validator.rb'
119
+ - 'spec/lutaml/cli/search_commands_spec.rb'
120
+ - 'spec/lutaml/cli/uml/search_command_spec.rb'
121
+ - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
122
+
123
+ # Offense count: 271
10
124
  # This cop supports safe autocorrection (--autocorrect).
11
125
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
12
126
  # URISchemes: http, https
13
127
  Layout/LineLength:
14
128
  Enabled: false
15
129
 
130
+ # Offense count: 1
131
+ # This cop supports safe autocorrection (--autocorrect).
132
+ Layout/MultilineBlockLayout:
133
+ Exclude:
134
+ - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
135
+
136
+ # Offense count: 81
137
+ # This cop supports safe autocorrection (--autocorrect).
138
+ # Configuration parameters: AllowInHeredoc.
139
+ Layout/TrailingWhitespace:
140
+ Enabled: false
141
+
16
142
  # Offense count: 1
17
143
  Lint/BinaryOperatorWithIdenticalOperands:
18
144
  Exclude:
@@ -45,12 +171,11 @@ Lint/EmptyBlock:
45
171
  - 'spec/lutaml/uml_repository/package_exporter_spec.rb'
46
172
  - 'spec/lutaml/uml_repository/repository_spec.rb'
47
173
 
48
- # Offense count: 3
174
+ # Offense count: 1
49
175
  # This cop supports safe autocorrection (--autocorrect).
50
176
  # Configuration parameters: AllowComments.
51
177
  Lint/EmptyConditionalBody:
52
178
  Exclude:
53
- - 'spec/integration/qea_xmi_equivalency_spec.rb'
54
179
  - 'spec/lutaml/qea/verification/equivalence_integration_spec.rb'
55
180
 
56
181
  # Offense count: 4
@@ -72,48 +197,57 @@ Lint/UnusedMethodArgument:
72
197
  Exclude:
73
198
  - 'lib/lutaml/cli/uml/export_command.rb'
74
199
 
75
- # Offense count: 3
200
+ # Offense count: 7
76
201
  Lint/UselessConstantScoping:
77
202
  Exclude:
78
203
  - 'lib/lutaml/cli/interactive_shell.rb'
204
+ - 'lib/lutaml/cli/uml/diagram_command.rb'
79
205
  - 'lib/lutaml/qea/factory/ea_to_uml_factory.rb'
206
+ - 'lib/lutaml/uml_repository/static_site/generator.rb'
207
+ - 'lib/lutaml/uml_repository/static_site/serializers/inheritance_resolver.rb'
80
208
 
81
- # Offense count: 8
209
+ # Offense count: 10
82
210
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
83
211
  Metrics/AbcSize:
84
212
  Exclude:
85
213
  - 'lib/lutaml/cli/interactive_shell/query_commands.rb'
214
+ - 'lib/lutaml/cli/uml/diagram_command.rb'
86
215
  - 'lib/lutaml/qea/factory/generalization_builder.rb'
87
216
  - 'lib/lutaml/uml_repository/exporters/markdown/class_page_builder.rb'
88
217
  - 'lib/lutaml/uml_repository/queries/search_query.rb'
89
218
  - 'lib/lutaml/uml_repository/static_site/serializers/class_serializer.rb'
90
- - 'lib/lutaml/xmi/liquid_drops/klass_drop.rb'
91
219
 
92
- # Offense count: 4
220
+ # Offense count: 1
221
+ # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
222
+ # AllowedMethods: refine
223
+ Metrics/BlockLength:
224
+ Max: 27
225
+
226
+ # Offense count: 3
93
227
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
94
228
  Metrics/CyclomaticComplexity:
95
229
  Exclude:
96
230
  - 'lib/lutaml/qea/factory/generalization_builder.rb'
97
231
  - 'lib/lutaml/uml_repository/index_builders/association_index.rb'
98
- - 'lib/lutaml/uml_repository/queries/search_query.rb'
99
232
  - 'lib/lutaml/uml_repository/static_site/serializers/class_serializer.rb'
100
233
 
101
- # Offense count: 48
234
+ # Offense count: 55
102
235
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
103
236
  Metrics/MethodLength:
104
- Max: 18
237
+ Max: 17
105
238
 
106
- # Offense count: 4
239
+ # Offense count: 5
107
240
  # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
108
241
  Metrics/ParameterLists:
109
242
  Max: 7
110
243
 
111
- # Offense count: 2
244
+ # Offense count: 3
112
245
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
113
246
  Metrics/PerceivedComplexity:
114
247
  Exclude:
115
248
  - 'lib/lutaml/qea/factory/ea_to_uml_factory.rb'
116
249
  - 'lib/lutaml/uml_repository/static_site/serializers/class_serializer.rb'
250
+ - 'lib/lutaml/uml_repository/validators/repository_validator.rb'
117
251
 
118
252
  # Offense count: 3
119
253
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
@@ -156,7 +290,7 @@ RSpec/BeforeAfterAll:
156
290
  Exclude:
157
291
  - 'spec/lutaml/qea/verification/comprehensive_equivalence_spec.rb'
158
292
 
159
- # Offense count: 24
293
+ # Offense count: 23
160
294
  # Configuration parameters: Prefixes, AllowedPatterns.
161
295
  # Prefixes: when, with, without
162
296
  RSpec/ContextWording:
@@ -172,14 +306,13 @@ RSpec/ContextWording:
172
306
  - 'spec/lutaml/cli/uml/tree_command_spec.rb'
173
307
  - 'spec/lutaml/cli/uml/verify_command_spec.rb'
174
308
  - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
175
- - 'spec/lutaml/xml/parsers/xml_spec.rb'
176
309
 
177
310
  # Offense count: 22
178
311
  # Configuration parameters: IgnoredMetadata.
179
312
  RSpec/DescribeClass:
180
313
  Enabled: false
181
314
 
182
- # Offense count: 649
315
+ # Offense count: 646
183
316
  # Configuration parameters: CountAsOne.
184
317
  RSpec/ExampleLength:
185
318
  Max: 30
@@ -233,11 +366,11 @@ RSpec/MessageSpies:
233
366
  - 'spec/lutaml/uml_repository/presenters/diagram_presenter_spec.rb'
234
367
  - 'spec/lutaml/uml_repository/repository_spec.rb'
235
368
 
236
- # Offense count: 39
369
+ # Offense count: 40
237
370
  RSpec/MultipleExpectations:
238
371
  Max: 7
239
372
 
240
- # Offense count: 149
373
+ # Offense count: 148
241
374
  # Configuration parameters: AllowSubject.
242
375
  RSpec/MultipleMemoizedHelpers:
243
376
  Max: 11
@@ -278,32 +411,55 @@ RSpec/SpecFilePathFormat:
278
411
  - 'spec/lutaml/parsers/serialize_xmi_to_liquid_spec.rb'
279
412
  - 'spec/lutaml/uml_repository/web_ui/app_spec.rb'
280
413
 
281
- # Offense count: 3
282
- Security/Eval:
283
- Exclude:
284
- - 'spec/lutaml/cli/uml/search_command_spec.rb'
285
-
286
- # Offense count: 2
414
+ # Offense count: 1
287
415
  Security/MarshalLoad:
288
416
  Exclude:
289
417
  - 'lib/lutaml/uml_repository/package_loader.rb'
290
418
 
419
+ # Offense count: 17
420
+ # This cop supports safe autocorrection (--autocorrect).
421
+ # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
422
+ # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
423
+ # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
424
+ # FunctionalMethods: let, let!, subject, watch
425
+ # AllowedMethods: lambda, proc, it
426
+ Style/BlockDelimiters:
427
+ Exclude:
428
+ - 'lib/lutaml/cli/uml/build_command.rb'
429
+ - 'lib/lutaml/cli/uml/diagram_command.rb'
430
+ - 'lib/lutaml/uml_repository/queries/search_query.rb'
431
+ - 'spec/lutaml/cli/search_commands_spec.rb'
432
+ - 'spec/lutaml/cli/uml/search_command_spec.rb'
433
+ - 'spec/lutaml/qea/integration/full_parsing_spec.rb'
434
+
291
435
  # Offense count: 2
292
436
  # This cop supports safe autocorrection (--autocorrect).
293
437
  Style/ComparableClamp:
294
438
  Exclude:
295
439
  - 'lib/lutaml/cli/enhanced_formatter.rb'
296
440
 
297
- # Offense count: 2
298
- Style/DocumentDynamicEvalDefinition:
441
+ # Offense count: 16
442
+ # This cop supports safe autocorrection (--autocorrect).
443
+ Style/MultilineIfModifier:
299
444
  Exclude:
300
- - 'spec/lutaml/cli/uml/search_command_spec.rb'
445
+ - 'lib/lutaml/cli/uml/build_command.rb'
446
+ - 'lib/lutaml/cli/uml/diagram_command.rb'
447
+ - 'lib/lutaml/uml_repository/index_builders/class_index.rb'
448
+ - 'lib/lutaml/uml_repository/index_builders/package_index.rb'
449
+ - 'lib/lutaml/uml_repository/repository_enhanced.rb'
301
450
 
302
- # Offense count: 2
451
+ # Offense count: 1
303
452
  # This cop supports safe autocorrection (--autocorrect).
304
- Style/EvalWithLocation:
453
+ Style/MultilineTernaryOperator:
305
454
  Exclude:
306
- - 'spec/lutaml/cli/uml/search_command_spec.rb'
455
+ - 'lib/lutaml/uml_repository/validators/repository_validator.rb'
456
+
457
+ # Offense count: 2
458
+ # Configuration parameters: AllowedClasses.
459
+ Style/OneClassPerFile:
460
+ Exclude:
461
+ - 'lib/lutaml/cli.rb'
462
+ - 'lib/lutaml/qea.rb'
307
463
 
308
464
  # Offense count: 1
309
465
  # This cop supports unsafe autocorrection (--autocorrect-all).
data/CLAUDE.md ADDED
@@ -0,0 +1,38 @@
1
+ # CLAUDE.md — Lutaml Project
2
+
3
+ ## Project Overview
4
+ Lutaml is a Ruby gem for parsing and transforming UML models from multiple formats (XMI, QEA/EA, DSL). It provides a CLI, interactive shell, static site generator, web UI, and model transformation pipeline.
5
+
6
+ ## Testing Constraints
7
+
8
+ **CRITICAL: Do NOT run the full test suite at once.** It will crash due to memory. Run targeted subsets:
9
+ - `bundle exec rspec spec/lutaml/cli/` — CLI specs
10
+ - `bundle exec rspec spec/lutaml/qea/` — QEA parser specs
11
+ - `bundle exec rspec spec/lutaml/uml_repository/` — UML repository specs
12
+ - `bundle exec rspec spec/lutaml/uml/` — UML model specs
13
+ - `bundle exec rspec spec/lutaml/parsers/` — Parser specs
14
+ - `bundle exec rspec spec/lutaml/formatter/` — Formatter specs
15
+ - Combine at most 2-3 suites at a time for targeted verification.
16
+
17
+ ## Code Quality Rules
18
+ - Never use `send` (breaks encapsulation). Use `public_send` only when dynamic dispatch is truly necessary.
19
+ - Never use `respond_to?` (poor typing). Use `is_a?` for type checks.
20
+ - Extract god methods into focused helpers.
21
+ - Keep files under ~300 lines. Extract into modules/classes when growing.
22
+ - DRY: consolidate duplicated patterns (especially `format_definition`, index building, metadata construction).
23
+ - Never commit TODO tracking files to git.
24
+
25
+ ## Architecture
26
+ - `lib/lutaml/uml/` — UML domain models (Class, Association, Package, etc.)
27
+ - `lib/lutaml/uml_repository/` — Repository pattern over UML documents (queries, presenters, exporters, SPA)
28
+ - `lib/lutaml/qea/` — EA .qea SQLite parser and factory
29
+ - `lib/lutaml/xmi/` — XMI XML parsing
30
+ - `lib/lutaml/converter/` — Format converters (XMI→UML, DSL→UML)
31
+ - `lib/lutaml/cli/` — Thor CLI commands
32
+ - `lib/lutaml/model_transformations/` — Format-agnostic transformation pipeline
33
+ - `lib/lutaml/ea/` — EA diagram SVG rendering
34
+
35
+ ## CI Notes
36
+ - Ignore Ruby 3.4 ubuntu failures (performance-related, not code issues)
37
+ - Ignore macOS job slowness (GitHub Actions is slow for macOS)
38
+ - Windows tempfile Permission denied errors are pre-existing flakiness
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "resource_registry"
4
-
5
3
  module Lutaml
6
4
  module Cli
7
5
  # ElementIdentifier parses and manages element references
@@ -2,7 +2,6 @@
2
2
 
3
3
  require "io/console"
4
4
  require "table_tennis"
5
- require_relative "output_formatter"
6
5
 
7
6
  module Lutaml
8
7
  module Cli
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "command_base"
4
- require_relative "../enhanced_formatter"
5
-
6
3
  module Lutaml
7
4
  module Cli
8
5
  class InteractiveShell
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "command_base"
4
-
5
3
  module Lutaml
6
4
  module Cli
7
5
  class InteractiveShell
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "command_base"
4
- require_relative "../enhanced_formatter"
5
-
6
3
  module Lutaml
7
4
  module Cli
8
5
  class InteractiveShell
@@ -60,42 +57,44 @@ module Lutaml
60
57
  end
61
58
  end
62
59
 
60
+ HELP_TEXT = <<~HELP
61
+ Available Commands:
62
+
63
+ Navigation:
64
+ cd PATH Change to package path
65
+ pwd Print current path
66
+ ls [PATH] List packages
67
+ tree [PATH] Show package tree
68
+ up Go to parent package
69
+ root Go to ModelRoot
70
+ back Go to previous location
71
+
72
+ Query:
73
+ find CLASS Find class (fuzzy search)
74
+ show class QNAME Show class details
75
+ show package PATH Show package details
76
+ show NUMBER Show numbered result
77
+ search QUERY Full-text search
78
+ ? QUERY Alias for search
79
+
80
+ Bookmarks:
81
+ bookmark add NAME Bookmark current location
82
+ bookmark list List bookmarks
83
+ bookmark go NAME Jump to bookmark
84
+ bookmark rm NAME Remove bookmark
85
+ bm NAME Quick jump
86
+
87
+ Utilities:
88
+ help [COMMAND] Show help
89
+ history Show command history
90
+ clear Clear screen
91
+ config Show configuration
92
+ stats Show statistics
93
+ exit, quit, q Exit shell
94
+ HELP
95
+
63
96
  def display_general_help
64
- puts <<~HELP
65
- #{OutputFormatter.colorize('Available Commands:', :cyan)}
66
-
67
- #{OutputFormatter.colorize('Navigation:', :yellow)}
68
- cd PATH Change to package path
69
- pwd Print current path
70
- ls [PATH] List packages
71
- tree [PATH] Show package tree
72
- up Go to parent package
73
- root Go to ModelRoot
74
- back Go to previous location
75
-
76
- #{OutputFormatter.colorize('Query:', :yellow)}
77
- find CLASS Find class (fuzzy search)
78
- show class QNAME Show class details
79
- show package PATH Show package details
80
- show NUMBER Show numbered result
81
- search QUERY Full-text search
82
- ? QUERY Alias for search
83
-
84
- #{OutputFormatter.colorize('Bookmarks:', :yellow)}
85
- bookmark add NAME Bookmark current location
86
- bookmark list List bookmarks
87
- bookmark go NAME Jump to bookmark
88
- bookmark rm NAME Remove bookmark
89
- bm NAME Quick jump
90
-
91
- #{OutputFormatter.colorize('Utilities:', :yellow)}
92
- help [COMMAND] Show help
93
- history Show command history
94
- clear Clear screen
95
- config Show configuration
96
- stats Show statistics
97
- exit, quit, q Exit shell
98
- HELP
97
+ puts OutputFormatter.colorize(HELP_TEXT, :cyan)
99
98
  end
100
99
 
101
100
  def display_command_help(command)
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "command_base"
4
- require_relative "../enhanced_formatter"
5
-
6
3
  module Lutaml
7
4
  module Cli
8
5
  class InteractiveShell
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "command_base"
4
- require_relative "../enhanced_formatter"
5
-
6
3
  module Lutaml
7
4
  module Cli
8
5
  class InteractiveShell
@@ -2,18 +2,18 @@
2
2
 
3
3
  require "readline"
4
4
  require "pathname"
5
- require_relative "enhanced_formatter"
6
- require_relative "../uml_repository/repository"
7
- require_relative "interactive_shell/command_base"
8
- require_relative "interactive_shell/navigation_commands"
9
- require_relative "interactive_shell/query_commands"
10
- require_relative "interactive_shell/bookmark_commands"
11
- require_relative "interactive_shell/export_handler"
12
- require_relative "interactive_shell/help_display"
13
5
 
14
6
  module Lutaml
15
7
  module Cli
16
8
  class InteractiveShell
9
+ autoload :CommandBase, "lutaml/cli/interactive_shell/command_base"
10
+ autoload :NavigationCommands,
11
+ "lutaml/cli/interactive_shell/navigation_commands"
12
+ autoload :QueryCommands, "lutaml/cli/interactive_shell/query_commands"
13
+ autoload :BookmarkCommands,
14
+ "lutaml/cli/interactive_shell/bookmark_commands"
15
+ autoload :ExportHandler, "lutaml/cli/interactive_shell/export_handler"
16
+ autoload :HelpDisplay, "lutaml/cli/interactive_shell/help_display"
17
17
  HISTORY_FILE = File.expand_path("~/.lutaml-xmi-history")
18
18
  MAX_HISTORY = 1000
19
19
 
@@ -2,12 +2,6 @@
2
2
 
3
3
  require "thor"
4
4
  require "pathname"
5
- require_relative "../formatter"
6
- require_relative "../uml/has_attributes"
7
- require_relative "../uml/parsers/attribute"
8
- require_relative "../uml/parsers/dsl"
9
- require_relative "../uml/parsers/yaml"
10
- require_relative "../express/parsers/exp"
11
5
 
12
6
  module Lutaml
13
7
  module Cli