lutaml 0.11.9 → 0.11.10

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 (171) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/docs.yml +87 -0
  3. data/.github/workflows/links.yml +113 -0
  4. data/.github/workflows/rake.yml +52 -0
  5. data/.github/workflows/release.yml +83 -0
  6. data/.gitignore +29 -0
  7. data/CLAUDE.md +27 -0
  8. data/Gemfile +2 -2
  9. data/docs/.github/workflows/docs.yml +66 -0
  10. data/docs/.github/workflows/links.yml +78 -0
  11. data/docs/CONTINUATION_PLAN.md +168 -0
  12. data/docs/Gemfile +13 -0
  13. data/docs/MIGRATION_GUIDE.md +202 -0
  14. data/docs/README.md +252 -0
  15. data/docs/REFACTOR_PLAN.md +214 -0
  16. data/docs/_config.yml +144 -0
  17. data/docs/_guides/cli-usage.adoc +43 -0
  18. data/docs/_guides/diagram-generation.adoc +316 -0
  19. data/docs/_guides/index.adoc +136 -0
  20. data/docs/_guides/parsing/express-parsing.adoc +42 -0
  21. data/docs/_guides/parsing/index.adoc +78 -0
  22. data/docs/_guides/parsing/qea-parsing.adoc +47 -0
  23. data/docs/_guides/parsing/xmi-parsing.adoc +40 -0
  24. data/docs/_guides/repository-management.adoc +44 -0
  25. data/docs/_guides/sysml-modeling.adoc +37 -0
  26. data/docs/_guides/uml-modeling.adoc +115 -0
  27. data/docs/_pages/concepts/diagram-generation.adoc +337 -0
  28. data/docs/_pages/concepts/lur-format.adoc +711 -0
  29. data/docs/_pages/concepts/qea-parsing.adoc +418 -0
  30. data/docs/_pages/concepts/uml-models.adoc +43 -0
  31. data/docs/_pages/core/architecture.adoc +329 -0
  32. data/docs/_pages/core/installation.adoc +321 -0
  33. data/docs/_pages/core/overview.adoc +197 -0
  34. data/docs/_pages/index.adoc +49 -0
  35. data/docs/_pages/uml-syntax.adoc +1011 -0
  36. data/docs/_references/api/parsers.adoc +61 -0
  37. data/docs/_references/api/presenters.adoc +43 -0
  38. data/docs/_references/api/repository.adoc +67 -0
  39. data/docs/_references/cli/commands.adoc +72 -0
  40. data/docs/_references/configuration/diagram-styles.adoc +716 -0
  41. data/docs/_references/configuration/index.adoc +53 -0
  42. data/docs/_references/configuration/package-metadata.adoc +416 -0
  43. data/docs/_references/formats/index.adoc +43 -0
  44. data/docs/_references/formats/lur-format.adoc +39 -0
  45. data/docs/_references/formats/lutaml-syntax.adoc +379 -0
  46. data/docs/_references/formats/qea-structure.adoc +1364 -0
  47. data/docs/_references/index.adoc +198 -0
  48. data/docs/_tutorials/documentation-site.adoc +47 -0
  49. data/docs/_tutorials/first-lur-package.adoc +45 -0
  50. data/docs/_tutorials/generating-diagrams.adoc +42 -0
  51. data/docs/_tutorials/getting-started.adoc +45 -0
  52. data/docs/_tutorials/index.adoc +100 -0
  53. data/docs/_tutorials/querying-models.adoc +44 -0
  54. data/docs/examples/build_package.rb +12 -0
  55. data/docs/examples/build_site.rb +12 -0
  56. data/docs/examples/city_model.rb +21 -0
  57. data/docs/examples/present_class.rb +10 -0
  58. data/docs/examples/query_model.rb +12 -0
  59. data/docs/examples/render_diagram.rb +11 -0
  60. data/docs/index.adoc +64 -0
  61. data/docs/lml-models-and-instances-syntax.adoc +931 -0
  62. data/docs/lml.adoc +210 -0
  63. data/docs/lychee.toml +50 -0
  64. data/lib/lutaml/version.rb +1 -1
  65. data/lib/lutaml.rb +6 -1
  66. data/lutaml.gemspec +8 -6
  67. metadata +75 -131
  68. data/exe/lutaml-lml +0 -6
  69. data/exe/lutaml-lml-lsp +0 -11
  70. data/lib/lutaml/lml/association_label_resolver.rb +0 -52
  71. data/lib/lutaml/lml/cli.rb +0 -506
  72. data/lib/lutaml/lml/data_processor/attribute_processing.rb +0 -133
  73. data/lib/lutaml/lml/data_processor/collection_processing.rb +0 -37
  74. data/lib/lutaml/lml/data_processor/instance_processing.rb +0 -77
  75. data/lib/lutaml/lml/data_processor/value_declaration_processing.rb +0 -70
  76. data/lib/lutaml/lml/data_processor/value_processing.rb +0 -103
  77. data/lib/lutaml/lml/data_processor/view_processing.rb +0 -26
  78. data/lib/lutaml/lml/data_processor.rb +0 -59
  79. data/lib/lutaml/lml/diagnostic.rb +0 -149
  80. data/lib/lutaml/lml/document_builder.rb +0 -481
  81. data/lib/lutaml/lml/entity_types.rb +0 -30
  82. data/lib/lutaml/lml/executor/adapter_helpers.rb +0 -45
  83. data/lib/lutaml/lml/executor/condition_evaluator.rb +0 -169
  84. data/lib/lutaml/lml/executor/csv_adapter.rb +0 -88
  85. data/lib/lutaml/lml/executor/format_adapter.rb +0 -54
  86. data/lib/lutaml/lml/executor/xml_adapter.rb +0 -102
  87. data/lib/lutaml/lml/executor.rb +0 -96
  88. data/lib/lutaml/lml/format/adapter/document.rb +0 -11
  89. data/lib/lutaml/lml/format/adapter/mapping.rb +0 -31
  90. data/lib/lutaml/lml/format/adapter/standard_adapter.rb +0 -162
  91. data/lib/lutaml/lml/format/adapter/transform.rb +0 -11
  92. data/lib/lutaml/lml/format.rb +0 -29
  93. data/lib/lutaml/lml/formatter/base.rb +0 -79
  94. data/lib/lutaml/lml/formatter/canonical.rb +0 -736
  95. data/lib/lutaml/lml/formatter/elk.rb +0 -45
  96. data/lib/lutaml/lml/formatter/svg_pdf/path_parser.rb +0 -134
  97. data/lib/lutaml/lml/formatter/svg_pdf.rb +0 -285
  98. data/lib/lutaml/lml/formatter.rb +0 -11
  99. data/lib/lutaml/lml/grammar/lml.artifact.json +0 -14993
  100. data/lib/lutaml/lml/grammar/lml.parg +0 -389
  101. data/lib/lutaml/lml/grammar.rb +0 -60
  102. data/lib/lutaml/lml/has_attributes.rb +0 -14
  103. data/lib/lutaml/lml/import_resolver.rb +0 -96
  104. data/lib/lutaml/lml/layout/elk_engine.rb +0 -15
  105. data/lib/lutaml/lml/layout/elk_graph_builder.rb +0 -129
  106. data/lib/lutaml/lml/layout/elk_svg_markers.rb +0 -45
  107. data/lib/lutaml/lml/layout/elk_svg_renderer.rb +0 -119
  108. data/lib/lutaml/lml/layout/engine.rb +0 -17
  109. data/lib/lutaml/lml/layout.rb +0 -12
  110. data/lib/lutaml/lml/literal_value.rb +0 -32
  111. data/lib/lutaml/lml/lsp/conversions.rb +0 -78
  112. data/lib/lutaml/lml/lsp/keywords.rb +0 -43
  113. data/lib/lutaml/lml/lsp/server.rb +0 -378
  114. data/lib/lutaml/lml/lsp/store.rb +0 -68
  115. data/lib/lutaml/lml/lsp/transport.rb +0 -53
  116. data/lib/lutaml/lml/lsp.rb +0 -16
  117. data/lib/lutaml/lml/model_compiler/enums.rb +0 -172
  118. data/lib/lutaml/lml/model_compiler/hydration.rb +0 -123
  119. data/lib/lutaml/lml/model_compiler/serialization_mappings.rb +0 -188
  120. data/lib/lutaml/lml/model_compiler/string_formats.rb +0 -42
  121. data/lib/lutaml/lml/model_compiler/validation.rb +0 -65
  122. data/lib/lutaml/lml/model_compiler.rb +0 -323
  123. data/lib/lutaml/lml/models/action.rb +0 -10
  124. data/lib/lutaml/lml/models/association.rb +0 -29
  125. data/lib/lutaml/lml/models/cardinality.rb +0 -10
  126. data/lib/lutaml/lml/models/collection.rb +0 -11
  127. data/lib/lutaml/lml/models/constraint.rb +0 -23
  128. data/lib/lutaml/lml/models/data_type.rb +0 -41
  129. data/lib/lutaml/lml/models/derived_field.rb +0 -14
  130. data/lib/lutaml/lml/models/diagram.rb +0 -20
  131. data/lib/lutaml/lml/models/document.rb +0 -84
  132. data/lib/lutaml/lml/models/enum.rb +0 -38
  133. data/lib/lutaml/lml/models/fidelity.rb +0 -10
  134. data/lib/lutaml/lml/models/group.rb +0 -11
  135. data/lib/lutaml/lml/models/instance.rb +0 -26
  136. data/lib/lutaml/lml/models/instance_collection.rb +0 -16
  137. data/lib/lutaml/lml/models/instances_export.rb +0 -10
  138. data/lib/lutaml/lml/models/instances_import.rb +0 -11
  139. data/lib/lutaml/lml/models/mapping.rb +0 -15
  140. data/lib/lutaml/lml/models/mapping_rule.rb +0 -16
  141. data/lib/lutaml/lml/models/member_field.rb +0 -14
  142. data/lib/lutaml/lml/models/namespace.rb +0 -16
  143. data/lib/lutaml/lml/models/operation.rb +0 -26
  144. data/lib/lutaml/lml/models/operation_parameter.rb +0 -12
  145. data/lib/lutaml/lml/models/package.rb +0 -26
  146. data/lib/lutaml/lml/models/primitive_type.rb +0 -33
  147. data/lib/lutaml/lml/models/reference.rb +0 -23
  148. data/lib/lutaml/lml/models/serialization_mapping.rb +0 -19
  149. data/lib/lutaml/lml/models/string_format.rb +0 -16
  150. data/lib/lutaml/lml/models/top_element_attribute.rb +0 -116
  151. data/lib/lutaml/lml/models/uml_class.rb +0 -85
  152. data/lib/lutaml/lml/models/value.rb +0 -15
  153. data/lib/lutaml/lml/models/view_filter.rb +0 -11
  154. data/lib/lutaml/lml/models/view_import.rb +0 -11
  155. data/lib/lutaml/lml/parser.rb +0 -19
  156. data/lib/lutaml/lml/pipeline.rb +0 -73
  157. data/lib/lutaml/lml/positioned.rb +0 -13
  158. data/lib/lutaml/lml/preprocessor.rb +0 -130
  159. data/lib/lutaml/lml/quoting.rb +0 -60
  160. data/lib/lutaml/lml/source.rb +0 -49
  161. data/lib/lutaml/lml/source_position.rb +0 -20
  162. data/lib/lutaml/lml/symbol_index.rb +0 -200
  163. data/lib/lutaml/lml/transform.rb +0 -119
  164. data/lib/lutaml/lml/types/text_type.rb +0 -28
  165. data/lib/lutaml/lml/types.rb +0 -10
  166. data/lib/lutaml/lml/validator.rb +0 -458
  167. data/lib/lutaml/lml/version.rb +0 -10
  168. data/lib/lutaml/lml/view_resolution.rb +0 -32
  169. data/lib/lutaml/lml/view_resolver.rb +0 -48
  170. data/lib/lutaml/lml/yaml_parser.rb +0 -17
  171. data/lib/lutaml/lml.rb +0 -130
