suma 0.5.26 → 0.5.28
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 +4 -4
- data/Gemfile +9 -8
- data/lib/suma/cli/core.rb +3 -0
- data/lib/suma/staged_collection_builder.rb +31 -0
- data/lib/suma/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0bb8744184776002c6d02458beb0f97029bc00a8b2435e687391898433e3b48b
|
|
4
|
+
data.tar.gz: a3db39f829a59d6d40c77515fd45d1ca00cf2029aa857e57595ba556a145a8a5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55be8bebac14f2c3e70c6e80371aae3219ebb853aba0eaf8a6f9a3c4887eb5f7c8bee4a879c7641699a17f6817260241ab7de757b8aaf6d2ef96844034e39964
|
|
7
|
+
data.tar.gz: 2b0a3ca43fcc0b609653ffe3b4d3b0754a83502dd591bf2dc3f19a5ddc850e454be488333583c467d5571293d931659cc5a8033425a0bf5d1e216c0515ff8fff
|
data/Gemfile
CHANGED
|
@@ -39,9 +39,11 @@ gem "metanorma-core", github: "metanorma/metanorma-core", branch: "main"
|
|
|
39
39
|
# and crashes collection renders. Revert to the released gem once an
|
|
40
40
|
# isodoc release carries the allowance.
|
|
41
41
|
gem "isodoc", github: "metanorma/isodoc", branch: "main"
|
|
42
|
-
# relaton
|
|
43
|
-
#
|
|
44
|
-
|
|
42
|
+
# relaton floor: isodoc main (post-relaton#462 consolidation) requires
|
|
43
|
+
# relaton ~> 3.1.1 -- the consolidated relaton gem absorbed
|
|
44
|
+
# relaton-cli/relaton-render, whose standalone lines stop being the
|
|
45
|
+
# interface.
|
|
46
|
+
gem "relaton", "~> 3.1.1"
|
|
45
47
|
# gem "metanorma-plugin-lutaml", github: "metanorma/metanorma-plugin-lutaml", branch: "main"
|
|
46
48
|
# gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"
|
|
47
49
|
# gem "expressir", github: "lutaml/expressir", branch: "main"
|
|
@@ -63,8 +65,7 @@ gem "rubocop-rspec"
|
|
|
63
65
|
# this shim (verified: HTML builds LoadError without it).
|
|
64
66
|
# Re-evaluate once suma rides released isodoc.
|
|
65
67
|
gem "sassc-embedded", "~> 1.0"
|
|
66
|
-
# relaton-
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
#
|
|
70
|
-
gem "relaton-bib", "2.1.9"
|
|
68
|
+
# The standalone relaton-bib pin is gone with the relaton#462
|
|
69
|
+
# consolidation: relaton ~> 3.1.1 embeds Relaton::Bib, and loading the
|
|
70
|
+
# standalone gem alongside it double-defines every Relaton class
|
|
71
|
+
# (RequestError superclass mismatch at require "metanorma").
|
data/lib/suma/cli/core.rb
CHANGED
|
@@ -67,6 +67,9 @@ module Suma
|
|
|
67
67
|
|
|
68
68
|
desc "generate-schemas METANORMA_MANIFEST_FILE SCHEMA_MANIFEST_FILE",
|
|
69
69
|
"Generate EXPRESS schema manifest file from Metanorma site manifest"
|
|
70
|
+
option :exclude_paths, type: :string, aliases: "-e",
|
|
71
|
+
desc: "Exclude schemas paths by pattern " \
|
|
72
|
+
"(e.g. `*_lf.exp`)"
|
|
70
73
|
def generate_schemas(_metanorma_manifest_file, _schema_manifest_file)
|
|
71
74
|
Cli::GenerateSchemas.start
|
|
72
75
|
end
|
|
@@ -304,6 +304,37 @@ module Suma
|
|
|
304
304
|
end
|
|
305
305
|
end
|
|
306
306
|
end
|
|
307
|
+
|
|
308
|
+
# The corpus manifests carry no bibdata, so bibdatas is
|
|
309
|
+
# empty and the loop above never runs (suma#181): the
|
|
310
|
+
# artefacts stay keyed under the document's own docid and
|
|
311
|
+
# reinflate - looking up by the docref identifier - finds
|
|
312
|
+
# nothing on a cold store ("no stored artefact"). metanorma
|
|
313
|
+
# resolves every manifest identifier to the document docid
|
|
314
|
+
# during populate and records the mapping on the manifest
|
|
315
|
+
# itself (identifier_aliases, raw -> resolved). That map is
|
|
316
|
+
# the child's own post-render collection - reading it is
|
|
317
|
+
# race-free per the suma#167 discipline.
|
|
318
|
+
aliases = begin
|
|
319
|
+
collection.manifest.identifier_aliases || {}
|
|
320
|
+
rescue NoMethodError
|
|
321
|
+
{}
|
|
322
|
+
end
|
|
323
|
+
aliases.each do |original, resolved|
|
|
324
|
+
src = resolved.to_s
|
|
325
|
+
.gsub(/[^A-Za-z0-9._-]+/, "-").gsub(/-{2,}/, "-")
|
|
326
|
+
.gsub(/\A-|-\z/, "")
|
|
327
|
+
dst = original.to_s
|
|
328
|
+
.gsub(/[^A-Za-z0-9._-]+/, "-").gsub(/-{2,}/, "-")
|
|
329
|
+
.gsub(/\A-|-\z/, "")
|
|
330
|
+
next if src.empty? || dst.empty? || src == dst
|
|
331
|
+
|
|
332
|
+
Dir[File.join(store_dir, "#{src}.*.semantic.xml")].each do |f|
|
|
333
|
+
FileUtils.cp(
|
|
334
|
+
f, f.sub(%r{/#{Regexp.escape(src)}\.}, "/#{dst}."),
|
|
335
|
+
)
|
|
336
|
+
end
|
|
337
|
+
end
|
|
307
338
|
warn format("[staged worker %d] batch %d/%d member %d OK (%ds)",
|
|
308
339
|
Process.pid, idx + 1, count, j, Time.now - t0)
|
|
309
340
|
ensure
|
data/lib/suma/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: suma
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.28
|
|
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-11-
|
|
11
|
+
date: 2026-11-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: expressir
|