glossarist 2.8.4 → 2.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89c7a717dae1507460851447c6a4d30699ef02c7eef890ed4c58da9ec14bda8a
4
- data.tar.gz: 629d99f655aeee99db137139ee6f49173f5bf26d56c7452c035f63c56af7d961
3
+ metadata.gz: ac9ce2a15558722dfa456e5fd7a02c288fafecfe67da68e75608318580469bef
4
+ data.tar.gz: bdc3ca2aacf91db0a77e341cb8ff114a83b7e897b79b96ba6bcef42dab678689
5
5
  SHA512:
6
- metadata.gz: de839b4b877b200bd870fb57d438491ac4e8f8ecfbf5a99c68c40abec4bad695071cdef108e626b28913329839ea49587973b43a80a7896d98f65e8fb6ac064b
7
- data.tar.gz: 3ec787b9b02f6febf1c19475986842731bd9e831f753c10258b7bb0b10ee04b36aaa04b4b07297f994e91dc72df929f4585a6abf451da469a5bf3906dd127564
6
+ metadata.gz: e1e026ac1b3daf5f3ed111a69198fea632f698767495d21612743f0161cd41e75466de670322178357e475aa60d1b56b994391ff02efa40953b640265b5f4bac
7
+ data.tar.gz: f01e0d1928cd86531326b86c4e150814a080b2bf2536cd3804bce4e7c5e9c484dd88cc561ac20526faf73b5b964b25d3b45c72fbb5160b042a1f98bc85b08e29
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-06-03 01:34:20 UTC using RuboCop version 1.86.1.
3
+ # on 2026-06-08 08:10:16 UTC using RuboCop version 1.86.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -11,171 +11,22 @@ Gemspec/RequiredRubyVersion:
11
11
  Exclude:
12
12
  - 'glossarist.gemspec'
13
13
 
14
- # Offense count: 166
14
+ # Offense count: 1
15
15
  # This cop supports safe autocorrection (--autocorrect).
16
16
  # Configuration parameters: EnforcedStyle, IndentationWidth.
17
17
  # SupportedStyles: with_first_argument, with_fixed_indentation
18
18
  Layout/ArgumentAlignment:
19
- Enabled: false
20
-
21
- # Offense count: 42
22
- # This cop supports safe autocorrection (--autocorrect).
23
- # Configuration parameters: EnforcedStyle, IndentationWidth.
24
- # SupportedStyles: with_first_element, with_fixed_indentation
25
- Layout/ArrayAlignment:
26
- Exclude:
27
- - 'lib/glossarist/rdf/relationship_predicates.rb'
28
- - 'spec/unit/rdf/ontology_conformance_spec.rb'
29
- - 'spec/unit/rdf/rdf_view_classes_spec.rb'
30
- - 'spec/unit/rdf/round_trip_spec.rb'
31
- - 'spec/unit/tags_spec.rb'
32
- - 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
33
-
34
- # Offense count: 2
35
- # This cop supports safe autocorrection (--autocorrect).
36
- # Configuration parameters: IndentationWidth.
37
- Layout/AssignmentIndentation:
38
- Exclude:
39
- - 'lib/glossarist/citation.rb'
40
-
41
- # Offense count: 20
42
- # This cop supports safe autocorrection (--autocorrect).
43
- # Configuration parameters: EnforcedStyleAlignWith.
44
- # SupportedStylesAlignWith: either, start_of_block, start_of_line
45
- Layout/BlockAlignment:
46
- Exclude:
47
- - 'lib/glossarist/rdf/gloss_designation.rb'
48
- - 'lib/glossarist/rdf/gloss_grammar_info.rb'
49
- - 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
50
- - 'lib/glossarist/rdf/gloss_pronunciation.rb'
51
- - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
52
- - 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
53
- - 'scripts/migrate_isotc204_to_v3.rb'
54
- - 'scripts/migrate_isotc211_to_v3.rb'
55
- - 'scripts/migrate_osgeo_to_v3.rb'
56
- - 'spec/unit/concept_comparator_spec.rb'
57
- - 'spec/unit/rdf/ontology_conformance_spec.rb'
58
- - 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
59
-
60
- # Offense count: 19
61
- # This cop supports safe autocorrection (--autocorrect).
62
- Layout/BlockEndNewline:
63
19
  Exclude:
64
- - 'lib/glossarist/rdf/gloss_designation.rb'
65
- - 'lib/glossarist/rdf/gloss_grammar_info.rb'
66
- - 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
67
- - 'lib/glossarist/rdf/gloss_pronunciation.rb'
68
- - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
69
- - 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
70
- - 'scripts/migrate_isotc204_to_v3.rb'
71
- - 'scripts/migrate_isotc211_to_v3.rb'
72
- - 'scripts/migrate_osgeo_to_v3.rb'
73
- - 'spec/unit/concept_comparator_spec.rb'
74
- - 'spec/unit/rdf/ontology_conformance_spec.rb'
75
- - 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
76
-
77
- # Offense count: 16
78
- # This cop supports safe autocorrection (--autocorrect).
79
- Layout/ClosingParenthesisIndentation:
80
- Exclude:
81
- - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
82
- - 'scripts/migrate_dataset.rb'
83
- - 'spec/features/v2_serialization_spec.rb'
84
- - 'spec/unit/rdf/round_trip_spec.rb'
85
- - 'spec/unit/validation_result_spec.rb'
20
+ - 'lib/glossarist/designation.rb'
86
21
 
87
22
  # Offense count: 1
88
23
  # This cop supports safe autocorrection (--autocorrect).