data/docs/lml.adoc ADDED
@@ -0,0 +1,210 @@
1
+ = LML: the LutaML Model Language
2
+
3
+ NOTE: LML was formerly the separate `lutaml-lml` gem; it is now part of `lutaml`
4
+ (`require "lutaml"` or `require "lutaml/lml"`). `lutaml-lml` remains as a
5
+ transitional alias that depends on `lutaml`.
6
+
7
+ LutaML Model Language (LML) — a text DSL for describing UML-style
8
+ models and their data instances, parsed into typed domain models and
9
+ rendered as diagrams via GraphViz (provided by the separate
10
+ `lutaml-graphviz` gem; add it to your Gemfile).
11
+
12
+ == Status
13
+
14
+ RS 3001 (LutaML language, `lutaml-lang.adoc`) is the authoritative
15
+ base and is fully implemented: classes, enums, data types, attributes
16
+ (including `values` sets, `pattern`, cardinality, defaults), the
17
+ canonical `value` construct, packages, namespacing, instances and
18
+ instance collections with references, and the validation rules
19
+ (uniqueness, mandatory attributes, type and pattern conformity,
20
+ reference validity and circularity). Every normative example of the
21
+ specification is vendored as a conformance corpus and runs in CI.
22
+
23
+ RS 3010 (declarations extension, `lml-declarations.adoc`) covers
24
+ serialization mappings (XML elements/attributes/content, key-value
25
+ wire names, namespaces), `isa`, `derive`, `string_format`, enum
26
+ member payloads and `from_table` artifact references.
27
+
28
+ Tooling: a canonical form with a `lutaml format [--check]` formatter and
29
+ an idempotence guarantee; structured diagnostics (code, position,
30
+ remedy) across parse, validation, and hydration; a stdio language
31
+ server (`lutaml-lml-lsp`); language-version negotiation via the
32
+ `lml "x.y"` prologue; and seeded generative round-trip laws (value,
33
+ key, document, idempotence) that run at reduced depth in CI and
34
+ nightly at full depth.
35
+
36
+ == Installation
37
+
38
+ ....
39
+ gem install lutaml-lml
40
+ ....
41
+
42
+ == Usage
43
+
44
+ Parse an LML document:
45
+
46
+ ....
47
+ require "lutaml/lml"
48
+
49
+ # parse_document: pipeline only — raw collections, unresolved imports.
50
+ doc = Lutaml::Lml.parse_document(File.new("model.lml"))
51
+ # parse: pipeline + view resolution (imports expanded, show/hide
52
+ # filters applied, association labels enriched).
53
+ doc = Lutaml::Lml.parse(File.new("model.lml"))
54
+ doc.classes.first.attributes.map(&:name)
55
+ ....
56
+
57
+ Validate against the RS 3001 rules:
58
+
59
+ ....
60
+ violations = Lutaml::Lml::Validator.diagnostics(doc)
61
+ violations.each { |diagnostic| puts diagnostic }
62
+ # 1:7: [validation/LML-V01] 'Tile' is defined 2 times in the document root
63
+ # remedy: Rename or remove the duplicate definition.
64
+ ....
65
+
66
+ == Diagnostics
67
+
68
+ Parse, validation, hydration, and contract failures are
69
+ `Lutaml::Lml::Diagnostic` records: `code`, `severity`, `file`, `line`,
70
+ `column`, `length`, `message`, and `remedy`. Parse failures raise an
71
+ error carrying the record (`error.diagnostic`); validation returns them
72
+ from `Lutaml::Lml::Validator.diagnostics`. `lutaml validate --format
73
+ json` emits the diagnostic array machine-readably.
74
+
75
+ [cols="1,2,2",options="header"]
76
+ |===
77
+ |Code |Meaning |Remedy
78
+
79
+ |`parse/LML-001` |Syntax error |Fix the syntax at the reported position.
80
+ |`parse/LML-002` |Unterminated block comment |Terminate the block comment with `*/`.
81
+ |`parse/LML-003` |Include could not be read or is circular |Check the include path and the included file.
82
+ |`validation/LML-V01` |Duplicate definition in a scope |Rename or remove the duplicate definition.
83
+ |`validation/LML-V02` |Duplicate attribute in a definition |Rename or remove the duplicate attribute.
84
+ |`validation/LML-V03` |Mandatory attribute not populated |Populate the mandatory attribute on the instance.
85
+ |`validation/LML-V04` |Value does not match the declared primitive type |Use a value matching the declared primitive type.
86
+ |`validation/LML-V05` |Value outside the declared value set |Use one of the values declared for the attribute.
87
+ |`validation/LML-V06` |Instance attribute is not declared |Declare the attribute or remove it from the instance.
88
+ |`validation/LML-V07` |Reference does not resolve |Point the reference at an existing instance or attribute.
89
+ |`validation/LML-V08` |Circular reference |Break the reference cycle.
90
+ |`validation/LML-V09` |Value does not match the attribute pattern |Use a value matching the attribute pattern.
91
+ |`validation/LML-V10` |Attribute pattern does not compile |Fix the attribute pattern so that it compiles.
92
+ |`hydration/LML-H01` |Instance data could not be hydrated |Check the instance data against the compiled model.
93
+ |`contract/LML-C01` |Input file not found |Check the path of the input file.
94
+ |`contract/LML-C02` |Unsupported input format |Use one of the supported input formats.
95
+ |`contract/LML-C03` |Input file could not be read or parsed in its format |Check the input file and its format.
96
+ |`contract/LML-C04` |Invalid cardinality token while compiling |Use a cardinality token such as `1`, `0..1`, or `0..n`.
97
+ |`contract/LML-C05` |View import could not be resolved |Check the imported view path and the imported files.
98
+ |`contract/LML-C06` |Document declares a newer language version |Use a supported language version or upgrade lutaml-lml.
99
+ |===
100
+
101
+ == Value semantics
102
+
103
+ String values are quoted (double or single) with exactly two escape
104
+ sequences — `\"` and `\\` — strict in both quote kinds; a backslash
105
+ before anything else does not form a string. Quoted content is
106
+ verbatim: padding, embedded quotes, and backslashes survive
107
+ parse/emit round-trips (the emitter escapes values and attribute
108
+ keys; attribute keys may be quoted whenever they are not bare words).
109
+
110
+ `null` is a value: an explicit `null` assignment denotes the null
111
+ value, an unassigned optional attribute is absent, and the empty
112
+ string `""` is a present, zero-length value — the three are distinct.
113
+
114
+ ....
115
+ instance R {
116
+ name = "Raku \"kiln\" fired" // escapes
117
+ note = "" // present, empty
118
+ retired = null // null value
119
+ // an attribute simply not assigned here is absent
120
+ }
121
+ ....
122
+
123
+ Compile model definitions into `Lutaml::Model::Serializable` classes and
124
+ hydrate instance data. Pass `namespace:` to register the compiled classes
125
+ as constants (a String namespace is created if absent) — named classes are
126
+ what JSON Schema / YAML Schema generation requires:
127
+
128
+ ....
129
+ compiler = Lutaml::Lml::ModelCompiler.new(namespace: "MyModels")
130
+ compiler.compile(File.new("model.lml"))
131
+ klass = compiler.compiled_classes["Ceramic"]
132
+ instance = compiler.hydrate(File.new("data.lml"))
133
+
134
+ Lutaml::Model::Schema.to_json(klass) # JSON Schema document
135
+ Lutaml::Model::Schema.to_yaml(klass) # YAML Schema document
136
+ ....
137
+
138
+ Command line:
139
+
140
+ ....
141
+ lutaml generate model.lml # diagram via GraphViz
142
+ lutaml generate model.lml --layout elk -o diagram.pdf # in-process ELK layout; PDF via pdfrb (also svg, ps, eps, emf)
143
+ lutaml validate model.lml # parse + RS 3001 rule violations
144
+ lutaml format model.lml # rewrite into the RS 3001 canonical form
145
+ lutaml format model.lml --check # report non-canonical files with a diff; exit 1
146
+ lutaml compile model.lml # lutaml-model classes
147
+ lutaml compile model.lml --schema json -o schemas/
148
+ lutaml compile model.lml --schema yaml -o ceramic.schema.yaml
149
+ ....
150
+
151
+ == Language version
152
+
153
+ A document may declare the LML grammar version it speaks with an
154
+ optional first line:
155
+
156
+ ....
157
+ lml "1.0"
158
+
159
+ class Ceramic { }
160
+ ....
161
+
162
+ The supported version is the version compiled into the grammar artifact.
163
+ A document declaring a newer version parses, with a warning diagnostic
164
+ (`contract/LML-C06`): forward compatibility is preserved and the
165
+ declaration is recorded on `Document#lml_version`.
166
+
167
+ == Editor support (LSP)
168
+
169
+ The gem ships `lutaml-lml-lsp`, a Language Server Protocol server over
170
+ stdin/stdout:
171
+
172
+ ....
173
+ lutaml-lml-lsp
174
+ ....
175
+
176
+ It provides push and pull diagnostics (`Lutaml::Lml::Diagnostic`
177
+ records), document symbols (packages, classes, enums, attributes,
178
+ instances, values), go-to-definition and find-references (types,
179
+ values-set references, `ref:(path)` targets), hover (type, cardinality,
180
+ default, pattern, definitions, and the null/empty/absence note),
181
+ completion (keywords read from the compiled grammar artifact plus model
182
+ names), and canonical formatting through the formatter. Unparseable
183
+ documents publish a parse diagnostic and leave the server running.
184
+
185
+ == Architecture
186
+
187
+ The language grammar is written in PARG
188
+ (`lib/lutaml/lml/grammar/lml.parg`) and compiled by
189
+ https://github.com/parsanol/parsanol-ruby[parsanol]; the compiled
190
+ artifact is committed for fast cold loads (`rake parg` regenerates it).
191
+ Comments and whitespace are grammar-level skip trivia. Comments are
192
+ consumed between any two tokens; quoted strings never start comments.
193
+
194
+ Pipeline: preprocessor (include expansion) → PARG parser → transform →
195
+ data processor → document builder → post-parse resolvers (imports,
196
+ views, association labels).
197
+
198
+ == Development
199
+
200
+ ....
201
+ bundle install
202
+ bundle exec rake spec # test suite incl. the RS 3001 corpus
203
+ bundle exec rake parg # regenerate the compiled grammar artifact
204
+ bundle exec rubocop
205
+ ....
206
+
207
+ == Documentation
208
+
209
+ * RS 3001 — LutaML language: `lutaml-lang.adoc`
210
+ * RS 3010 — declarations extension: `lml-declarations.adoc`
data/docs/lychee.toml ADDED
@@ -0,0 +1,50 @@
1
+ # Lychee link checker configuration for LutaML documentation
2
+
3
+ # Cache results to speed up repeated checks
4
+ cache = true
5
+
6
+ # Maximum number of concurrent requests
7
+ max_concurrency = 10
8
+
9
+ # Request timeout in seconds
10
+ timeout = 30
11
+
12
+ # Maximum number of retries per link
13
+ max_retries = 3
14
+
15
+ # Maximum redirect depth (redirects are followed up to this many)
16
+ max_redirects = 5
17
+
18
+ # Accept these HTTP status codes as success
19
+ accept = [200, 203, 204, 206, 429]
20
+
21
+ # Exclude URLs matching these regexes
22
+ exclude = [
23
+ # This exact URL is probed separately; only an explicit challenge is deferred.
24
+ '^https://sparxsystems\.com/$',
25
+ # Checked against built files by scripts/check-site-urls.rb before lychee.
26
+ '^https://www\.lutaml\.org/lutaml(?:/|$)',
27
+ '^https://lutaml\.github\.io/lutaml(?:/|$)',
28
+ '^https?://localhost(?:[:/]|$)',
29
+ '^https?://127\.0\.0\.1(?:[:/]|$)',
30
+ '^https?://example\.com(?:[:/]|$)',
31
+ '^https://github\.com/[^/]+/[^/]+/edit/',
32
+ '^https://api\.github\.com/',
33
+ ]
34
+
35
+ # Do not show a progress bar in CI
36
+ no_progress = true
37
+
38
+ # Output format
39
+ format = "markdown"
40
+
41
+ # HTTP headers to send with requests
42
+ header = { "User-Agent" = "Mozilla/5.0 (compatible; Lychee/0.23.0; +https://github.com/lycheeverse/lychee)" }
43
+
44
+ # Schemes to check
45
+ scheme = ["https", "http"]
46
+
47
+ # Exclude these paths from file-system discovery. NOTE: do not exclude _site/
48
+ # here — the CI link check explicitly targets _site/**/*.html, and excluding it
49
+ # would drop every file ("No files found") and fail with failIfEmpty.
50
+ exclude_path = [".git/", "node_modules/", "vendor/"]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lutaml
4
- VERSION = "0.11.9"
4
+ VERSION = "0.11.10"
5
5
  end
