glossarist 2.6.9 → 2.8.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c8c40cbee20f8b32a07768e3a18f5424d47200fbf1881d37563403399e94dac8
|
|
4
|
+
data.tar.gz: ff491ad1c74576a7ee743dc77fbb143dc4c71e690f1d13a57c2601d98da6289f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c6688d6e709e85dfaf7316306e37f743b5eb093e248ba6a189077c55e7274fb6405a38b94e49c32bb12ab3f7f51c31546e170fc88cdb5ad774f7fe9fae7e975
|
|
7
|
+
data.tar.gz: 6e031043ea2dc45971cb29858c8be4d11110a8751680e3041f8d5593f4ccc1992660a5d41981026fabd86c68b10847f0f7df611cf61ae33eb416f5c99136456c
|
|
@@ -15,13 +15,21 @@ module Glossarist
|
|
|
15
15
|
result = ValidationResult.new
|
|
16
16
|
context = Validation::Rules::DatasetContext.new(@path)
|
|
17
17
|
concept_rules = Validation::Rules::Registry.for_scope(:concept)
|
|
18
|
-
total = ConceptCollector.count(@path)
|
|
19
|
-
file_idx = 0
|
|
20
18
|
|
|
21
|
-
ConceptCollector.
|
|
22
|
-
|
|
19
|
+
all_concepts = ConceptCollector.collect(@path)
|
|
20
|
+
total = all_concepts.length
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
if total.zero?
|
|
23
|
+
yaml_files = find_yaml_files
|
|
24
|
+
if yaml_files.any?
|
|
25
|
+
result.add_error("YAML files found but no parseable concepts")
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
all_concepts.each { |c| context.add_concept(c) }
|
|
30
|
+
|
|
31
|
+
all_concepts.each_with_index do |concept, idx|
|
|
32
|
+
fname = concept_file_name(concept, idx)
|
|
25
33
|
concept_context = Validation::Rules::ConceptContext.new(
|
|
26
34
|
concept, file_name: fname, collection_context: context
|
|
27
35
|
)
|
|
@@ -32,15 +40,7 @@ module Glossarist
|
|
|
32
40
|
rule.check(concept_context).each { |i| result.add_issue(i) }
|
|
33
41
|
end
|
|
34
42
|
|
|
35
|
-
|
|
36
|
-
@on_progress&.call(file_idx, total)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
if file_idx.zero?
|
|
40
|
-
yaml_files = find_yaml_files
|
|
41
|
-
if yaml_files.any?
|
|
42
|
-
result.add_error("YAML files found but no parseable concepts")
|
|
43
|
-
end
|
|
43
|
+
@on_progress&.call(idx + 1, total)
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
# Run collection-level rules
|
|
@@ -28,9 +28,14 @@ module Glossarist
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def self.build_from_directory(dataset_path)
|
|
31
|
+
concepts = ConceptCollector.collect(dataset_path)
|
|
32
|
+
build_from_concepts(concepts, dataset_path)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def self.build_from_concepts(concepts, dataset_path)
|
|
31
36
|
index = new
|
|
32
37
|
index_image_files(index, dataset_path)
|
|
33
|
-
|
|
38
|
+
index_concept_assets(index, concepts)
|
|
34
39
|
index
|
|
35
40
|
end
|
|
36
41
|
|
|
@@ -63,11 +68,6 @@ module Glossarist
|
|
|
63
68
|
end
|
|
64
69
|
end
|
|
65
70
|
|
|
66
|
-
def index_model_assets(index, dataset_path)
|
|
67
|
-
concepts = ConceptCollector.collect(dataset_path)
|
|
68
|
-
index_concept_assets(index, concepts)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
71
|
def index_zip_images(index, zip_path)
|
|
72
72
|
Zip::File.open(zip_path) do |zf|
|
|
73
73
|
zf.entries.each do |entry|
|
data/lib/glossarist/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: glossarist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|