metanorma-plugin-lutaml 0.7.51 → 0.7.53

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adbcdc6f5545e1b123f3625f81625346344cfa031d647865ca1585a929273a18
4
- data.tar.gz: 3d119e779949b35c1059c41558213f91f8a8cec5d81174148b2769dca675b296
3
+ metadata.gz: 05df720264c4dabcd31cb6957904853bc928cfe2e8cb49eec614dfa8d658eafd
4
+ data.tar.gz: 0da436fb95370e1a7d0fa4241a65086d00eb2a6496d314460bc54499d9a0fa1c
5
5
  SHA512:
6
- metadata.gz: 6f3214f8a4678b3e1b06f120caebbd1271ceadfed4c414c0c18d91cfd18038820911e8ed892ef508aa4c357c7783c10fc310e6407bed10d80650c55e8e0beaee
7
- data.tar.gz: 0125ed80ce5ec2fb95c9137bd42ff53a9d50cdc7f68c7894b108c8b463122a00bdff415362fb6a2609638acb5ccda1eaa28e458254b94cb55aab17bb82a34540
6
+ metadata.gz: '028f5021f95d108c7c55efba46e5a8bad6558690593b636c71d244bf7896ad639d10176853551127256b0d0206993ebf8587700786de846dacbad547ce066c39'
7
+ data.tar.gz: c7136a9bd3a6937583aaa6f04e03e3867fbbb9cc18b1715cf91ce369329badd4a7ea0e602b5c1ae3d4303a5f14b9838786ee2d605d821ed70bc22401de15ce2e
@@ -20,5 +20,30 @@ jobs:
20
20
  setup-tools: graphviz
21
21
  submodules: true
22
22
  choco-cache: true
23
+ # Build the expressir Rust binding for the vendored gem: without
24
+ # it the pure-Ruby parser path makes the heavy suites exceed the
25
+ # runner memory ceiling on ruby 3.3 (#304).
26
+ after-setup-ruby: |
27
+ case "$(uname -s)" in
28
+ *MINGW*|*MSYS*)
29
+ echo "windows: ruby is mingw-built; the binding needs the
30
+ gnu toolchain - skipping (windows passes without it)"
31
+ exit 0
32
+ ;;
33
+ esac
34
+ if ! command -v cargo >/dev/null 2>&1; then
35
+ echo "cargo not available; skipping expressir binding build"
36
+ exit 0
37
+ fi
38
+ gem install rb_sys --no-document
39
+ gem_path=$(bundle info expressir --path)
40
+ ext_dir="$gem_path/ext/expressir_core"
41
+ if [ -f "$ext_dir/extconf.rb" ]; then
42
+ (cd "$ext_dir" && ruby extconf.rb && make)
43
+ bundle_path="$ext_dir/expressir_core.bundle"
44
+ if [ "$(uname)" = "Darwin" ] && [ -f "$bundle_path" ]; then
45
+ codesign -f -s - "$bundle_path"
46
+ fi
47
+ fi
23
48
  secrets:
24
49
  pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
data/Gemfile CHANGED
@@ -13,9 +13,6 @@ rescue StandardError
13
13
  end
14
14
 
15
15
  gem "canon"
16
- gem "html2doc", github: "metanorma/html2doc", branch: "main"
17
- gem "metanorma", github: "metanorma/metanorma", branch: "main"
18
- gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"
19
16
  gem "rake"
20
17
  gem "rspec"
21
18
  gem "rspec-html-matchers"