data/lib/lutaml.rb CHANGED
@@ -1,8 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative "lutaml/version"
4
- require_relative "lutaml/lml"
5
4
  require "lutaml/model"
5
+ # The LutaML Model Language core (namespace, models, formatter/layout
6
+ # seam registries) ships inside lutaml-model from 0.8.188; this gem no
7
+ # longer carries lib/lutaml/lml. The render backends (ELK, DOT
8
+ # emission, SVG/PDF) live in lutaml-diagram, which reopens
9
+ # Lutaml::Formatter and Lutaml::Layout.
10
+ require "lutaml/lml"
6
11
 
7
12
  # The serialization runtime is the lutaml-model gem. lutaml-uml loads when
8
13
  # present (it depends on lutaml-model, not on this gem).
data/lutaml.gemspec CHANGED
@@ -29,12 +29,14 @@ Gem::Specification.new do |spec|
29
29
 
30
30
  spec.required_ruby_version = ">= 3.2.0"
31
31
 
32
- # The serialization runtime is the lutaml-model gem.
33
- spec.add_dependency "lutaml-model", "~> 0.8.159"
34
- spec.add_dependency "moxml", ">= 0.1.24"
32
+ # The serialization runtime is the lutaml-model gem. The floor is
33
+ # the LML subsume (0.8.188): the LutaML Model Language core ships
34
+ # inside lutaml-model from that release on, and this gem no longer
35
+ # carries its own lib/lutaml/lml tree.
36
+ spec.add_dependency "lutaml-model", "~> 0.8.188"
35
37
  spec.add_dependency "lutaml-uml", "~> 1.0"
