suma 0.5.65 → 0.5.66
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/lib/suma/term_extractor.rb +38 -7
- 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: 862ac52cf13b628bd527afcc948ae0cc14e30768240baa1f6b9ebde918f42ffb
|
|
4
|
+
data.tar.gz: bef2207d6ad8116e55ebf419dc7add5ad4db254986af4f778fe39b75df51e65d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9a0624b9ded4731164564e1cd139cdf165d908b326c47c733f80d7517044c8452f2d361aed29949aa35de57e0d9714a7c9183d97f5a741531037c143ac3fde6a
|
|
7
|
+
data.tar.gz: 32609b4a4371ab225c6a1d9f478edd89e03b7e87aeae17000e3242fa664f7b81bf6548982a3670511d624416549a3cfe155be444e6a434ed41ffeb19822378e0
|
data/lib/suma/term_extractor.rb
CHANGED
|
@@ -232,11 +232,21 @@ module Suma
|
|
|
232
232
|
# pipeline qualifies source names with the citing schema regardless
|
|
233
233
|
# of the true declarer, so a citation naming a declaration the
|
|
234
234
|
# qualifier only imports mis-cites its owner (iso-10303#835: 2,489
|
|
235
|
-
# distinct undefined targets on the part2 build).
|
|
236
|
-
#
|
|
237
|
-
#
|
|
238
|
-
#
|
|
239
|
-
#
|
|
235
|
+
# distinct undefined targets on the part2 build). Three repairs
|
|
236
|
+
# apply, each verified before it fires:
|
|
237
|
+
#
|
|
238
|
+
# - the qualifier canonicalizes against the manifest's schema ids
|
|
239
|
+
# case-insensitively (WG 12 sources spell the same schema both
|
|
240
|
+
# ways; the rendered anchors carry the canonical id only);
|
|
241
|
+
# - the interface closure re-qualifies with the declaring schema
|
|
242
|
+
# when it proves one;
|
|
243
|
+
# - an attribute tail drops to its declared entity - the anchors
|
|
244
|
+
# the rendered document carries are concept anchors, so an
|
|
245
|
+
# attribute-level target can never resolve; the entity anchor is
|
|
246
|
+
# the declared parent and carries the attribute in its concept
|
|
247
|
+
# (iso-10303#848: 95 of the 191 residual targets). A ref the
|
|
248
|
+
# closure cannot resolve stays as written and the render-time
|
|
249
|
+
# gate counts it honestly (WG 12 position - no guessed owners).
|
|
240
250
|
def citation_ref(full_ref)
|
|
241
251
|
parts = full_ref.split(".")
|
|
242
252
|
return full_ref if parts.length < 2
|
|
@@ -247,7 +257,10 @@ module Suma
|
|
|
247
257
|
owner = declaring_schema_id(schema, parts[1])
|
|
248
258
|
return full_ref unless owner
|
|
249
259
|
|
|
250
|
-
|
|
260
|
+
# The concept anchors key on the entity alone; an attribute tail
|
|
261
|
+
# names no anchor the document renders, and the entity concept
|
|
262
|
+
# carries the attribute in its definition.
|
|
263
|
+
[owner, parts[1]].join(".")
|
|
251
264
|
end
|
|
252
265
|
|
|
253
266
|
def get_section_ref(schema)
|
|
@@ -493,17 +506,35 @@ module Suma
|
|
|
493
506
|
@loaded_schemas ||= {}
|
|
494
507
|
return @loaded_schemas[id] if @loaded_schemas.key?(id)
|
|
495
508
|
|
|
496
|
-
path =
|
|
509
|
+
path = manifest_path_for(id)
|
|
497
510
|
@loaded_schemas[id] =
|
|
498
511
|
path && Expressir::Express::Parser.from_file(path)&.schemas&.first
|
|
499
512
|
end
|
|
500
513
|
|
|
514
|
+
# The manifest path for +id+: exact match first, then
|
|
515
|
+
# case-insensitive (WG 12 sources spell the same schema both ways,
|
|
516
|
+
# iso-10303#848).
|
|
517
|
+
def manifest_path_for(id)
|
|
518
|
+
schema_manifest_paths[id] ||
|
|
519
|
+
schema_manifest_paths[canonical_schema_id(id)]
|
|
520
|
+
end
|
|
521
|
+
|
|
501
522
|
def schema_manifest_paths
|
|
502
523
|
@schema_manifest_paths ||=
|
|
503
524
|
Expressir::SchemaManifest.from_file(@schema_manifest_file).schemas
|
|
504
525
|
.to_h { |entry| [entry.id, entry.path] }
|
|
505
526
|
end
|
|
506
527
|
|
|
528
|
+
# The manifest's canonical spelling for +id+, matched
|
|
529
|
+
# case-insensitively: WG 12 sources spell the same schema both ways
|
|
530
|
+
# (`Product_property_definition_schema` and the lowercase form sit
|
|
531
|
+
# in the same file), and the rendered anchors carry the canonical
|
|
532
|
+
# id only (iso-10303#848). nil when no manifest id matches.
|
|
533
|
+
def canonical_schema_id(id)
|
|
534
|
+
lowered = id.downcase
|
|
535
|
+
schema_manifest_paths.keys.find { |known| known.downcase == lowered }
|
|
536
|
+
end
|
|
537
|
+
|
|
507
538
|
# The imported declaration's name as written in the USE FROM list:
|
|
508
539
|
# InterfaceItem carries it on #ref (the reference node), with #id
|
|
509
540
|
# holding the local rename when present.
|
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.66
|
|
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-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|