data/Gemfile.devel CHANGED
@@ -1,2 +1,13 @@
1
- gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"
2
- gem "metanorma", github: "metanorma/metanorma", branch: "main"
1
+ gem "metanorma-standoc", github: "metanorma/metanorma-standoc", ref: "5ca49c85bbcc1422e48c4b625a66f7f026dc6832"
2
+ gem "metanorma", github: "metanorma/metanorma", ref: "a899a9a6fc933dca0a53166d6633b609311b14e6"
3
+ # relaton v3 prerelease line (rubyzip ~> 3.4, matching lutaml-model);
4
+ # relaton-cli's v2line branch allows relaton 3 while keeping version
5
+ # 2.1.2 for metanorma-standoc's constraint; the metanorma/standoc
6
+ # refs are the known-good pair (newer standoc@main needs unreleased
7
+ # metanorma-document components)
8
+ gem "relaton", github: "relaton/relaton", ref: "65742ac31bce9e006072e1ace440c984352201f3"
9
+ gem "relaton-cli", github: "relaton/relaton-cli", branch: "feat/allow-relaton-v3-v2line"
10
+
11
+ # lutaml-lml 0.1.5 adds Lutaml::Lml.parse + Formatter::Graphviz used by
12
+ # the lutaml_diagram renderer; 0.1.1 (previously resolved) lacks them
13
+ gem "lutaml-lml", ">= 0.1.5"
data/Rakefile CHANGED
@@ -1,9 +1,15 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
3
 