36
- # Lazy-required by Lutaml::Lml::Grammar: consumers that only use the
37
- # model runtime never load it.
38
- spec.add_dependency "parsanol", "~> 1.5.0"
38
+ spec.add_dependency "moxml", ">= 0.1.24"
39
+ # parsanol rode the absorbed LML tree; the grammar machinery
40
+ # ships inside lutaml-model now.
39
41
  spec.metadata["rubygems_mfa_required"] = "true"
40
42
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.9
4
+ version: 0.11.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-11-27 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: lutaml-model
@@ -15,28 +16,14 @@ dependencies:
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
- version: 0.8.159
19
+ version: 0.8.188
19
20
  type: :runtime
20
21
  prerelease: false
21
22
  version_requirements: !ruby/object:Gem::Requirement
22
23
  requirements:
23
24
  - - "~>"
24
25
  - !ruby/object:Gem::Version
25
- version: 0.8.159
26
- - !ruby/object:Gem::Dependency
27
- name: moxml
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 0.1.24
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: 0.1.24
26
+ version: 0.8.188
40
27
  - !ruby/object:Gem::Dependency
41
28
  name: lutaml-uml
42
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,33 +39,37 @@ dependencies:
52
39
  - !ruby/object:Gem::Version
53
40
  version: '1.0'
