glossarist 2.14.4 → 2.14.6
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/.github/workflows/deps-audit.yml +39 -0
- data/CLAUDE.md +6 -16
- data/Gemfile +0 -3
- data/lib/glossarist/rdf/gloss_generic_relation.rb +2 -2
- data/lib/glossarist/rdf/gloss_partitive_relation.rb +2 -2
- data/lib/glossarist/sts/import_result.rb +4 -2
- data/lib/glossarist/sts/importer.rb +8 -3
- data/lib/glossarist/sts/term_extractor.rb +9 -1
- data/lib/glossarist/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c91f798fb9a6e12290005776acd08323536fae75a0c0aca50244656dd9c37109
|
|
4
|
+
data.tar.gz: 1407eba14312a21c622ac581c16d65be60d757f92af4cc19a58eec7376d9d81c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a4b2a249a197c62a304addd573c7a67243cb7c511f2f52838eb19cd9a660b4ca94ea43cd4512b8f284c7b0d77c1b5bb9888e07f2a3f94f472e2170fa0a51e996
|
|
7
|
+
data.tar.gz: aa50a0cd63c34064f5bc72cc90757e937af34ba98c2bea4f2604ca9bfe7b1808b329062893fb1b3cc9c355539a939dc1b4f8c635cd3446f4b87aa4ff0a424074
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: deps-audit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 6 * * 1"
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
freshness:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v7
|
|
13
|
+
- uses: ruby/setup-ruby@v1
|
|
14
|
+
with:
|
|
15
|
+
ruby-version: "3.4"
|
|
16
|
+
bundler-cache: false
|
|
17
|
+
- name: Fail if temporary git pins linger in the Gemfile
|
|
18
|
+
run: |
|
|
19
|
+
if grep -nE 'github:|git: =>' Gemfile; then
|
|
20
|
+
echo "::error::Gemfile still pins a git source — flip it to a released gem"
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
- name: Report core dependency freshness
|
|
24
|
+
env:
|
|
25
|
+
CORE_GEMS: relaton lutaml-model lutaml-store sts
|
|
26
|
+
run: |
|
|
27
|
+
rm -f Gemfile.lock
|
|
28
|
+
bundle lock
|
|
29
|
+
{
|
|
30
|
+
echo "## Core dependency freshness"
|
|
31
|
+
echo
|
|
32
|
+
echo "| gem | fresh resolve | latest released (incl. prerelease) |"
|
|
33
|
+
echo "| --- | --- | --- |"
|
|
34
|
+
for g in $CORE_GEMS; do
|
|
35
|
+
locked=$(awk -v g="$g" '$1 == g { gsub(/[()]/, "", $2); print $2; exit }' Gemfile.lock)
|
|
36
|
+
latest=$(gem list "^${g}\$" --remote --pre | sed -n '1s/.*(\([^,)]*\).*/\1/p')
|
|
37
|
+
echo "| $g | ${locked:-unresolved} | ${latest:-unknown} |"
|
|
38
|
+
done
|
|
39
|
+
} | tee -a "${GITHUB_STEP_SUMMARY:-/dev/null}"
|
data/CLAUDE.md
CHANGED
|
@@ -181,24 +181,14 @@ The `exe/glossarist` executable uses Thor. Commands:
|
|
|
181
181
|
|
|
182
182
|
### Dependencies
|
|
183
183
|
|
|
184
|
-
- `lutaml-model` (~> 0.8.
|
|
185
|
-
- `
|
|
186
|
-
- `relaton` (
|
|
184
|
+
- `lutaml-model` (~> 0.8.15) — serialization framework (YAML/XML/JSON-LD/Turtle)
|
|
185
|
+
- `lutaml-store` (~> 0.3) — package store backing GlossaryStore
|
|
186
|
+
- `relaton` (~> 3.0.0.pre.alpha) — bibliography database integration (relaton-3 monogem prerelease line); resolves from released gems, no git pins
|
|
187
|
+
- `sts` (~> 0.6) — ISO/NISO STS model for `Sts::Importer`
|
|
188
|
+
- `tbx` (~> 0.1) — ISO 30042:2019 TBX model classes
|
|
189
|
+
- `rdf-turtle` (~> 3.3), `shacl` (~> 0.4) — Turtle emission + SHACL validation against vendored concept-model shapes
|
|
187
190
|
- `thor` — CLI commands
|
|
188
191
|
|
|
189
|
-
## Dependencies
|
|
190
|
-
|
|
191
|
-
- `relaton` (>= 2.0.0, < 3) — bibliography database integration. Upstream
|
|
192
|
-
shipped 2.1.0 with lutaml-model 0.8 compatibility, so the historical
|
|
193
|
-
git-branch overrides are no longer needed and the Gemfile pins the
|
|
194
|
-
released gem directly.
|
|
195
|
-
- `lutaml-model` (~> 0.8.5), `lutaml-store` (~> 0.2.0) — serialization
|
|
196
|
-
framework (YAML/XML/JSON-LD/Turtle) and package store.
|
|
197
|
-
- `tbx` — ISO 30042:2019 TBX model classes.
|
|
198
|
-
- `thor` — CLI commands.
|
|
199
|
-
- `rdf-turtle` (~> 3.3), `shacl` (~> 0.4) — Turtle emission + SHACL
|
|
200
|
-
validation against vendored concept-model shapes.
|
|
201
|
-
|
|
202
192
|
## SchemaMigration module split
|
|
203
193
|
|
|
204
194
|
`SchemaMigration` is a thin facade over three single-concern modules:
|
data/Gemfile
CHANGED
|
@@ -5,9 +5,6 @@ gem "canon"
|
|
|
5
5
|
gem "nokogiri"
|
|
6
6
|
gem "rake", "~> 13.0"
|
|
7
7
|
gem "rdf-turtle", "~> 3.3"
|
|
8
|
-
# TEMPORARY: rubyzip-3 + key_value remap fixes are merged on main
|
|
9
|
-
# (lutaml-model#830, #840); flip to released on the next lutaml-model release.
|
|
10
|
-
gem "lutaml-model", github: "lutaml/lutaml-model", branch: "main"
|
|
11
8
|
gem "rspec", "~> 3.0"
|
|
12
9
|
gem "rubocop"
|
|
13
10
|
gem "rubocop-performance"
|
|
@@ -17,7 +17,7 @@ module Glossarist
|
|
|
17
17
|
|
|
18
18
|
subject { |r| "genericRelation/#{GlossGenericRelation.deterministic_id(r)}" }
|
|
19
19
|
|
|
20
|
-
types "gloss:
|
|
20
|
+
types "gloss:GenericRelation"
|
|
21
21
|
|
|
22
22
|
predicate :comprehensive, namespace: Namespaces::GlossaristNamespace,
|
|
23
23
|
to: :comprehensive_uri, uri_reference: true
|
|
@@ -28,7 +28,7 @@ module Glossarist
|
|
|
28
28
|
predicate :criterion, namespace: Namespaces::GlossaristNamespace,
|
|
29
29
|
to: :criterion
|
|
30
30
|
|
|
31
|
-
members :generic_members, link: "gloss:
|
|
31
|
+
members :generic_members, link: "gloss:hasMember"
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def self.deterministic_id(rel)
|
|
@@ -17,7 +17,7 @@ module Glossarist
|
|
|
17
17
|
|
|
18
18
|
subject { |r| "partitiveRelation/#{GlossPartitiveRelation.deterministic_id(r)}" }
|
|
19
19
|
|
|
20
|
-
types "gloss:
|
|
20
|
+
types "gloss:PartitiveRelation"
|
|
21
21
|
|
|
22
22
|
predicate :comprehensive, namespace: Namespaces::GlossaristNamespace,
|
|
23
23
|
to: :comprehensive_uri, uri_reference: true
|
|
@@ -28,7 +28,7 @@ module Glossarist
|
|
|
28
28
|
predicate :criterion, namespace: Namespaces::GlossaristNamespace,
|
|
29
29
|
to: :criterion
|
|
30
30
|
|
|
31
|
-
members :partitive_members, link: "gloss:
|
|
31
|
+
members :partitive_members, link: "gloss:hasMember"
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def self.deterministic_id(rel)
|
|
@@ -6,14 +6,16 @@ module Glossarist
|
|
|
6
6
|
keyword_init: true)
|
|
7
7
|
|
|
8
8
|
class ImportResult
|
|
9
|
-
attr_reader :concepts, :conflicts, :source_files, :skipped_count
|
|
9
|
+
attr_reader :concepts, :conflicts, :source_files, :skipped_count,
|
|
10
|
+
:warnings
|
|
10
11
|
|
|
11
12
|
def initialize(concepts:, conflicts: [], source_files: [],
|
|
12
|
-
skipped_count: 0)
|
|
13
|
+
skipped_count: 0, warnings: [])
|
|
13
14
|
@concepts = concepts
|
|
14
15
|
@conflicts = conflicts
|
|
15
16
|
@source_files = source_files
|
|
16
17
|
@skipped_count = skipped_count
|
|
18
|
+
@warnings = warnings
|
|
17
19
|
end
|
|
18
20
|
|
|
19
21
|
def conflict?
|
|
@@ -20,7 +20,7 @@ module Glossarist
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def import_new(xml_files, output:, shortname: nil, version: nil, **opts)
|
|
23
|
-
raw_concepts = extract_all_concepts(xml_files)
|
|
23
|
+
raw_concepts, warnings = extract_all_concepts(xml_files)
|
|
24
24
|
concepts, conflicts, skipped = dedup_concepts(raw_concepts)
|
|
25
25
|
|
|
26
26
|
if output.end_with?(".gcr")
|
|
@@ -44,12 +44,13 @@ module Glossarist
|
|
|
44
44
|
conflicts: conflicts,
|
|
45
45
|
source_files: xml_files,
|
|
46
46
|
skipped_count: skipped,
|
|
47
|
+
warnings: warnings,
|
|
47
48
|
)
|
|
48
49
|
end
|
|
49
50
|
|
|
50
51
|
def import_into_existing(xml_files, dataset_path)
|
|
51
52
|
existing = load_existing(dataset_path)
|
|
52
|
-
new_concepts = extract_all_concepts(xml_files)
|
|
53
|
+
new_concepts, warnings = extract_all_concepts(xml_files)
|
|
53
54
|
index = build_concept_index(existing)
|
|
54
55
|
|
|
55
56
|
result_state = apply_with_dedup(new_concepts, existing, index)
|
|
@@ -61,6 +62,7 @@ module Glossarist
|
|
|
61
62
|
conflicts: result_state.conflicts,
|
|
62
63
|
source_files: xml_files,
|
|
63
64
|
skipped_count: result_state.skipped,
|
|
65
|
+
warnings: warnings,
|
|
64
66
|
)
|
|
65
67
|
end
|
|
66
68
|
|
|
@@ -102,11 +104,14 @@ module Glossarist
|
|
|
102
104
|
end
|
|
103
105
|
|
|
104
106
|
def extract_all_concepts(xml_files)
|
|
105
|
-
|
|
107
|
+
warnings = []
|
|
108
|
+
concepts = xml_files.flat_map do |path|
|
|
106
109
|
extractor = TermExtractor.new(path)
|
|
110
|
+
warnings.concat(extractor.warnings)
|
|
107
111
|
terms = extractor.extract
|
|
108
112
|
terms.map { |t| @mapper.map(t) }
|
|
109
113
|
end
|
|
114
|
+
[concepts, warnings]
|
|
110
115
|
end
|
|
111
116
|
|
|
112
117
|
def dedup_concepts(concepts) # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity
|
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
module Glossarist
|
|
4
4
|
module Sts
|
|
5
5
|
class TermExtractor
|
|
6
|
+
attr_reader :warnings
|
|
7
|
+
|
|
6
8
|
def initialize(xml_path)
|
|
9
|
+
@xml_path = xml_path
|
|
7
10
|
raw = File.read(xml_path)
|
|
8
11
|
@standard = ::Sts::IsoSts::Standard.from_xml(raw)
|
|
12
|
+
@warnings = []
|
|
9
13
|
@source_ref = extract_source_ref
|
|
10
14
|
@std_prefix = extract_std_prefix(@source_ref)
|
|
11
15
|
end
|
|
@@ -240,7 +244,11 @@ module Glossarist
|
|
|
240
244
|
return nil unless front
|
|
241
245
|
|
|
242
246
|
meta = front.iso_meta
|
|
243
|
-
|
|
247
|
+
if meta.nil?
|
|
248
|
+
@warnings << "#{File.basename(@xml_path)}: front carries no " \
|
|
249
|
+
"iso-meta; source_ref unavailable for its terms"
|
|
250
|
+
return nil
|
|
251
|
+
end
|
|
244
252
|
|
|
245
253
|
refs = meta.std_ref
|
|
246
254
|
return nil unless refs&.any?
|
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.14.
|
|
4
|
+
version: 2.14.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -173,6 +173,7 @@ extensions: []
|
|
|
173
173
|
extra_rdoc_files: []
|
|
174
174
|
files:
|
|
175
175
|
- ".editorconfig"
|
|
176
|
+
- ".github/workflows/deps-audit.yml"
|
|
176
177
|
- ".github/workflows/rake.yml"
|
|
177
178
|
- ".github/workflows/release.yml"
|
|
178
179
|
- ".gitignore"
|