89
- Layout/ElseAlignment:
90
- Exclude:
91
- - 'lib/glossarist/cli/validate_command.rb'
92
-
93
- # Offense count: 10
94
- # This cop supports safe autocorrection (--autocorrect).
95
- Layout/EmptyLineAfterGuardClause:
96
- Exclude:
97
- - 'lib/glossarist/collections/bibliography_collection.rb'
98
- - 'lib/glossarist/register_data.rb'
99
- - 'lib/glossarist/validation/rules/asciidoc_xref_rule.rb'
100
- - 'lib/glossarist/validation/rules/date_type_rule.rb'
101
- - 'lib/glossarist/validation/rules/image_reference_rule.rb'
102
- - 'lib/glossarist/validation/rules/orphaned_bibliography_rule.rb'
103
- - 'lib/glossarist/validation/rules/orphaned_images_rule.rb'
104
- - 'scripts/migrate_dataset.rb'
105
- - 'spec/unit/glossary_store_spec.rb'
106
-
107
- # Offense count: 2
108
- # This cop supports safe autocorrection (--autocorrect).
109
- # Configuration parameters: EnforcedStyleAlignWith.
110
- # SupportedStylesAlignWith: keyword, variable, start_of_line
111
- Layout/EndAlignment:
112
- Exclude:
113
- - 'lib/glossarist/cli/validate_command.rb'
114
- - 'scripts/migrate_dataset.rb'
115
-
116
- # Offense count: 3
117
- # This cop supports safe autocorrection (--autocorrect).
118
24
  # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
119
25
  Layout/ExtraSpacing:
120
26
  Exclude:
121
- - 'lib/glossarist/rdf/namespaces.rb'
122
- - 'scripts/migrate_isotc211_to_v3.rb'
123
-
124
- # Offense count: 16
125
- # This cop supports safe autocorrection (--autocorrect).
126
- # Configuration parameters: EnforcedStyle, IndentationWidth.
127
- # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
128
- Layout/FirstArgumentIndentation:
129
- Exclude:
130
- - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
131
- - 'scripts/migrate_dataset.rb'
132
- - 'spec/features/v2_serialization_spec.rb'
133
- - 'spec/unit/rdf/round_trip_spec.rb'
134
- - 'spec/unit/validation_result_spec.rb'
135
-
136
- # Offense count: 22
137
- # This cop supports safe autocorrection (--autocorrect).
138
- # Configuration parameters: EnforcedStyle, IndentationWidth.
139
- # SupportedStyles: special_inside_parentheses, consistent, align_braces
140
- Layout/FirstHashElementIndentation:
141
- Exclude:
142
- - 'lib/glossarist/glossary_store.rb'
143
- - 'spec/unit/concept_comparator_spec.rb'
144
- - 'spec/unit/glossary_store_spec.rb'
145
- - 'spec/unit/schema_version_spec.rb'
146
- - 'spec/unit/validation/rules/model_validity_rule_spec.rb'
147
-
148
- # Offense count: 172
149
- # This cop supports safe autocorrection (--autocorrect).
150
- # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
151
- # SupportedHashRocketStyles: key, separator, table
152
- # SupportedColonStyles: key, separator, table
153
- # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
154
- Layout/HashAlignment:
155
- Enabled: false
27
+ - 'lib/glossarist/designation.rb'
156
28
 
157
- # Offense count: 40
158
- # This cop supports safe autocorrection (--autocorrect).
159
- # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
160
- # SupportedStylesAlignWith: start_of_line, relative_to_receiver
161
- Layout/IndentationWidth:
162
- Exclude:
163
- - 'lib/glossarist/cli/validate_command.rb'
164
- - 'lib/glossarist/rdf/gloss_designation.rb'
165
- - 'lib/glossarist/rdf/gloss_grammar_info.rb'
166
- - 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
167
- - 'lib/glossarist/rdf/gloss_pronunciation.rb'
168
- - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
169
- - 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
170
- - 'scripts/migrate_dataset.rb'
171
- - 'scripts/migrate_isotc204_to_v3.rb'
172
- - 'scripts/migrate_isotc211_to_v3.rb'
173
- - 'scripts/migrate_osgeo_to_v3.rb'
174
- - 'spec/unit/concept_comparator_spec.rb'
175
- - 'spec/unit/rdf/ontology_conformance_spec.rb'
176
- - 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
177
-
178
- # Offense count: 668
29
+ # Offense count: 420
179
30
  # This cop supports safe autocorrection (--autocorrect).
180
31
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
181
32
  # URISchemes: http, https
@@ -184,57 +35,10 @@ Layout/LineLength:
184
35
 
185
36
  # Offense count: 1
186
37
  # This cop supports safe autocorrection (--autocorrect).