54
41
  - !ruby/object:Gem::Dependency
55
- name: parsanol
42
+ name: moxml
56
43
  requirement: !ruby/object:Gem::Requirement
57
44
  requirements:
58
- - - "~>"
45
+ - - ">="
59
46
  - !ruby/object:Gem::Version
60
- version: 1.5.0
47
+ version: 0.1.24
61
48
  type: :runtime
62
49
  prerelease: false
63
50
  version_requirements: !ruby/object:Gem::Requirement
64
51
  requirements:
65
- - - "~>"
52
+ - - ">="
66
53
  - !ruby/object:Gem::Version
67
- version: 1.5.0
54
+ version: 0.1.24
68
55
  description: 'LutaML: data models in textual form'
69
56
  email:
70
57
  - open.source@ribose.com
71
- executables:
72
- - lutaml-lml
73
- - lutaml-lml-lsp
58
+ executables: []
74
59
  extensions: []
75
60
  extra_rdoc_files: []
76
61
  files:
62
+ - ".github/workflows/docs.yml"
63
+ - ".github/workflows/links.yml"
64
+ - ".github/workflows/rake.yml"
65
+ - ".github/workflows/release.yml"
66
+ - ".gitignore"
77
67
  - ".hound.yml"
78
68
  - ".rspec"
