suma 0.1.16 → 0.1.17
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/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +85 -9
- data/README.adoc +27 -23
- data/lib/suma/cli/generate_schemas.rb +0 -2
- 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: 5ecace379e8cbe19d7f3d6144ce5862be6529c02b418352c79b382f0be184e67
|
4
|
+
data.tar.gz: c1ce481cd14a29ce112782a088c8b11722c7d091e17df3ca771339c0446b1396
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c84af1274e4b93530d213648de1a32cd580203ca8da2123f2071a6457c007b87ed343fbe8326ac652cd706c650603c959aea0ebb54d2f5109a6e92098e5ccd7
|
7
|
+
data.tar.gz: 4b1ee08b731c160b772a89c9dd5af33c7720fcc388bf8b8e9cf06554a4c07c8f052cf78f953f4841a48543ef255626e666b9f4c6bd0a4e225a956684a82954bc
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2025-07-
|
3
|
+
# on 2025-07-17 08:10:53 UTC using RuboCop version 1.78.0.
|
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
|
@@ -13,7 +13,30 @@ Gemspec/DuplicatedAssignment:
|
|
13
13
|
Exclude:
|
14
14
|
- 'suma.gemspec'
|
15
15
|
|
16
|
-
# Offense count:
|
16
|
+
# Offense count: 1
|
17
|
+
# Configuration parameters: Severity, Include.
|
18
|
+
# Include: **/*.gemspec
|
19
|
+
Gemspec/RequiredRubyVersion:
|
20
|
+
Exclude:
|
21
|
+
- 'suma.gemspec'
|
22
|
+
|
23
|
+
# Offense count: 17
|
24
|
+
# This cop supports safe autocorrection (--autocorrect).
|
25
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
26
|
+
# SupportedStyles: with_first_argument, with_fixed_indentation
|
27
|
+
Layout/ArgumentAlignment:
|
28
|
+
Exclude:
|
29
|
+
- 'lib/suma/cli/validate_ascii.rb'
|
30
|
+
|
31
|
+
# Offense count: 1
|
32
|
+
# This cop supports safe autocorrection (--autocorrect).
|
33
|
+
# Configuration parameters: EnforcedStyle.
|
34
|
+
# SupportedStyles: normal, indented_internal_methods
|
35
|
+
Layout/IndentationConsistency:
|
36
|
+
Exclude:
|
37
|
+
- 'lib/suma/glossarist_extensions.rb'
|
38
|
+
|
39
|
+
# Offense count: 90
|
17
40
|
# This cop supports safe autocorrection (--autocorrect).
|
18
41
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
19
42
|
# URISchemes: http, https
|
@@ -21,10 +44,10 @@ Layout/LineLength:
|
|
21
44
|
Exclude:
|
22
45
|
- 'lib/suma/cli.rb'
|
23
46
|
- 'lib/suma/cli/build.rb'
|
24
|
-
- 'lib/suma/cli/extract_terms.rb'
|
25
47
|
- 'lib/suma/cli/validate.rb'
|
26
48
|
- 'lib/suma/cli/validate_ascii.rb'
|
27
49
|
- 'lib/suma/cli/validate_links.rb'
|
50
|
+
- 'lib/suma/glossarist_extensions.rb'
|
28
51
|
- 'lib/suma/processor.rb'
|
29
52
|
- 'lib/suma/schema_attachment.rb'
|
30
53
|
- 'lib/suma/schema_collection.rb'
|
@@ -34,6 +57,13 @@ Layout/LineLength:
|
|
34
57
|
- 'spec/suma/cli/validate_ascii_spec.rb'
|
35
58
|
- 'suma.gemspec'
|
36
59
|
|
60
|
+
# Offense count: 22
|
61
|
+
# This cop supports safe autocorrection (--autocorrect).
|
62
|
+
# Configuration parameters: AllowInHeredoc.
|
63
|
+
Layout/TrailingWhitespace:
|
64
|
+
Exclude:
|
65
|
+
- 'lib/suma/cli/validate_ascii.rb'
|
66
|
+
|
37
67
|
# Offense count: 1
|
38
68
|
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
39
69
|
Lint/DuplicateBranch:
|
@@ -46,33 +76,48 @@ Lint/DuplicateMethods:
|
|
46
76
|
- 'lib/suma/cli/validate_ascii.rb'
|
47
77
|
- 'lib/suma/express_schema.rb'
|
48
78
|
|
49
|
-
# Offense count:
|
79
|
+
# Offense count: 2
|
80
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
81
|
+
Lint/NonAtomicFileOperation:
|
82
|
+
Exclude:
|
83
|
+
- 'lib/suma/glossarist_extensions.rb'
|
84
|
+
|
85
|
+
# Offense count: 1
|
86
|
+
# This cop supports safe autocorrection (--autocorrect).
|
87
|
+
# Configuration parameters: AutoCorrect, IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
88
|
+
Lint/UnusedBlockArgument:
|
89
|
+
Exclude:
|
90
|
+
- 'lib/suma/glossarist_extensions.rb'
|
91
|
+
|
92
|
+
# Offense count: 23
|
50
93
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
51
94
|
Metrics/AbcSize:
|
52
95
|
Exclude:
|
53
96
|
- 'lib/suma/cli/extract_terms.rb'
|
54
97
|
- 'lib/suma/cli/validate_ascii.rb'
|
55
98
|
- 'lib/suma/cli/validate_links.rb'
|
99
|
+
- 'lib/suma/glossarist_extensions.rb'
|
56
100
|
- 'lib/suma/schema_attachment.rb'
|
57
101
|
- 'lib/suma/schema_document.rb'
|
58
102
|
- 'lib/suma/thor_ext.rb'
|
59
103
|
|
60
|
-
# Offense count:
|
104
|
+
# Offense count: 3
|
61
105
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
62
106
|
# AllowedMethods: refine
|
63
107
|
Metrics/BlockLength:
|
64
108
|
Max: 64
|
65
109
|
|
66
|
-
# Offense count:
|
110
|
+
# Offense count: 9
|
67
111
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
68
112
|
Metrics/CyclomaticComplexity:
|
69
113
|
Exclude:
|
70
114
|
- 'lib/suma/cli/extract_terms.rb'
|
71
115
|
- 'lib/suma/cli/validate_ascii.rb'
|
72
116
|
- 'lib/suma/cli/validate_links.rb'
|
117
|
+
- 'lib/suma/glossarist_extensions.rb'
|
73
118
|
- 'lib/suma/thor_ext.rb'
|
74
119
|
|
75
|
-
# Offense count:
|
120
|
+
# Offense count: 36
|
76
121
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
77
122
|
Metrics/MethodLength:
|
78
123
|
Max: 107
|
@@ -82,13 +127,14 @@ Metrics/MethodLength:
|
|
82
127
|
Metrics/ParameterLists:
|
83
128
|
Max: 6
|
84
129
|
|
85
|
-
# Offense count:
|
130
|
+
# Offense count: 6
|
86
131
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
87
132
|
Metrics/PerceivedComplexity:
|
88
133
|
Exclude:
|
89
134
|
- 'lib/suma/cli/extract_terms.rb'
|
90
135
|
- 'lib/suma/cli/validate_ascii.rb'
|
91
136
|
- 'lib/suma/cli/validate_links.rb'
|
137
|
+
- 'lib/suma/glossarist_extensions.rb'
|
92
138
|
|
93
139
|
# Offense count: 5
|
94
140
|
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
@@ -114,13 +160,14 @@ RSpec/ExampleLength:
|
|
114
160
|
RSpec/MultipleExpectations:
|
115
161
|
Max: 12
|
116
162
|
|
117
|
-
# Offense count:
|
163
|
+
# Offense count: 2
|
118
164
|
# This cop supports safe autocorrection (--autocorrect).
|
119
165
|
# Configuration parameters: AutoCorrect, EnforcedStyle, AllowComments.
|
120
166
|
# SupportedStyles: empty, nil, both
|
121
167
|
Style/EmptyElse:
|
122
168
|
Exclude:
|
123
169
|
- 'lib/suma/cli/validate_links.rb'
|
170
|
+
- 'lib/suma/glossarist_extensions.rb'
|
124
171
|
|
125
172
|
# Offense count: 4
|
126
173
|
# This cop supports safe autocorrection (--autocorrect).
|
@@ -129,8 +176,37 @@ Style/EmptyElse:
|
|
129
176
|
Style/FormatStringToken:
|
130
177
|
EnforcedStyle: unannotated
|
131
178
|
|
179
|
+
# Offense count: 2
|
180
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
181
|
+
# Configuration parameters: AllowedReceivers.
|
182
|
+
# AllowedReceivers: Thread.current
|
183
|
+
Style/HashEachMethods:
|
184
|
+
Exclude:
|
185
|
+
- 'lib/suma/glossarist_extensions.rb'
|
186
|
+
|
187
|
+
# Offense count: 2
|
188
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
189
|
+
Style/IdenticalConditionalBranches:
|
190
|
+
Exclude:
|
191
|
+
- 'lib/suma/glossarist_extensions.rb'
|
192
|
+
|
193
|
+
# Offense count: 3
|
194
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
195
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
196
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
197
|
+
Style/SafeNavigation:
|
198
|
+
Exclude:
|
199
|
+
- 'lib/suma/glossarist_extensions.rb'
|
200
|
+
|
132
201
|
# Offense count: 1
|
133
202
|
# Configuration parameters: Max.
|
134
203
|
Style/SafeNavigationChainLength:
|
135
204
|
Exclude:
|
136
205
|
- 'lib/suma/cli/extract_terms.rb'
|
206
|
+
|
207
|
+
# Offense count: 4
|
208
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
209
|
+
# Configuration parameters: Mode.
|
210
|
+
Style/StringConcatenation:
|
211
|
+
Exclude:
|
212
|
+
- 'lib/suma/cli/validate_ascii.rb'
|
data/README.adoc
CHANGED
@@ -291,8 +291,9 @@ Replacement: AsciiMath: xx
|
|
291
291
|
|
292
292
|
=== Generate schemas command
|
293
293
|
|
294
|
-
The `suma generate_schemas` command generates
|
295
|
-
all schemas
|
294
|
+
The `suma generate_schemas` command generates an EXPRESS schema manifest file
|
295
|
+
containing all schemas of documents referenced in the Metanorma manifest file,
|
296
|
+
recursively.
|
296
297
|
|
297
298
|
[source,sh]
|
298
299
|
----
|
@@ -331,6 +332,10 @@ out which schemas the document includes.
|
|
331
332
|
|
332
333
|
=== Extract terms command
|
333
334
|
|
335
|
+
The "extract terms" command is implemented for ISO 10303-2, and could also be
|
336
|
+
used for other EXPRESS schema collections that require term extraction for
|
337
|
+
glossary or dictionary applications.
|
338
|
+
|
334
339
|
The `suma extract_terms` command extracts terms from EXPRESS schemas and
|
335
340
|
generates a Glossarist v2 dataset in the output directory. This command processes
|
336
341
|
various types of STEP schemas and creates standardized terminology datasets
|
@@ -357,36 +362,35 @@ Options:
|
|
357
362
|
|
358
363
|
The command supports extraction from the following EXPRESS schema types:
|
359
364
|
|
360
|
-
* **ARM (
|
361
|
-
* **MIM (
|
365
|
+
* **ARM (application reference model)** - application module schemas ending with `_arm`
|
366
|
+
* **MIM (module implementation model)** - application module schemas ending with `_mim`
|
362
367
|
* **Resource schemas** - General resource schemas
|
363
|
-
* **BOM (
|
368
|
+
* **BOM (business object model)** - business object model schemas ending with `_bom`
|
369
|
+
|
370
|
+
NOTE: The "Long Form" EXPRESS schemas (ending with `_lf`) should be excluded
|
371
|
+
from the manifest file as they do not contain definitions of `ENTITY` objects.
|
364
372
|
|
365
|
-
==== Extracted terms
|
366
373
|
|
367
|
-
|
374
|
+
==== Extracted concepts
|
368
375
|
|
369
|
-
|
370
|
-
|
371
|
-
* **Functions** - EXPRESS function definitions
|
372
|
-
* **Procedures** - EXPRESS procedure definitions
|
373
|
-
* **Constants** - EXPRESS constant definitions
|
376
|
+
The command extracts `ENTITY` objects from EXPRESS schemas, with the following
|
377
|
+
information:
|
374
378
|
|
375
|
-
|
379
|
+
. a unique identifier in form of `{schema_name}.{entity_name}` (where `entity_name` is a slug
|
380
|
+
derived from the `ENTITY` name);
|
381
|
+
. a generated definition depending on the schema type and entity type;
|
382
|
+
. a "Note to entry" from its first coherent textual element described in Annotated EXPRESS;
|
383
|
+
. source information including: schema name and schema version;
|
384
|
+
. domain in the pattern of: `{domain_type}: {schema_name}`, where `domain_type` is one of
|
385
|
+
`application module`, `resource`, or `business object model`.
|
376
386
|
|
377
|
-
* Unique identifier based on schema and term name
|
378
|
-
* Term definition and description
|
379
|
-
* Source schema information
|
380
|
-
* Appropriate domain classification (application module, resource, or business object model)
|
381
387
|
|
382
388
|
==== Output format
|
383
389
|
|
384
390
|
The command generates a Glossarist v2 compliant dataset with:
|
385
391
|
|
386
|
-
* `concept/` directory containing concept definition files
|
387
|
-
* `localized_concept/` directory containing localized concept files
|
388
|
-
* YAML format following Glossarist v2 schema specifications
|
389
|
-
* Proper cross-references and citations to source schemas
|
392
|
+
* `concept/` directory containing concept definition files in YAML
|
393
|
+
* `localized_concept/` directory containing localized concept files in YAML
|
390
394
|
|
391
395
|
.To extract terms from a schema manifest file
|
392
396
|
[example]
|
@@ -394,7 +398,8 @@ The command generates a Glossarist v2 compliant dataset with:
|
|
394
398
|
[source,sh]
|
395
399
|
----
|
396
400
|
$ bundle exec suma extract_terms schemas-smrl-all.yml glossarist_output
|
397
|
-
# => generates glossarist_output/concept/*.yaml and
|
401
|
+
# => generates glossarist_output/concept/*.yaml and
|
402
|
+
# glossarist_output/localized_concept/*.yaml
|
398
403
|
----
|
399
404
|
====
|
400
405
|
|
@@ -408,7 +413,6 @@ $ bundle exec suma extract_terms schemas-activity-modules.yml terms_output
|
|
408
413
|
----
|
409
414
|
====
|
410
415
|
|
411
|
-
The generated dataset is meant to be used for ISO 10303-2.
|
412
416
|
|
413
417
|
|
414
418
|
== Usage: Ruby
|
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.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: expressir
|