187
- Layout/MultilineBlockLayout:
188
- Exclude:
189
- - 'spec/unit/concept_comparator_spec.rb'
190
-
191
- # Offense count: 5
192
- # This cop supports safe autocorrection (--autocorrect).
193
- # Configuration parameters: EnforcedStyle.
194
- # SupportedStyles: symmetrical, new_line, same_line
195
- Layout/MultilineHashBraceLayout:
196
- Exclude:
197
- - 'spec/unit/concept_comparator_spec.rb'
198
- - 'spec/unit/schema_version_spec.rb'
199
- - 'spec/unit/validation/rules/model_validity_rule_spec.rb'
200
-
201
- # Offense count: 15
202
- # This cop supports safe autocorrection (--autocorrect).
203
- # Configuration parameters: EnforcedStyle.
204
- # SupportedStyles: symmetrical, new_line, same_line
205
- Layout/MultilineMethodCallBraceLayout:
206
- Exclude:
207
- - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
208
- - 'scripts/migrate_dataset.rb'
209
- - 'spec/unit/rdf/round_trip_spec.rb'
210
- - 'spec/unit/validation_result_spec.rb'
211
-
212
- # Offense count: 1
213
- # This cop supports safe autocorrection (--autocorrect).
214
- # Configuration parameters: EnforcedStyle, IndentationWidth.
215
- # SupportedStyles: aligned, indented
216
- Layout/MultilineOperationIndentation:
217
- Exclude:
218
- - 'lib/glossarist/collections/bibliography_collection.rb'
219
-
220
- # Offense count: 16
221
- # This cop supports safe autocorrection (--autocorrect).
222
- # Configuration parameters: EnforcedStyle.
223
- # SupportedStyles: final_newline, final_blank_line
224
- Layout/TrailingEmptyLines:
225
- Enabled: false
226
-
227
- # Offense count: 226
228
- # This cop supports safe autocorrection (--autocorrect).
229
38
  # Configuration parameters: AllowInHeredoc.
230
39
  Layout/TrailingWhitespace:
231
- Enabled: false
232
-
233
- # Offense count: 1
234
- # This cop supports safe autocorrection (--autocorrect).
235
- Lint/AmbiguousOperatorPrecedence:
236
40
  Exclude:
237
- - 'lib/glossarist/validation/rules/related_concept_cycle_rule.rb'
41
+ - 'lib/glossarist/designation.rb'
238
42
 
239
43
  # Offense count: 1
240
44
  # Configuration parameters: AllowedMethods.
@@ -249,41 +53,20 @@ Lint/DuplicateBranch:
249
53
  Exclude:
250
54
  - 'scripts/migrate_dataset.rb'
251
55
 
252
- # Offense count: 4
253
- # This cop supports unsafe autocorrection (--autocorrect-all).
254
- Lint/RedundantDirGlobSort:
255
- Exclude:
256
- - 'spec/spec_helper.rb'
257
- - 'spec/unit/rdf/ontology_conformance_spec.rb'
258
- - 'spec/unit/rdf/round_trip_spec.rb'
259
-
260
56
  # Offense count: 1
261
57
  # This cop supports safe autocorrection (--autocorrect).
262
- Lint/ScriptPermission:
263
- Exclude:
264
- - 'scripts/upgrade_dataset_to_v3.rb'
265
-
266
- # Offense count: 2
267
- # This cop supports safe autocorrection (--autocorrect).
268
58
  # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
269
59
  # NotImplementedExceptions: NotImplementedError
270
60
  Lint/UnusedMethodArgument:
271
61
  Exclude:
272
62
  - 'lib/glossarist/dataset_validator.rb'
273
- - 'scripts/migrate_dataset.rb'
274
-
275
- # Offense count: 1
276
- # This cop supports safe autocorrection (--autocorrect).
277
- Lint/UselessAssignment:
278
- Exclude:
279
- - 'scripts/migrate_dataset.rb'
280
63
 
281
- # Offense count: 85
64
+ # Offense count: 84
282
65
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
283
66
  Metrics/AbcSize:
284
67
  Enabled: false
285
68
 
286
- # Offense count: 7
69
+ # Offense count: 8
287
70
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
288
71
  # AllowedMethods: refine
289
72
  Metrics/BlockLength:
@@ -304,32 +87,11 @@ Metrics/MethodLength:
304
87
  Metrics/ParameterLists:
305
88
  Max: 6
306
89
 
307
- # Offense count: 38
90
+ # Offense count: 39
308
91
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
309
92
  Metrics/PerceivedComplexity:
310
93
  Enabled: false
311
94
 
312
- # Offense count: 18
313
- # This cop supports safe autocorrection (--autocorrect).
314
- # Configuration parameters: EnforcedStyle, BlockForwardingName.
315
- # SupportedStyles: anonymous, explicit
316
- Naming/BlockForwarding:
317
- Exclude:
318
- - 'lib/glossarist/collection.rb'
319
- - 'lib/glossarist/collections/collection.rb'
320
- - 'lib/glossarist/collections/localization_collection.rb'
321
- - 'lib/glossarist/concept_collector.rb'
322
- - 'lib/glossarist/managed_concept_collection.rb'
323
- - 'lib/glossarist/validation/asset_index.rb'
324
-
325
- # Offense count: 3
326
- # This cop supports unsafe autocorrection (--autocorrect-all).
327
- # Configuration parameters: EnforcedStyleForLeadingUnderscores.
328
- # SupportedStylesForLeadingUnderscores: disallowed, required, optional
329
- Naming/MemoizedInstanceVariableName:
330
- Exclude:
331
- - 'lib/glossarist/validation/rules/orphaned_images_rule.rb'
332
-
333
95
  # Offense count: 6
334
96
  # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
335
97
  # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
@@ -337,65 +99,6 @@ Naming/MethodParameterName:
337
99
  Exclude:
338
100
  - 'lib/glossarist/schema_migration.rb'
339
101
 