79
69
  - ".rubocop.yml"
80
70
  - ".rubocop_todo.yml"
81
71
  - CHANGELOG.md
72
+ - CLAUDE.md
82
73
  - Gemfile
83
74
  - README.adoc
84
75
  - README.md
@@ -88,111 +79,62 @@ files:
88
79
  - bin/plantuml2lutaml
89
80
  - bin/setup
90
81
  - bin/yaml2lutaml
91
- - exe/lutaml-lml
92
- - exe/lutaml-lml-lsp
82
+ - docs/.github/workflows/docs.yml
83
+ - docs/.github/workflows/links.yml
84
+ - docs/CONTINUATION_PLAN.md
85
+ - docs/Gemfile
86
+ - docs/MIGRATION_GUIDE.md
87
+ - docs/README.md
88
+ - docs/REFACTOR_PLAN.md
89
+ - docs/_config.yml
90
+ - docs/_guides/cli-usage.adoc
91
+ - docs/_guides/diagram-generation.adoc
92
+ - docs/_guides/index.adoc
93
+ - docs/_guides/parsing/express-parsing.adoc
94
+ - docs/_guides/parsing/index.adoc
95
+ - docs/_guides/parsing/qea-parsing.adoc
96
+ - docs/_guides/parsing/xmi-parsing.adoc
97
+ - docs/_guides/repository-management.adoc
98
+ - docs/_guides/sysml-modeling.adoc
99
+ - docs/_guides/uml-modeling.adoc
100
+ - docs/_pages/concepts/diagram-generation.adoc
101
+ - docs/_pages/concepts/lur-format.adoc
102
+ - docs/_pages/concepts/qea-parsing.adoc
103
+ - docs/_pages/concepts/uml-models.adoc
104
+ - docs/_pages/core/architecture.adoc
105
+ - docs/_pages/core/installation.adoc
106
+ - docs/_pages/core/overview.adoc
107
+ - docs/_pages/index.adoc
108
+ - docs/_pages/uml-syntax.adoc
109
+ - docs/_references/api/parsers.adoc
110
+ - docs/_references/api/presenters.adoc
111
+ - docs/_references/api/repository.adoc
112
+ - docs/_references/cli/commands.adoc
113
+ - docs/_references/configuration/diagram-styles.adoc
114
+ - docs/_references/configuration/index.adoc
115
+ - docs/_references/configuration/package-metadata.adoc
116
+ - docs/_references/formats/index.adoc
117
+ - docs/_references/formats/lur-format.adoc
118
+ - docs/_references/formats/lutaml-syntax.adoc
119
+ - docs/_references/formats/qea-structure.adoc
120
+ - docs/_references/index.adoc
121
+ - docs/_tutorials/documentation-site.adoc
122
+ - docs/_tutorials/first-lur-package.adoc
123
+ - docs/_tutorials/generating-diagrams.adoc
124
+ - docs/_tutorials/getting-started.adoc
125
+ - docs/_tutorials/index.adoc
126
+ - docs/_tutorials/querying-models.adoc
127
+ - docs/examples/build_package.rb
128
+ - docs/examples/build_site.rb
129
+ - docs/examples/city_model.rb
130
+ - docs/examples/present_class.rb
131
+ - docs/examples/query_model.rb
132
+ - docs/examples/render_diagram.rb
133
+ - docs/index.adoc
134
+ - docs/lml-models-and-instances-syntax.adoc
135
+ - docs/lml.adoc
136
+ - docs/lychee.toml
93
137
  - lib/lutaml.rb