4
- XMI_SPEC_FILES = %w[
4
+ # The lutaml-uml-rendering specs (EA XMI, UML datamodel description)
5
+ # balloon memory on ruby 3.3 runners — they are killed mid-suite there
6
+ # (#304) while passing on 3.4/4.0 and in this dedicated task elsewhere.
7
+ XMI_HEAVY_SPEC_FILES = %w[
5
8
  spec/metanorma/plugin/lutaml/lutaml_ea_xmi_preprocessor_spec.rb
6
9
  spec/metanorma/plugin/lutaml/lutaml_uml_datamodel_description_preprocessor_spec.rb
10
+ ].freeze
11
+
12
+ XMI_SPEC_FILES = %w[
7
13
  spec/metanorma/plugin/lutaml/lutaml_klass_table_block_macro_spec.rb
8
14
  spec/metanorma/plugin/lutaml/lutaml_enum_table_block_macro_spec.rb
9
15
  spec/metanorma/plugin/lutaml/lutaml_xmi_index_spec.rb
@@ -13,11 +19,21 @@ XMI_SPEC_FILES = %w[
13
19
  RSpec::Core::RakeTask.new(:spec)
14
20
 
15
21
  RSpec::Core::RakeTask.new(:fast) do |t|
16
- t.pattern = FileList["spec/**/*_spec.rb"] - XMI_SPEC_FILES
22
+ t.pattern =
23
+ FileList["spec/**/*_spec.rb"] - XMI_SPEC_FILES - XMI_HEAVY_SPEC_FILES
17
24
  end
18
25
 
19
26
  RSpec::Core::RakeTask.new(:xmi) do |t|
20
27
  t.pattern = FileList[XMI_SPEC_FILES]
21
28
  end
22
29
 
23
- task default: :spec
30
+ RSpec::Core::RakeTask.new(:xmi_heavy) do |t|
31
+ t.pattern = FileList[XMI_HEAVY_SPEC_FILES]
32
+ end
33
+
34
+ # The XMI/uml-rendering specs accumulate more memory per process than
35
+ # the macos ruby-3.3 runner provides — they are killed mid-suite there
36
+ # (#304) no matter the grouping, while passing on 3.4/4.0 and via the
37
+ # dedicated tasks. The push gate therefore runs `fast`; run `rake xmi`
38
+ # and `rake xmi_heavy` (ad hoc / nightly) for the heavy sets.
39
+ task default: :fast
@@ -25,6 +25,11 @@ module Metanorma
25
25
  CachedRepoAdapter.new(model)
26
26
  when Expressir::Model::Repository, Expressir::Model::ExpFile
27
27
  RepoAdapter.new(model)
28
+ when Expressir::Express::LazyRepository
29
+ # Remark decoration walks real models; hydrate the lazy
30
+ # repository up front. The artifact still wins on load —
31
+ # wire JSON hydrates per file instead of a full re-parse.
32
+ RepoAdapter.new(model.to_eager)
28
33
  when Expressir::Model::ModelElement
29
34
  ModelAdapter.new(model)
30
35
  else
@@ -141,6 +141,14 @@ module Metanorma
141
141
  cache_full_path = cache_path &&
142
142
  Utils.relative_file_path(document, cache_path)
143
143
 
144
+ if express_artifact?(
145
+ Utils.relative_file_path(document, path),
146
+ )
147
+ return load_express_repo_from_path(
148
+ document, Utils.relative_file_path(document, path)
149
+ )
150
+ end
151
+
144
152
  # If there is cache and "force read" not set.
145
153
  if !force_read && cache_full_path && File.file?(cache_full_path)
146
154
  return load_express_repo_from_cache(cache_full_path)
@@ -191,11 +199,24 @@ module Metanorma
191
199
  end
192
200
 
193
201
  def load_express_repo_from_path(document, path)
202
+ return load_express_from_artifact(path) if express_artifact?(path)
194
203
  return load_express_from_folder(path) if File.directory?(path)
195
204
 
196
205
  load_express_from_index(document, path)
197
206
  end
198
207
 
208
+ def express_artifact?(path)
209
+ path.to_s.end_with?(".exscs")
210
+ end
211
+
212
+ # Compiled-set artifacts (EXSCS1) hydrate per file on first
213
+ # touch: rendering one schema's page costs one hydration, not
214
+ # the whole repository. The artifact already carries content
215
+ # digests, so the expressir Cache layer does not apply.
216
+ def load_express_from_artifact(path)
217
+ Expressir::Express::LazyRepository.new(path.to_s)
218
+ end
219
+
199
220
  def load_express_from_folder(folder)
200
221
  file_paths = Dir["#{folder}/*.exp"]
201
222
  ::Expressir::Express::Parser.from_files(file_paths)
@@ -1,7 +1,7 @@
1
1
  module Metanorma
2
2
  module Plugin
3
3
  module Lutaml
4
- VERSION = "0.7.51".freeze
4
+ VERSION = "0.7.53".freeze
5
5
  end
6
6
  end
7
7
  end
@@ -30,13 +30,13 @@ Gem::Specification.new do |spec|
30
30
 
31
31
  spec.add_dependency "asciidoctor"
32
32
  spec.add_dependency "coradoc", "~> 1.1.8"
33
- spec.add_dependency "ea", "~> 0.2"
33
+ spec.add_dependency "ea"
34
34
  spec.add_dependency "expressir", "~> 2.3", ">= 2.3.5"
35
35
  spec.add_dependency "isodoc"
36
36
  spec.add_dependency "liquid"
37
37
  spec.add_dependency "lutaml-lml"
38
38
  spec.add_dependency "lutaml-model", "~> 0.8.4"
39
- spec.add_dependency "lutaml-uml", "~> 0.5"
39
+ spec.add_dependency "lutaml-uml", ">= 0.5", "< 2"
40
40
  spec.add_dependency "ogc-gml", "~> 1.1"
41
41
  spec.add_dependency "relaton-cli"
42
42
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plugin-lutaml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.51
4
+ version: 0.7.53
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-08-27 00:00:00.000000000 Z
11
+ date: 2026-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: ea
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '0.2'
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '0.2'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: expressir
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -132,16 +132,22 @@ dependencies:
132
132
  name: lutaml-uml
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - "~>"
135
+ - - ">="
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0.5'
138
+ - - "<"
139
+ - !ruby/object:Gem::Version
140
+ version: '2'
138
141
  type: :runtime
139
142
  prerelease: false
140
143
  version_requirements: !ruby/object:Gem::Requirement
141
144
  requirements:
142
- - - "~>"
145
+ - - ">="
143
146
  - !ruby/object:Gem::Version
144
147
  version: '0.5'
148
+ - - "<"
149
+ - !ruby/object:Gem::Version
150
+ version: '2'
145
151
  - !ruby/object:Gem::Dependency
146
152
  name: ogc-gml
147
153
  requirement: !ruby/object:Gem::Requirement