340
- # Offense count: 1
341
- # This cop supports unsafe autocorrection (--autocorrect-all).
342
- # Configuration parameters: SafeMultiline.
343
- Performance/DeletePrefix:
344
- Exclude:
345
- - 'lib/glossarist/validation/rules/filename_id_rule.rb'
346
-
347
- # Offense count: 1
348
- # This cop supports unsafe autocorrection (--autocorrect-all).
349
- # Configuration parameters: SafeMultiline.
350
- Performance/DeleteSuffix:
351
- Exclude:
352
- - 'lib/glossarist/validation/rules/filename_id_rule.rb'
353
-
354
- # Offense count: 5
355
- # This cop supports unsafe autocorrection (--autocorrect-all).
356
- Performance/MapCompact:
357
- Exclude:
358
- - 'lib/glossarist/concept_set.rb'
359
- - 'lib/glossarist/gcr_statistics.rb'
360
- - 'lib/glossarist/schema_migration.rb'
361
- - 'lib/glossarist/validation/rules/localization_consistency_rule.rb'
362
-
363
- # Offense count: 16
364
- # This cop supports safe autocorrection (--autocorrect).
365
- # Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
366
- # RedundantRestArgumentNames: args, arguments
367
- # RedundantKeywordRestArgumentNames: kwargs, options, opts
368
- # RedundantBlockArgumentNames: blk, block, proc
369
- Style/ArgumentsForwarding:
370
- Exclude:
371
- - 'lib/glossarist/collection.rb'
372
- - 'lib/glossarist/collections/collection.rb'
373
- - 'lib/glossarist/collections/localization_collection.rb'
374
- - 'lib/glossarist/concept_collector.rb'
375
- - 'lib/glossarist/managed_concept_collection.rb'
376
- - 'lib/glossarist/validation/asset_index.rb'
377
-
378
- # Offense count: 23
379
- # This cop supports safe autocorrection (--autocorrect).
380
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
381
- # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
382
- # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
383
- # FunctionalMethods: let, let!, subject, watch
384
- # AllowedMethods: lambda, proc, it
385
- Style/BlockDelimiters:
386
- Exclude:
387
- - 'lib/glossarist/rdf/gloss_designation.rb'
388
- - 'lib/glossarist/rdf/gloss_grammar_info.rb'
389
- - 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
390
- - 'lib/glossarist/rdf/gloss_pronunciation.rb'
391
- - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
392
- - 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
393
- - 'scripts/migrate_isotc204_to_v3.rb'
394
- - 'scripts/migrate_isotc211_to_v3.rb'
395
- - 'scripts/migrate_osgeo_to_v3.rb'
396
- - 'spec/unit/rdf/ontology_conformance_spec.rb'
397
- - 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
398
-
399
102
  # Offense count: 6
400
103
  # This cop supports safe autocorrection (--autocorrect).
401
104
  # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
@@ -403,15 +106,6 @@ Style/BlockDelimiters:
403
106
  Style/FormatStringToken:
404
107
  EnforcedStyle: unannotated
405
108
 
406
- # Offense count: 2
407
- # This cop supports unsafe autocorrection (--autocorrect-all).
408
- # Configuration parameters: AllowedReceivers.
409
- # AllowedReceivers: Thread.current
410
- Style/HashEachMethods:
411
- Exclude:
412
- - 'lib/glossarist/validation/rules/model_validity_rule.rb'
413
- - 'lib/glossarist/validation/rules/related_concept_cycle_rule.rb'
414
-
415
109
  # Offense count: 2
416
110
  # This cop supports unsafe autocorrection (--autocorrect-all).
417
111
  Style/IdenticalConditionalBranches:
@@ -420,71 +114,9 @@ Style/IdenticalConditionalBranches:
420
114
 
421
115
  # Offense count: 1
422
116
  # This cop supports unsafe autocorrection (--autocorrect-all).
423
- Style/MapToHash:
424
- Exclude:
425
- - 'lib/glossarist/concept_set.rb'
426
-
427
- # Offense count: 1
428
- # This cop supports unsafe autocorrection (--autocorrect-all).
429
- Style/MapToSet:
430
- Exclude:
431
- - 'scripts/migrate_dataset.rb'
432
-
433
- # Offense count: 6
434
- # This cop supports safe autocorrection (--autocorrect).
435
- Style/MultilineIfModifier:
436
- Exclude:
437
- - 'lib/glossarist/citation.rb'
438
- - 'lib/glossarist/cli/validate_command.rb'
439
- - 'lib/glossarist/schema_migration.rb'
440
-
441
- # Offense count: 2
442
- # This cop supports safe autocorrection (--autocorrect).
443
- Style/MultilineTernaryOperator:
444
- Exclude:
445
- - 'lib/glossarist/cli/validate_command.rb'
446
-
447
- # Offense count: 1
448
- # This cop supports safe autocorrection (--autocorrect).
449
- # Configuration parameters: AllowMethodComparison, ComparisonsThreshold.
450
- Style/MultipleComparison:
451
- Exclude:
452
- - 'lib/glossarist/glossary_store.rb'
453
-
454
- # Offense count: 6
455
- # This cop supports safe autocorrection (--autocorrect).
456
- Style/RedundantFreeze:
457
- Exclude:
458
- - 'lib/glossarist/schema_migration.rb'
459
- - 'lib/glossarist/validation/rules/domain_target_rule.rb'
460
- - 'lib/glossarist/validation/rules/related_concept_target_rule.rb'
461
- - 'lib/glossarist/validation/rules/source_urn_format_rule.rb'
462
- - 'lib/glossarist/validation/rules/uuid_format_rule.rb'
463
-
464
- # Offense count: 2
465
- # This cop supports safe autocorrection (--autocorrect).
466
- Style/RedundantParentheses:
467
- Exclude:
468
- - 'lib/glossarist/validation/rules/date_type_rule.rb'
469
- - 'lib/glossarist/validation/rules/date_validity_rule.rb'
470
-
471
- # Offense count: 4
472
- # This cop supports safe autocorrection (--autocorrect).
473
- Style/RedundantRegexpCharacterClass:
474
- Exclude:
475
- - 'scripts/migrate_isotc211_to_v3.rb'
476
- - 'scripts/migrate_osgeo_to_v3.rb'
477
-
478
- # Offense count: 4
479
- # This cop supports unsafe autocorrection (--autocorrect-all).
480
- # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
481
- # AllowedMethods: present?, blank?, presence, try, try!
482
- Style/SafeNavigation:
117
+ Style/ReduceToHash:
483
118
  Exclude:
484
- - 'lib/glossarist/validation/rules/concept_count_rule.rb'
485
- - 'lib/glossarist/validation/rules/date_type_rule.rb'
486
- - 'lib/glossarist/validation/rules/related_concept_symmetry_rule.rb'
487
- - 'lib/glossarist/validation/rules/source_urn_format_rule.rb'
119
+ - 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
488
120
 
489
121
  # Offense count: 3
490
122
  # Configuration parameters: Max.
@@ -493,31 +125,3 @@ Style/SafeNavigationChainLength:
493
125
  - 'lib/glossarist/managed_concept.rb'
494
126
  - 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
495
127
  - 'lib/glossarist/validation/rules/source_urn_format_rule.rb'
496
-
497
- # Offense count: 1
498
- # This cop supports unsafe autocorrection (--autocorrect-all).
499
- Style/SingleArgumentDig:
500
- Exclude:
501
- - 'spec/unit/register_data_spec.rb'
502
-
503
- # Offense count: 2
504
- # This cop supports safe autocorrection (--autocorrect).
505
- # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
506
- # SupportedStyles: single_quotes, double_quotes
507
- Style/StringLiterals:
508
- Exclude:
509
- - 'lib/glossarist/validation/rules/filename_id_rule.rb'
510
-
511
- # Offense count: 48
512
- # This cop supports safe autocorrection (--autocorrect).
513
- # Configuration parameters: EnforcedStyleForMultiline.
514
- # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
515
- Style/TrailingCommaInArguments:
516
- Enabled: false
517
-
518
- # Offense count: 3
519
- # This cop supports safe autocorrection (--autocorrect).
520
- Style/YAMLFileRead:
521
- Exclude:
522
- - 'spec/unit/rdf/ontology_conformance_spec.rb'
523
- - 'spec/unit/rdf/round_trip_spec.rb'
data/Gemfile CHANGED
@@ -4,7 +4,6 @@ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
-
8
7
  gem "canon"
9
8
  gem "nokogiri"
10
9
  gem "rake", "~> 13.0"
@@ -67,6 +67,10 @@ module Glossarist
67
67
  doc["terms"] = model.terms&.map(&:to_yaml_hash)
68
68
  end
69
69
 
70
+ def self.detailed_definition_fields
71
+ %i[definition notes examples]
72
+ end
73
+
70
74
  def date_accepted
71
75
  return nil unless dates
72
76
 
@@ -81,17 +85,17 @@ module Glossarist
81
85
 
82
86
  def all_sources
83
87
  list = sources.to_a
84
- definition.each { |d| list.concat(d.sources.to_a) }
85
- notes.each { |n| list.concat(n.sources.to_a) }
86
- examples.each { |e| list.concat(e.sources.to_a) }
88
+ self.class.detailed_definition_fields.each do |field|
89
+ send(field).each { |d| list.concat(d.sources.to_a) }
90
+ end
87
91
  list
88
92
  end
89
93
 
90
94
  def text_content
91
95
  texts = []
92
- definition.each { |d| texts << d.content if d.content }
93
- notes.each { |n| texts << n.content if n.content }
94
- examples.each { |e| texts << e.content if e.content }
96
+ self.class.detailed_definition_fields.each do |field|
97
+ send(field).each { |d| texts << d.content if d.content }
98
+ end
95
99
  texts
96
100
  end
97
101
  end
@@ -4,10 +4,12 @@ module Glossarist
4
4
  class ConceptRef < Lutaml::Model::Serializable
5
5
  attribute :source, :string
6
6
  attribute :id, :string
7
+ attribute :text, :string
7
8
 
8
9
  key_value do
9
10
  map :source, to: :source
10
11
  map :id, to: :id
12
+ map :text, to: :text
11
13
  end
12
14
  end
13
15
  end
@@ -26,6 +26,10 @@ module Glossarist
26
26
  new(concept_id: concept_id, ref_type: "domain")
27
27
  end
28
28
 
29
+ def self.section(concept_id)
30
+ new(concept_id: concept_id, ref_type: "section")
31
+ end
32
+
29
33
  def local?
30
34
  %w[local designation].include?(ref_type) ||
31
35
  (ref_type.nil? && (source.nil? || source.empty?))
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/store"
4
-
5
3
  module Glossarist
6
4
  class ConceptStore