94
- - lib/lutaml/lml.rb
95
- - lib/lutaml/lml/association_label_resolver.rb
96
- - lib/lutaml/lml/cli.rb
97
- - lib/lutaml/lml/data_processor.rb
98
- - lib/lutaml/lml/data_processor/attribute_processing.rb
99
- - lib/lutaml/lml/data_processor/collection_processing.rb
100
- - lib/lutaml/lml/data_processor/instance_processing.rb
101
- - lib/lutaml/lml/data_processor/value_declaration_processing.rb
102
- - lib/lutaml/lml/data_processor/value_processing.rb
103
- - lib/lutaml/lml/data_processor/view_processing.rb
104
- - lib/lutaml/lml/diagnostic.rb
105
- - lib/lutaml/lml/document_builder.rb
106
- - lib/lutaml/lml/entity_types.rb
107
- - lib/lutaml/lml/executor.rb
108
- - lib/lutaml/lml/executor/adapter_helpers.rb
109
- - lib/lutaml/lml/executor/condition_evaluator.rb
110
- - lib/lutaml/lml/executor/csv_adapter.rb
111
- - lib/lutaml/lml/executor/format_adapter.rb
112
- - lib/lutaml/lml/executor/xml_adapter.rb
113
- - lib/lutaml/lml/format.rb
114
- - lib/lutaml/lml/format/adapter/document.rb
115
- - lib/lutaml/lml/format/adapter/mapping.rb
116
- - lib/lutaml/lml/format/adapter/standard_adapter.rb
117
- - lib/lutaml/lml/format/adapter/transform.rb
118
- - lib/lutaml/lml/formatter.rb
119
- - lib/lutaml/lml/formatter/base.rb
120
- - lib/lutaml/lml/formatter/canonical.rb
121
- - lib/lutaml/lml/formatter/elk.rb
122
- - lib/lutaml/lml/formatter/svg_pdf.rb
123
- - lib/lutaml/lml/formatter/svg_pdf/path_parser.rb
124
- - lib/lutaml/lml/grammar.rb
125
- - lib/lutaml/lml/grammar/lml.artifact.json
126
- - lib/lutaml/lml/grammar/lml.parg
127
- - lib/lutaml/lml/has_attributes.rb
128
- - lib/lutaml/lml/import_resolver.rb
129
- - lib/lutaml/lml/layout.rb
130
- - lib/lutaml/lml/layout/elk_engine.rb
131
- - lib/lutaml/lml/layout/elk_graph_builder.rb
132
- - lib/lutaml/lml/layout/elk_svg_markers.rb
133
- - lib/lutaml/lml/layout/elk_svg_renderer.rb
134
- - lib/lutaml/lml/layout/engine.rb
135
- - lib/lutaml/lml/literal_value.rb
136
- - lib/lutaml/lml/lsp.rb
137
- - lib/lutaml/lml/lsp/conversions.rb
138
- - lib/lutaml/lml/lsp/keywords.rb
139
- - lib/lutaml/lml/lsp/server.rb
140
- - lib/lutaml/lml/lsp/store.rb
141
- - lib/lutaml/lml/lsp/transport.rb
142
- - lib/lutaml/lml/model_compiler.rb
143
- - lib/lutaml/lml/model_compiler/enums.rb
144
- - lib/lutaml/lml/model_compiler/hydration.rb
145
- - lib/lutaml/lml/model_compiler/serialization_mappings.rb
146
- - lib/lutaml/lml/model_compiler/string_formats.rb
147
- - lib/lutaml/lml/model_compiler/validation.rb
148
- - lib/lutaml/lml/models/action.rb
149
- - lib/lutaml/lml/models/association.rb
150
- - lib/lutaml/lml/models/cardinality.rb
151
- - lib/lutaml/lml/models/collection.rb
152
- - lib/lutaml/lml/models/constraint.rb
153
- - lib/lutaml/lml/models/data_type.rb
154
- - lib/lutaml/lml/models/derived_field.rb
155
- - lib/lutaml/lml/models/diagram.rb
156
- - lib/lutaml/lml/models/document.rb
157
- - lib/lutaml/lml/models/enum.rb
158
- - lib/lutaml/lml/models/fidelity.rb
159
- - lib/lutaml/lml/models/group.rb
160
- - lib/lutaml/lml/models/instance.rb
161
- - lib/lutaml/lml/models/instance_collection.rb
162
- - lib/lutaml/lml/models/instances_export.rb
163
- - lib/lutaml/lml/models/instances_import.rb
164
- - lib/lutaml/lml/models/mapping.rb
165
- - lib/lutaml/lml/models/mapping_rule.rb
166
- - lib/lutaml/lml/models/member_field.rb
167
- - lib/lutaml/lml/models/namespace.rb
168
- - lib/lutaml/lml/models/operation.rb
169
- - lib/lutaml/lml/models/operation_parameter.rb
170
- - lib/lutaml/lml/models/package.rb
171
- - lib/lutaml/lml/models/primitive_type.rb
172
- - lib/lutaml/lml/models/reference.rb
173
- - lib/lutaml/lml/models/serialization_mapping.rb
174
- - lib/lutaml/lml/models/string_format.rb
175
- - lib/lutaml/lml/models/top_element_attribute.rb
176
- - lib/lutaml/lml/models/uml_class.rb
177
- - lib/lutaml/lml/models/value.rb
178
- - lib/lutaml/lml/models/view_filter.rb
179
- - lib/lutaml/lml/models/view_import.rb
180
- - lib/lutaml/lml/parser.rb
181
- - lib/lutaml/lml/pipeline.rb
182
- - lib/lutaml/lml/positioned.rb
183
- - lib/lutaml/lml/preprocessor.rb
184
- - lib/lutaml/lml/quoting.rb
185
- - lib/lutaml/lml/source.rb
186
- - lib/lutaml/lml/source_position.rb
187
- - lib/lutaml/lml/symbol_index.rb
188
- - lib/lutaml/lml/transform.rb
189
- - lib/lutaml/lml/types.rb
190
- - lib/lutaml/lml/types/text_type.rb
191
- - lib/lutaml/lml/validator.rb
192
- - lib/lutaml/lml/version.rb
193
- - lib/lutaml/lml/view_resolution.rb
194
- - lib/lutaml/lml/view_resolver.rb
195
- - lib/lutaml/lml/yaml_parser.rb
196
138
  - lib/lutaml/version.rb