7
5
  # Serializes ConceptDocument for storage in lutaml-store.
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Glossarist
4
+ class DatasetRegister < Lutaml::Model::Serializable
5
+ attribute :schema_type, :string, default: -> { "glossarist" }
6
+ attribute :schema_version, :string, default: -> { "3" }
7
+ attribute :id, :string
8
+ attribute :ref, :string
9
+ attribute :year, :integer
10
+ attribute :urn, :string
11
+ attribute :urn_aliases, :string, collection: true
12
+ attribute :ref_aliases, :string, collection: true
13
+ attribute :status, :string
14
+ attribute :supersedes, :string
15
+ attribute :owner, :string
16
+ attribute :source_repo, :string
17
+ attribute :tags, :string, collection: true
18
+ attribute :languages, :string, collection: true
19
+ attribute :language_order, :string, collection: true
20
+ attribute :ordering, :string
21
+ attribute :sections, Section, collection: true
22
+ attribute :description, :hash
23
+ attribute :about, :hash
24
+ attribute :logo, :string
25
+
26
+ key_value do
27
+ map "schema_type", to: :schema_type
28
+ map "schema_version", to: :schema_version
29
+ map "id", to: :id
30
+ map "ref", to: :ref
31
+ map "year", to: :year
32
+ map "urn", to: :urn
33
+ map "urnAliases", to: :urn_aliases
34
+ map "refAliases", to: :ref_aliases
35
+ map "status", to: :status
36
+ map "supersedes", to: :supersedes
37
+ map "owner", to: :owner
38
+ map "sourceRepo", to: :source_repo
39
+ map "tags", to: :tags
40
+ map "languages", to: :languages
41
+ map "languageOrder", to: :language_order
42
+ map "ordering", to: :ordering
43
+ map "sections", to: :sections
44
+ map "description", to: :description
45
+ map "about", to: :about
46
+ map "logo", to: :logo
47
+ end
48
+
49
+ def section_by_id(target_id)
50
+ sections&.each do |section|
51
+ return section if section.id == target_id
52
+
53
+ found = section.descendant_by_id(target_id)
54
+ return found if found
55
+ end
56
+ nil
57
+ end
58
+
59
+ def self.from_file(path)
60
+ return nil unless File.exist?(path)
61
+
62
+ from_yaml(File.read(path, encoding: "utf-8"))
63
+ end
64
+
65
+ def self.from_directory(dir)
66
+ register_path = File.join(dir, "register.yaml")
67
+ return nil unless File.exist?(register_path)
68
+
69
+ from_file(register_path)
70
+ end
71
+ end
72
+ end
@@ -14,7 +14,7 @@ module Glossarist
14
14
  attribute :pronunciation, Pronunciation, collection: true
15
15
  attribute :sources, ConceptSource, collection: true
16
16
  attribute :term_type, :string
17
- attribute :related, RelatedConcept, collection: true
17
+ attribute :related, DesignationRelationship, collection: true
18
18
 
19
19
  key_value do
20
20
  map :type, to: :type
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Glossarist
4
+ module Designation
5
+ class DesignationRelationship < Lutaml::Model::Serializable
6
+ attribute :content, :string
7
+ attribute :type, :string,
8
+ values: Glossarist::GlossaryDefinition::DESIGNATION_RELATIONSHIP_TYPES
9
+ attribute :target, :string
10
+
11
+ key_value do
12
+ map :content, to: :content
13
+ map :type, to: :type
14
+ map :target, to: :target
15
+ end
16
+ end
17
+ end
18
+ end
@@ -2,7 +2,9 @@
2
2
 
3
3
  module Glossarist
4
4
  module Designation
5
- autoload :Base, "glossarist/designation/base"
5
+ autoload :Base, "glossarist/designation/base"
6
+ autoload :DesignationRelationship,
7
+ "glossarist/designation/designation_relationship"
6
8
  autoload :Expression, "glossarist/designation/expression"
7
9
  autoload :Abbreviation, "glossarist/designation/abbreviation"
8
10
  autoload :GrammarInfo, "glossarist/designation/grammar_info"
@@ -21,6 +21,7 @@ module Glossarist
21
21
  attribute :concept_uri_template, :string
22
22
  attribute :compiled_formats, :string, collection: true
23
23
  attribute :external_references, :hash, collection: true
24
+ attribute :translations, :hash, default: -> { {} }
24
25
 
25
26
  key_value do
26
27
  map :shortname, to: :shortname
@@ -42,28 +43,30 @@ module Glossarist
42
43
  map :concept_uri_template, to: :concept_uri_template
43
44
  map :compiled_formats, to: :compiled_formats
44
45
  map :external_references, to: :external_references
46
+ map :translations, to: :translations
45
47
  end
46
48
 
47
49
  def self.from_concepts(concepts, register_data: nil, options: {})
48
50
  stats = GcrStatistics.from_concepts(concepts)
49
51
  rd = register_data
50
52
  new(
51
- shortname: options[:shortname] || rd&.[]("shortname") || rd&.[]("id"),
52
- version: options[:version] || rd&.[]("version"),
53
- title: options[:title] || rd&.[]("name"),
54
- description: options[:description] || rd&.[]("description"),
53
+ shortname: options[:shortname] || rd&.shortname,
54
+ version: options[:version] || rd&.version,
55
+ title: options[:title] || rd&.name,
56
+ description: options[:description] || rd&.description,
55
57
  owner: options[:owner],
56
58
  tags: options[:tags] || [],
57
59
  concept_count: concepts.length,
58
60
  languages: stats.languages,
59
61
  created_at: Time.now.utc.iso8601,
60
62
  glossarist_version: Glossarist::VERSION,
61
- schema_version: rd&.[]("schema_version") || SchemaMigration::CURRENT_SCHEMA_VERSION,
63
+ schema_version: rd&.schema_version || SchemaMigration::CURRENT_SCHEMA_VERSION,
62
64
  statistics: stats,
63
65
  uri_prefix: options[:uri_prefix],
64
66
  concept_uri_template: options[:concept_uri_template],
65
67
  compiled_formats: options[:compiled_formats] || [],
66
68
  external_references: derive_external_references(concepts),
69
+ translations: rd&.translations || {},
67
70
  )
68
71
  end
69
72
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/store"
4
-
5
3
  module Glossarist
6
4
  module GcrPackageDefinition
7
5
  def self.definition(concept_document_class: V3::ConceptDocument)
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/store"
4
- require "zip"
5
-
6
3
  module Glossarist
7
4
  class GlossaryStore
8
5
  attr_reader :package
@@ -26,10 +26,19 @@ module Glossarist
26
26
  dsl.members :pronunciations, link: "gloss:hasPronunciation"
27
27
  dsl.members :sources
28
28
 
29
- RelationshipPredicates::DESIGNATION_REL_PREDICATES.each do |type, (ns, name)|
30
- dsl.predicate name, namespace: ns, to: :"#{type}_targets",
29
+ # Concept-level lexical relationships mapped to designation RDF predicates (URI refs)
30
+ {
31
+ homograph: RelationshipPredicates::DESIGNATION_REL_PREDICATES[:homograph],
32
+ false_friend: RelationshipPredicates::DESIGNATION_REL_PREDICATES[:false_friend],
33
+ }.each do |_type, (ns, name)|
34
+ dsl.predicate name, namespace: ns, to: :"#{_type}_targets",
31
35
  uri_reference: true
32
36
  end
37
+
38
+ # Designation-level relationships (literal target text)
39
+ RelationshipPredicates::DESIGNATION_ONLY_PREDICATES.each do |_type, (ns, name)|
40
+ dsl.predicate name, namespace: ns, to: :"#{_type}_targets"
41
+ end
33
42
  }.freeze
34
43
 
35
44
  DESIGNATION_NAMESPACES = [
@@ -17,6 +17,7 @@ module Glossarist
17
17
  attribute :definitions, GlossDetailedDefinition, collection: true
18
18
  attribute :notes, GlossDetailedDefinition, collection: true
19
19
  attribute :examples, GlossDetailedDefinition, collection: true
20
+ attribute :annotations, GlossDetailedDefinition, collection: true
20
21
  attribute :sources, GlossConceptSource, collection: true
21
22
  attribute :non_verb_reps, GlossNonVerbalRep, collection: true
22
23
 
@@ -55,6 +56,8 @@ module Glossarist
55
56
  link: "gloss:hasNote"
56
57
  members :examples,
57
58
  link: "gloss:hasExample"
59
+ members :annotations,
60
+ link: "gloss:hasAnnotation"
58
61
  members :sources,
59
62
  link: "gloss:hasSource"
60
63
  members :non_verb_reps,
@@ -53,6 +53,10 @@ module Glossarist
53
53
 
54
54
  ALL_REL_PREDICATES = CONCEPT_REL_PREDICATES.merge(DESIGNATION_REL_PREDICATES).freeze
55
55
 
56
+ DESIGNATION_ONLY_PREDICATES = DESIGNATION_REL_PREDICATES.slice(
57
+ :abbreviated_form_for, :short_form_for
58
+ ).freeze
59
+
56
60
  def self.related_targets_by_type(related_concepts, predicate_map)
57
61
  targets = group_targets(related_concepts, predicate_map)
58
62
  predicate_map.each_key.to_h do |type|
@@ -60,6 +64,19 @@ module Glossarist
60
64
  end
61
65
  end
62
66
 
67
+ def self.designation_targets_by_type(relationships, predicate_map)
68
+ valid = Array(relationships).select do |r|
69
+ r.target && predicate_map.key?(r.type.to_sym)
70
+ end
71
+ targets = valid
72
+ .group_by { |r| r.type.to_sym }
73
+ .transform_values { |rs| rs.map(&:target) }
74
+ .transform_keys { |type| :"#{type}_targets" }
75
+ predicate_map.each_key.to_h do |type|
76
+ [:"#{type}_targets", targets[:"#{type}_targets"] || []]
77
+ end
78
+ end
79
+
63
80
  def self.group_targets(related_concepts, predicate_map)
64
81
  valid = valid_related(related_concepts, predicate_map)
65
82
  valid
@@ -17,6 +17,7 @@ module Glossarist
17
17
  attribute :repository, :string
18
18
  attribute :license, :string
19
19
  attribute :tags, :string, collection: true
20
+ attribute :translations, :hash, default: -> { {} }
20
21
 
21
22
  key_value do
22
23
  map %i[id shortname], to: :shortname
@@ -33,6 +34,7 @@ module Glossarist
33
34
  map "repository", to: :repository
34
35
  map "license", to: :license
35
36
  map "tags", to: :tags
37
+ map "translations", to: :translations
36
38
  end
37
39
 
38
40
  def [](key)
@@ -51,6 +53,7 @@ module Glossarist
51
53
  when "repository" then repository
52
54
  when "license" then license
53
55
  when "tags" then tags
56
+ when "translations" then translations
54
57
  end
55
58
  end
56
59
 
@@ -77,6 +80,7 @@ module Glossarist
77
80
  h["repository"] = repository if repository
78
81
  h["license"] = license if license
79
82
  h["tags"] = tags if tags && !tags.empty?
83
+ h["translations"] = translations if translations && !translations.empty?
80
84
  h
81
85
  end
82
86
 
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Glossarist
4
+ class Section < Lutaml::Model::Serializable
5
+ attribute :id, :string
6
+ attribute :names, :hash
7
+ attribute :ordering, :string
8
+ attribute :children, Section, collection: true
9
+
10
+ key_value do
11
+ map :id, to: :id
12
+ map :names, to: :names
13
+ map :ordering, to: :ordering
14
+ map :children, to: :children
15
+ end
16
+
17
+ def name(lang = nil)
18
+ return names&.dig("eng") if lang.nil?
19
+
20
+ names&.dig(lang) || names&.dig("eng")
21
+ end
22
+
23
+ def descendant_by_id(target_id)
24
+ children&.each do |child|
25
+ return child if child.id == target_id
26
+
27
+ found = child.descendant_by_id(target_id)
28
+ return found if found
29
+ end
30
+ nil
31
+ end
32
+
33
+ def self.from_file(path)
34
+ return nil unless File.exist?(path)
35
+
36
+ from_yaml(File.read(path, encoding: "utf-8"))
37
+ end
38
+ end
39
+ end
@@ -120,9 +120,14 @@ module Glossarist
120
120
  build_gloss_designation(desig, concept_id, lang, idx)
121
121
  end
122
122
 
123
- definitions = build_gloss_definitions(data&.definition)
124
- notes = build_gloss_definitions(data&.notes)
125
- examples = build_gloss_definitions(data&.examples)
123
+ dd_attrs = if data
124
+ data.class.detailed_definition_fields.to_h do |field|
125
+ [field, build_gloss_definitions(data.send(field))]
126
+ end
127
+ else
128
+ { definition: [], notes: [], examples: [] }
129
+ end
130
+
126
131
  sources = build_gloss_sources(data&.sources)
127
132
  non_verb_reps = build_gloss_non_verbal_reps(l10n.non_verb_rep,
128
133
  concept_id, lang)
@@ -137,9 +142,7 @@ module Glossarist
137
142
  script: data&.script,
138
143
  system: data&.system,
139
144
  designations: designations,
140
- definitions: definitions,
141
- notes: notes,
142
- examples: examples,
145
+ **dd_attrs,
143
146
  sources: sources,
144
147
  non_verb_reps: non_verb_reps,
145
148
  )