197
139
  - lutaml.gemspec
198
140
  - plateau_all_packages.lur
@@ -204,6 +146,7 @@ metadata:
204
146
  source_code_uri: https://github.com/lutaml/lutaml
205
147
  changelog_uri: https://github.com/lutaml/lutaml/releases
206
148
  rubygems_mfa_required: 'true'
149
+ post_install_message:
207
150
  rdoc_options: []
208
151
  require_paths:
209
152
  - lib
@@ -218,7 +161,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
161
  - !ruby/object:Gem::Version
219
162
  version: '0'
220
163
  requirements: []
221
- rubygems_version: 3.6.9
164
+ rubygems_version: 3.5.22
165
+ signing_key:
222
166
  specification_version: 4
223
167
  summary: 'LutaML: data models in textual form'
224
168
  test_files: []
data/exe/lutaml-lml DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "lutaml/lml/cli"
5
-
6
- Lutaml::Cli::LmlCommands.start(ARGV)
data/exe/lutaml-lml-lsp DELETED
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "lutaml/lml"
5
-
6
- # JSON-RPC framing is byte-oriented; text-mode newline translation would
7
- # turn \r\n into \r\r\n and break Content-Length.
8
- $stdin.binmode
9
- $stdout.binmode
10
-
11
- exit Lutaml::Lml::Lsp::Server.new.run
@@ -1,52 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Lutaml
4
- module Lml
5
- class AssociationLabelResolver
6
- def enrich(document)
7
- class_index = build_class_index(document)
8
- document.associations.each do |assoc|
9
- enrich_owner_end(assoc, class_index)
10
- enrich_member_end(assoc, class_index)
11
- end
12
- document
13
- end
14
-
15
- private
16
-
17
- def build_class_index(document)
18
- document.all_classes.each_with_object({}) { |klass, index| index[klass.name] = klass }
19
- end
20
-
21
- def enrich_owner_end(assoc, class_index)
22
- return if assoc.owner_end_attribute_name
23
-
24
- owner_class = class_index[assoc.owner_end.to_s]
25
- return unless owner_class
26
-
27
- attr = find_attribute_by_type(owner_class, assoc.member_end.to_s)
28
- return unless attr
29
-
30
- assoc.owner_end_attribute_name = attr.name
31
- assoc.owner_end_cardinality = attr.cardinality if attr.cardinality
32
- end
33
-
34
- def enrich_member_end(assoc, class_index)
35
- return if assoc.member_end_attribute_name
36
-
37
- member_class = class_index[assoc.member_end.to_s]
38
- return unless member_class
39
-
40
- attr = find_attribute_by_type(member_class, assoc.owner_end.to_s)
41
- return unless attr
42
-
43
- assoc.member_end_attribute_name = attr.name
44
- assoc.member_end_cardinality = attr.cardinality if attr.cardinality
45
- end
46
-
47
- def find_attribute_by_type(klass, target_type_name)
48
- klass.attributes&.find { |a| a.type == target_type_name }
49
- end
50
- end
51
- end
52
- end