@@ -150,12 +153,12 @@ module Glossarist
150
153
  instance = designation_instance_for(desig, common_attrs, concept_id,
151
154
  lang, index)
152
155
 
153
- rel_targets = Rdf::RelationshipPredicates.related_targets_by_type(
156
+ rel_targets = Rdf::RelationshipPredicates.designation_targets_by_type(
154
157
  desig.related,
155
- Rdf::RelationshipPredicates::DESIGNATION_REL_PREDICATES,
158
+ Rdf::RelationshipPredicates::DESIGNATION_ONLY_PREDICATES,
156
159
  )
157
160
  rel_targets.each do |attr_name, targets|
158
- instance.send(:"#{attr_name}=", targets) unless targets.empty?
161
+ instance.public_send(:"#{attr_name}=", targets) unless targets.empty?
159
162
  end
160
163
  instance
161
164
  end
@@ -15,8 +15,15 @@ module Glossarist
15
15
  attribute :notes, V3::DetailedDefinition,
16
16
  collection: Collections::DetailedDefinitionCollection,
17
17
  initialize_empty: true
18
+ attribute :annotations, V3::DetailedDefinition,
19
+ collection: Collections::DetailedDefinitionCollection,
20
+ initialize_empty: true
18
21
  attribute :related, V3::RelatedConcept, collection: true
19
22
 
23
+ def self.detailed_definition_fields
24
+ super + %i[annotations]
25
+ end
26
+
20
27
  key_value do
21
28
  map :dates, to: :dates
22
29
  map :definition, to: :definition
@@ -25,6 +32,7 @@ module Glossarist
25
32
  map %i[lineage_source_similarity lineageSourceSimilarity],
26
33
  to: :lineage_source_similarity
27
34
  map :notes, to: :notes
35
+ map :annotations, to: :annotations
28
36
  map :release, to: :release
29
37
  map :sources, to: :sources
30
38
  map :terms, to: :terms,
@@ -4,5 +4,5 @@
4
4
  #
5
5
 
6
6
  module Glossarist
7
- VERSION = "2.8.4"
7
+ VERSION = "2.8.6"
8
8
  end
data/lib/glossarist.rb CHANGED
@@ -6,6 +6,7 @@
6
6
  require "psych"
7
7
  require "thor"
8
8
  require "lutaml/model"
9
+ require "lutaml/store"
9
10
 
10
11
  module Glossarist
11
12
  autoload :Asset, "glossarist/asset"
@@ -71,6 +72,8 @@ module Glossarist
71
72
  autoload :Utilities, "glossarist/utilities"
72
73
  autoload :Validation, "glossarist/validation"
73
74
  autoload :RegisterData, "glossarist/register_data"
75
+ autoload :Section, "glossarist/section"
76
+ autoload :DatasetRegister, "glossarist/dataset_register"
74
77
  autoload :ValidationResult, "glossarist/validation_result"
75
78
  autoload :V1, "glossarist/v1"
76
79
  autoload :V2, "glossarist/v2"
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.8.4
4
+ version: 2.8.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-06-03 00:00:00.000000000 Z
11
+ date: 2026-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model
@@ -216,10 +216,12 @@ files:
216
216
  - lib/glossarist/config.rb
217
217
  - lib/glossarist/context_configuration.rb
218
218
  - lib/glossarist/custom_locality.rb
219
+ - lib/glossarist/dataset_register.rb
219
220
  - lib/glossarist/dataset_validator.rb
220
221
  - lib/glossarist/designation.rb
221
222
  - lib/glossarist/designation/abbreviation.rb
222
223
  - lib/glossarist/designation/base.rb
224
+ - lib/glossarist/designation/designation_relationship.rb
223
225
  - lib/glossarist/designation/expression.rb
224
226
  - lib/glossarist/designation/grammar_info.rb
225
227
  - lib/glossarist/designation/graphical_symbol.rb
@@ -284,6 +286,7 @@ files:
284
286
  - lib/glossarist/resolution_adapter/remote.rb
285
287
  - lib/glossarist/resolution_adapter/route.rb
286
288
  - lib/glossarist/schema_migration.rb
289
+ - lib/glossarist/section.rb
287
290
  - lib/glossarist/sts.rb
288
291
  - lib/glossarist/sts/extracted_designation.rb
289
292
  - lib/glossarist/sts/extracted_lang_set.rb