suma 0.1.23 → 0.1.25
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 +53 -28
- data/Gemfile +1 -0
- data/README.adoc +340 -44
- data/lib/suma/cli/compare.rb +210 -0
- data/lib/suma/cli/export.rb +49 -37
- data/lib/suma/cli.rb +29 -8
- data/lib/suma/collection_manifest.rb +13 -0
- data/lib/suma/eengine/errors.rb +27 -0
- data/lib/suma/eengine/wrapper.rb +150 -0
- data/lib/suma/eengine_converter.rb +32 -0
- data/lib/suma/export_standalone_schema.rb +14 -0
- data/lib/suma/express_schema.rb +23 -6
- data/lib/suma/processor.rb +20 -1
- data/lib/suma/schema_collection.rb +6 -4
- data/lib/suma/schema_exporter.rb +23 -7
- data/lib/suma/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9fda8e972931c092b7c01d4eaafda7ada9d0f29739d584123b527bf2b5a75075
|
|
4
|
+
data.tar.gz: c9efe1f70b118180a770f843a6858b3d73e435349a6148e857516fe603dcb688
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce79c333f25940d8a0a201a3ff65d40c68d816581c9cfadecf3900684ff2ca043597203e6d5a2fa728dfcdd0bfe5415ce80923ed385273dc0df0518f3f183631
|
|
7
|
+
data.tar.gz: aa335cf0c8669cd27d5d3b7c715c23d16278337b42db554d9971e0fd1b9a3e9d89e056756e1cc5c08d555635059f83a3688691f05763dcc8a1f267425a8f3ddb
|
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-10-
|
|
3
|
+
# on 2025-10-15 10:00:06 UTC using RuboCop version 1.81.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
|
|
@@ -18,27 +18,12 @@ Gemspec/RequiredRubyVersion:
|
|
|
18
18
|
Exclude:
|
|
19
19
|
- 'suma.gemspec'
|
|
20
20
|
|
|
21
|
-
# Offense count:
|
|
21
|
+
# Offense count: 84
|
|
22
22
|
# This cop supports safe autocorrection (--autocorrect).
|
|
23
23
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
|
24
24
|
# URISchemes: http, https
|
|
25
25
|
Layout/LineLength:
|
|
26
|
-
|
|
27
|
-
- 'lib/suma/cli.rb'
|
|
28
|
-
- 'lib/suma/cli/build.rb'
|
|
29
|
-
- 'lib/suma/cli/export.rb'
|
|
30
|
-
- 'lib/suma/cli/validate.rb'
|
|
31
|
-
- 'lib/suma/jsdai/figure.rb'
|
|
32
|
-
- 'lib/suma/jsdai/figure_image.rb'
|
|
33
|
-
- 'lib/suma/processor.rb'
|
|
34
|
-
- 'lib/suma/schema_attachment.rb'
|
|
35
|
-
- 'lib/suma/schema_collection.rb'
|
|
36
|
-
- 'lib/suma/schema_document.rb'
|
|
37
|
-
- 'lib/suma/thor_ext.rb'
|
|
38
|
-
- 'spec/suma/cli/extract_terms_spec.rb'
|
|
39
|
-
- 'spec/suma/cli/validate_ascii_spec.rb'
|
|
40
|
-
- 'spec/suma/jsdai/figure_spec.rb'
|
|
41
|
-
- 'suma.gemspec'
|
|
26
|
+
Enabled: false
|
|
42
27
|
|
|
43
28
|
# Offense count: 2
|
|
44
29
|
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
|
@@ -56,35 +41,48 @@ Lint/IneffectiveAccessModifier:
|
|
|
56
41
|
Exclude:
|
|
57
42
|
- 'lib/suma/cli/export.rb'
|
|
58
43
|
|
|
59
|
-
# Offense count:
|
|
44
|
+
# Offense count: 11
|
|
60
45
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
61
46
|
Metrics/AbcSize:
|
|
62
47
|
Exclude:
|
|
48
|
+
- 'lib/suma/cli/compare.rb'
|
|
63
49
|
- 'lib/suma/jsdai/figure.rb'
|
|
64
50
|
- 'lib/suma/jsdai/figure_image.rb'
|
|
65
51
|
- 'lib/suma/schema_attachment.rb'
|
|
66
52
|
- 'lib/suma/schema_document.rb'
|
|
67
53
|
- 'lib/suma/thor_ext.rb'
|
|
68
54
|
|
|
69
|
-
# Offense count:
|
|
55
|
+
# Offense count: 6
|
|
70
56
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
71
57
|
Metrics/CyclomaticComplexity:
|
|
72
58
|
Exclude:
|
|
59
|
+
- 'lib/suma/cli/compare.rb'
|
|
60
|
+
- 'lib/suma/eengine/wrapper.rb'
|
|
73
61
|
- 'lib/suma/jsdai/figure.rb'
|
|
74
62
|
- 'lib/suma/jsdai/figure_image.rb'
|
|
75
63
|
- 'lib/suma/thor_ext.rb'
|
|
76
64
|
|
|
77
|
-
# Offense count:
|
|
65
|
+
# Offense count: 5
|
|
78
66
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
79
67
|
Metrics/MethodLength:
|
|
80
|
-
Max:
|
|
68
|
+
Max: 60
|
|
81
69
|
|
|
82
|
-
# Offense count:
|
|
70
|
+
# Offense count: 4
|
|
83
71
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
84
72
|
Metrics/PerceivedComplexity:
|
|
85
73
|
Exclude:
|
|
74
|
+
- 'lib/suma/cli/compare.rb'
|
|
75
|
+
- 'lib/suma/eengine/wrapper.rb'
|
|
86
76
|
- 'lib/suma/jsdai/figure_image.rb'
|
|
87
77
|
|
|
78
|
+
# Offense count: 1
|
|
79
|
+
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
|
|
80
|
+
# AllowedMethods: call
|
|
81
|
+
# WaywardPredicates: nonzero?
|
|
82
|
+
Naming/PredicateMethod:
|
|
83
|
+
Exclude:
|
|
84
|
+
- 'lib/suma/eengine/wrapper.rb'
|
|
85
|
+
|
|
88
86
|
# Offense count: 6
|
|
89
87
|
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
|
90
88
|
# SupportedStyles: snake_case, normalcase, non_integer
|
|
@@ -94,30 +92,57 @@ Naming/VariableNumber:
|
|
|
94
92
|
- 'spec/suma/cli/export_spec.rb'
|
|
95
93
|
- 'spec/suma/cli/validate_ascii_spec.rb'
|
|
96
94
|
|
|
97
|
-
# Offense count:
|
|
95
|
+
# Offense count: 2
|
|
98
96
|
# Configuration parameters: MinSize.
|
|
99
97
|
Performance/CollectionLiteralInLoop:
|
|
100
98
|
Exclude:
|
|
99
|
+
- 'spec/suma/cli/export_spec.rb'
|
|
101
100
|
- 'spec/suma/cli_spec.rb'
|
|
102
101
|
|
|
103
|
-
# Offense count:
|
|
102
|
+
# Offense count: 2
|
|
104
103
|
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
105
104
|
# Prefixes: when, with, without
|
|
106
105
|
RSpec/ContextWording:
|
|
107
106
|
Exclude:
|
|
108
107
|
- 'spec/suma/cli/export_spec.rb'
|
|
109
108
|
|
|
110
|
-
# Offense count:
|
|
109
|
+
# Offense count: 51
|
|
111
110
|
# Configuration parameters: CountAsOne.
|
|
112
111
|
RSpec/ExampleLength:
|
|
113
112
|
Max: 44
|
|
114
113
|
|
|
115
|
-
# Offense count:
|
|
114
|
+
# Offense count: 4
|
|
116
115
|
# Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
|
|
117
116
|
RSpec/IndexedLet:
|
|
118
117
|
Exclude:
|
|
118
|
+
- 'spec/suma/cli/compare_spec.rb'
|
|
119
119
|
- 'spec/suma/cli/export_spec.rb'
|
|
120
120
|
|
|
121
|
-
# Offense count:
|
|
121
|
+
# Offense count: 22
|
|
122
|
+
# Configuration parameters: AssignmentOnly.
|
|
123
|
+
RSpec/InstanceVariable:
|
|
124
|
+
Exclude:
|
|
125
|
+
- 'spec/suma/cli/compare_spec.rb'
|
|
126
|
+
|
|
127
|
+
# Offense count: 1
|
|
128
|
+
# Configuration parameters: EnforcedStyle.
|
|
129
|
+
# SupportedStyles: have_received, receive
|
|
130
|
+
RSpec/MessageSpies:
|
|
131
|
+
Exclude:
|
|
132
|
+
- 'spec/suma/cli/compare_spec.rb'
|
|
133
|
+
|
|
134
|
+
# Offense count: 46
|
|
122
135
|
RSpec/MultipleExpectations:
|
|
123
136
|
Max: 12
|
|
137
|
+
|
|
138
|
+
# Offense count: 1
|
|
139
|
+
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata.
|
|
140
|
+
RSpec/SpecFilePathFormat:
|
|
141
|
+
Exclude:
|
|
142
|
+
- '**/spec/routing/**/*'
|
|
143
|
+
- 'spec/suma/cli/expressir_spec.rb'
|
|
144
|
+
|
|
145
|
+
# Offense count: 1
|
|
146
|
+
RSpec/StubbedMock:
|
|
147
|
+
Exclude:
|
|
148
|
+
- 'spec/suma/cli/compare_spec.rb'
|
data/Gemfile
CHANGED
data/README.adoc
CHANGED
|
@@ -138,8 +138,9 @@ $ suma validate SUBCOMMAND [options]
|
|
|
138
138
|
----
|
|
139
139
|
|
|
140
140
|
Subcommands:
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
|
|
142
|
+
`links`:: Validate EXPRESS links
|
|
143
|
+
`ascii`:: Check for non-ASCII characters in EXPRESS files
|
|
143
144
|
|
|
144
145
|
==== Links subcommand
|
|
145
146
|
|
|
@@ -552,38 +553,50 @@ list
|
|
|
552
553
|
|
|
553
554
|
==== General
|
|
554
555
|
|
|
555
|
-
The `suma export` command exports EXPRESS schemas from
|
|
556
|
-
|
|
557
|
-
|
|
556
|
+
The `suma export` command exports EXPRESS schemas from manifest files and/or
|
|
557
|
+
standalone EXPRESS files to a specified output directory.
|
|
558
|
+
|
|
559
|
+
This command is useful for extracting plain or annotated EXPRESS schemas for
|
|
560
|
+
distribution or further processing.
|
|
558
561
|
|
|
559
562
|
[source,sh]
|
|
560
563
|
----
|
|
561
|
-
$ suma export
|
|
564
|
+
$ suma export -o OUTPUT_DIR FILE1 [FILE2 FILE3 ...]
|
|
562
565
|
----
|
|
563
566
|
|
|
564
567
|
Parameters:
|
|
565
568
|
|
|
566
|
-
`
|
|
569
|
+
`FILE1 [FILE2 FILE3 ...]`:: One or more files to export. Each file can be:
|
|
570
|
+
|
|
571
|
+
An EXPRESS schema manifest file (`.yml`, `.yaml`)::: schemas listed in the
|
|
572
|
+
manifest will be exported
|
|
573
|
+
|
|
574
|
+
An standalone EXPRESS file (`.exp`)::: the schema will be exported directly
|
|
567
575
|
|
|
568
576
|
Options:
|
|
569
577
|
|
|
570
578
|
`--output=PATH`, `-o PATH`:: (required) Output directory path
|
|
571
579
|
|
|
572
|
-
`--additional=PATH`, `-a PATH`:: Additional schemas manifest file to merge
|
|
573
|
-
|
|
574
580
|
`--[no-]annotations`:: Include annotations (remarks/comments) in exported schemas (default: false)
|
|
575
581
|
|
|
576
582
|
`--[no-]zip`:: Create ZIP archive of exported schemas (default: false)
|
|
577
583
|
|
|
578
584
|
==== Behavior
|
|
579
585
|
|
|
580
|
-
The command exports schemas
|
|
581
|
-
|
|
586
|
+
The command exports schemas based on the input file types:
|
|
587
|
+
|
|
588
|
+
**For EXPRESS schema manifest files:**
|
|
582
589
|
|
|
590
|
+
* Schemas are exported while preserving the directory structure from the manifest file paths
|
|
583
591
|
* Schemas under `resources/` are exported to `OUTPUT/resources/`
|
|
584
592
|
* Schemas under `modules/` are exported to `OUTPUT/modules/`
|
|
585
593
|
* Other categories (`business_object_models/`, `core_model/`) follow the same pattern
|
|
586
594
|
|
|
595
|
+
**For standalone EXPRESS files:**
|
|
596
|
+
|
|
597
|
+
* Schemas are exported directly to the output directory root
|
|
598
|
+
* Output filename format: `{schema_id}.exp`
|
|
599
|
+
|
|
587
600
|
By default, schemas are exported without annotations (plain EXPRESS). Use the
|
|
588
601
|
`--annotations` flag to include remarks and comments.
|
|
589
602
|
|
|
@@ -591,7 +604,7 @@ The `--zip` flag creates a ZIP archive in addition to the directory output,
|
|
|
591
604
|
named `OUTPUT.zip`.
|
|
592
605
|
|
|
593
606
|
[example]
|
|
594
|
-
.To export schemas
|
|
607
|
+
.To export schemas from a manifest file
|
|
595
608
|
[source,sh]
|
|
596
609
|
----
|
|
597
610
|
$ bundle exec suma export -o express-files schemas-srl.yml
|
|
@@ -599,52 +612,54 @@ $ bundle exec suma export -o express-files schemas-srl.yml
|
|
|
599
612
|
----
|
|
600
613
|
|
|
601
614
|
[example]
|
|
602
|
-
.To export
|
|
615
|
+
.To export a single plain schema
|
|
603
616
|
[source,sh]
|
|
604
617
|
----
|
|
605
|
-
$ bundle exec suma export -o express-files
|
|
606
|
-
# => generates express-files/
|
|
618
|
+
$ bundle exec suma export -o express-files geometry_schema.exp
|
|
619
|
+
# => generates express-files/geometry_schema.exp
|
|
607
620
|
----
|
|
608
621
|
|
|
609
622
|
[example]
|
|
610
|
-
.To export
|
|
623
|
+
.To export multiple plain schemas
|
|
611
624
|
[source,sh]
|
|
612
625
|
----
|
|
613
|
-
$ bundle exec suma export -o express-files
|
|
614
|
-
# => generates
|
|
615
|
-
# - express-files/ directory
|
|
616
|
-
# - express-files.zip archive
|
|
626
|
+
$ bundle exec suma export -o express-files schema1.exp schema2.exp schema3.exp
|
|
627
|
+
# => generates express-files/{schema1,schema2,schema3}.exp
|
|
617
628
|
----
|
|
618
629
|
|
|
619
630
|
[example]
|
|
620
|
-
.To
|
|
631
|
+
.To export from multiple manifest files
|
|
621
632
|
[source,sh]
|
|
622
633
|
----
|
|
623
|
-
$ bundle exec suma export -o express-files
|
|
624
|
-
-a additional-schemas.yml \
|
|
625
|
-
schemas-srl.yml
|
|
634
|
+
$ bundle exec suma export -o express-files schemas-srl.yml additional-schemas.yml
|
|
626
635
|
# => exports schemas from both manifest files
|
|
627
636
|
----
|
|
628
637
|
|
|
629
638
|
[example]
|
|
630
|
-
.To
|
|
639
|
+
.To export mix of manifest and plain schemas
|
|
631
640
|
[source,sh]
|
|
632
641
|
----
|
|
633
|
-
$ bundle exec suma export -o express-files
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
schemas-srl.yml
|
|
637
|
-
# => exports schemas from primary manifest and all additional manifests
|
|
642
|
+
$ bundle exec suma export -o express-files schemas-srl.yml geometry_schema.exp
|
|
643
|
+
# => exports schemas from manifest with directory structure
|
|
644
|
+
# plus geometry_schema.exp at the root
|
|
638
645
|
----
|
|
639
646
|
|
|
640
647
|
[example]
|
|
641
|
-
.To export with
|
|
648
|
+
.To export schemas with annotations
|
|
642
649
|
[source,sh]
|
|
643
650
|
----
|
|
644
|
-
$ bundle exec suma export -o express-files
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
651
|
+
$ bundle exec suma export -o express-files --annotations schemas-srl.yml
|
|
652
|
+
# => generates express-files/ directory with annotated EXPRESS schemas
|
|
653
|
+
----
|
|
654
|
+
|
|
655
|
+
[example]
|
|
656
|
+
.To export and create ZIP archive
|
|
657
|
+
[source,sh]
|
|
658
|
+
----
|
|
659
|
+
$ bundle exec suma export -o express-files --zip schemas-srl.yml
|
|
660
|
+
# => generates both:
|
|
661
|
+
# - express-files/ directory
|
|
662
|
+
# - express-files.zip archive
|
|
648
663
|
----
|
|
649
664
|
|
|
650
665
|
[example]
|
|
@@ -654,35 +669,316 @@ $ bundle exec suma export -o express-files \
|
|
|
654
669
|
$ bundle exec suma export -o express-files \
|
|
655
670
|
--annotations \
|
|
656
671
|
--zip \
|
|
657
|
-
-
|
|
658
|
-
|
|
659
|
-
# => generates annotated schemas in both directory and ZIP format,
|
|
660
|
-
# including schemas from both manifest files
|
|
672
|
+
schemas-srl.yml geometry_schema.exp
|
|
673
|
+
# => generates annotated schemas in both directory and ZIP format
|
|
661
674
|
----
|
|
662
675
|
|
|
663
676
|
==== Output structure
|
|
664
677
|
|
|
665
|
-
The exported directory structure
|
|
678
|
+
The exported directory structure depends on the input file types:
|
|
666
679
|
|
|
667
680
|
[source]
|
|
668
681
|
----
|
|
669
682
|
express-files/
|
|
670
|
-
├──
|
|
683
|
+
├── geometry_schema.exp # standalone EXPRESS file (at root)
|
|
684
|
+
├── topology_schema.exp # standalone EXPRESS file (at root)
|
|
685
|
+
├── resources/ # from manifest files
|
|
671
686
|
│ ├── action_schema/
|
|
672
687
|
│ │ └── action_schema.exp
|
|
673
688
|
│ └── ...
|
|
674
|
-
├── modules/
|
|
689
|
+
├── modules/ # from manifest files
|
|
675
690
|
│ ├── activity/
|
|
676
691
|
│ │ ├── arm.exp
|
|
677
692
|
│ │ └── mim.exp
|
|
678
693
|
│ └── ...
|
|
679
|
-
├── business_object_models/
|
|
694
|
+
├── business_object_models/ # from manifest files
|
|
680
695
|
│ └── ...
|
|
681
|
-
└── core_model/
|
|
696
|
+
└── core_model/ # from manifest files
|
|
682
697
|
└── ...
|
|
683
698
|
----
|
|
684
699
|
|
|
685
700
|
|
|
701
|
+
=== Compare schemas command
|
|
702
|
+
|
|
703
|
+
==== General
|
|
704
|
+
|
|
705
|
+
The `suma compare` command compares two EXPRESS schemas using eengine and
|
|
706
|
+
generates an EXPRESS Changes YAML file tracking the differences.
|
|
707
|
+
|
|
708
|
+
This command is essential for managing schema evolution across versions,
|
|
709
|
+
particularly when working with multiple git branches of the same repository.
|
|
710
|
+
|
|
711
|
+
[source,sh]
|
|
712
|
+
----
|
|
713
|
+
$ suma compare TRIAL_SCHEMA REFERENCE_SCHEMA --version VERSION [options]
|
|
714
|
+
----
|
|
715
|
+
|
|
716
|
+
Parameters:
|
|
717
|
+
|
|
718
|
+
`TRIAL_SCHEMA`:: Path to the new/trial EXPRESS schema file
|
|
719
|
+
`REFERENCE_SCHEMA`:: Path to the old/reference EXPRESS schema file
|
|
720
|
+
|
|
721
|
+
Options:
|
|
722
|
+
|
|
723
|
+
`--version=VERSION`, `-v VERSION`:: (required) Version number for this change edition
|
|
724
|
+
`--output=PATH`, `-o PATH`:: Output Change YAML file path (default: `{schema}.changes.yaml` in trial schema directory)
|
|
725
|
+
`--mode=MODE`:: Schema comparison mode: `resource` or `module` (default: `resource`)
|
|
726
|
+
`--trial-stepmod=PATH`:: Override auto-detected trial repository root
|
|
727
|
+
`--reference-stepmod=PATH`:: Override auto-detected reference repository root
|
|
728
|
+
`--verbose`:: Enable verbose output
|
|
729
|
+
|
|
730
|
+
==== Typical workflow
|
|
731
|
+
|
|
732
|
+
The compare command is designed for a two-repository workflow where you have
|
|
733
|
+
different branches checked out:
|
|
734
|
+
|
|
735
|
+
[source,sh]
|
|
736
|
+
----
|
|
737
|
+
# 1. Check out old version at /path/to/repo-old
|
|
738
|
+
# 2. Check out new version at /path/to/repo-new
|
|
739
|
+
# 3. Compare schemas:
|
|
740
|
+
$ suma compare \
|
|
741
|
+
/path/to/repo-new/schemas/resources/action_schema/action_schema.exp \
|
|
742
|
+
/path/to/repo-old/schemas/resources/action_schema/action_schema.exp \
|
|
743
|
+
--version 2
|
|
744
|
+
----
|
|
745
|
+
|
|
746
|
+
==== Behavior
|
|
747
|
+
|
|
748
|
+
The command:
|
|
749
|
+
|
|
750
|
+
* Auto-detects git repository roots from schema file paths
|
|
751
|
+
* Uses detected roots as stepmod paths for eengine
|
|
752
|
+
* Generates or updates `.changes.yaml` file in the trial schema directory
|
|
753
|
+
* **Replaces** existing change edition if the version already exists
|
|
754
|
+
* **Adds** new change edition if the version is different
|
|
755
|
+
|
|
756
|
+
==== Requirements
|
|
757
|
+
|
|
758
|
+
This command requires `eengine` to be installed:
|
|
759
|
+
|
|
760
|
+
* macOS: https://github.com/expresslang/homebrew-eengine
|
|
761
|
+
* Linux: https://github.com/expresslang/eengine-releases
|
|
762
|
+
|
|
763
|
+
[example]
|
|
764
|
+
.To compare schemas with auto-detection
|
|
765
|
+
[source,sh]
|
|
766
|
+
----
|
|
767
|
+
$ suma compare \
|
|
768
|
+
~/iso-10303-new/schemas/resources/support_resource_schema/support_resource_schema.exp \
|
|
769
|
+
~/iso-10303-old/schemas/resources/support_resource_schema/support_resource_schema.exp \
|
|
770
|
+
--version 2
|
|
771
|
+
# => generates or updates support_resource_schema.changes.yaml
|
|
772
|
+
----
|
|
773
|
+
|
|
774
|
+
[example]
|
|
775
|
+
.To compare with verbose output
|
|
776
|
+
[source,sh]
|
|
777
|
+
----
|
|
778
|
+
$ suma compare schema_new.exp schema_old.exp --version 2 --verbose
|
|
779
|
+
# Shows: eengine version, detected repo roots, XML generation, etc.
|
|
780
|
+
----
|
|
781
|
+
|
|
782
|
+
[example]
|
|
783
|
+
.To specify custom output location
|
|
784
|
+
[source,sh]
|
|
785
|
+
----
|
|
786
|
+
$ suma compare schema_new.exp schema_old.exp \
|
|
787
|
+
--version 2 \
|
|
788
|
+
--output /path/to/custom.changes.yaml
|
|
789
|
+
----
|
|
790
|
+
|
|
791
|
+
[example]
|
|
792
|
+
.To override auto-detected repository roots
|
|
793
|
+
[source,sh]
|
|
794
|
+
----
|
|
795
|
+
$ suma compare schema_new.exp schema_old.exp \
|
|
796
|
+
--version 2 \
|
|
797
|
+
--trial-stepmod ~/repo-new \
|
|
798
|
+
--reference-stepmod ~/repo-old
|
|
799
|
+
----
|
|
800
|
+
|
|
801
|
+
==== Generated Change YAML format
|
|
802
|
+
|
|
803
|
+
The command generates EXPRESS Changes YAML files in the ISO 10303 format:
|
|
804
|
+
|
|
805
|
+
[source,yaml]
|
|
806
|
+
----
|
|
807
|
+
---
|
|
808
|
+
schema: support_resource_schema
|
|
809
|
+
editions:
|
|
810
|
+
- version: '2'
|
|
811
|
+
description: 'TYPE text: Underlying Type changed'
|
|
812
|
+
modifications:
|
|
813
|
+
- type: TYPE
|
|
814
|
+
name: text
|
|
815
|
+
----
|
|
816
|
+
|
|
817
|
+
For complete format documentation, see the
|
|
818
|
+
https://www.expresslang.org/docs/express-changes[EXPRESS Changes specification].
|
|
819
|
+
|
|
820
|
+
=== Expressir command
|
|
821
|
+
|
|
822
|
+
==== General
|
|
823
|
+
|
|
824
|
+
The `suma expressir` command provides access to all Expressir commands for
|
|
825
|
+
working with EXPRESS schemas. This includes documentation coverage analysis,
|
|
826
|
+
schema formatting, validation, and other EXPRESS-related operations.
|
|
827
|
+
|
|
828
|
+
Expressir is a comprehensive toolkit for EXPRESS schema processing that Suma
|
|
829
|
+
integrates to provide additional functionality beyond Suma's core features.
|
|
830
|
+
|
|
831
|
+
[source,sh]
|
|
832
|
+
----
|
|
833
|
+
$ suma expressir SUBCOMMAND ...ARGS [options]
|
|
834
|
+
----
|
|
835
|
+
|
|
836
|
+
Available subcommands:
|
|
837
|
+
|
|
838
|
+
`coverage`:: Check documentation coverage of EXPRESS schemas
|
|
839
|
+
`format`:: Pretty print EXPRESS schemas
|
|
840
|
+
`clean`:: Strip remarks and prettify EXPRESS schemas
|
|
841
|
+
`validate`:: Validate EXPRESS schemas
|
|
842
|
+
`benchmark`:: Benchmark schema loading performance
|
|
843
|
+
`version`:: Display expressir version
|
|
844
|
+
|
|
845
|
+
==== Coverage subcommand
|
|
846
|
+
|
|
847
|
+
The `coverage` subcommand analyzes EXPRESS schemas to determine documentation
|
|
848
|
+
coverage, reporting how many EXPRESS objects (entities, constants, functions,
|
|
849
|
+
types, etc.) have been documented with Annotated EXPRESS.
|
|
850
|
+
|
|
851
|
+
This addresses the need to measure and improve documentation quality in EXPRESS
|
|
852
|
+
schema collections.
|
|
853
|
+
|
|
854
|
+
[source,sh]
|
|
855
|
+
----
|
|
856
|
+
$ suma expressir coverage PATH [PATH...] [options]
|
|
857
|
+
----
|
|
858
|
+
|
|
859
|
+
Parameters:
|
|
860
|
+
|
|
861
|
+
`PATH`:: One or more paths to analyze. Each path can be:
|
|
862
|
+
+
|
|
863
|
+
--
|
|
864
|
+
* An EXPRESS schema manifest file (`.yml`, `.yaml`)
|
|
865
|
+
* A single EXPRESS file (`.exp`)
|
|
866
|
+
* A directory containing EXPRESS files
|
|
867
|
+
--
|
|
868
|
+
|
|
869
|
+
Options:
|
|
870
|
+
|
|
871
|
+
`--format=FORMAT`:: Output format: `text` (default), `json`, or `yaml`
|
|
872
|
+
`--output=FILE`:: Output file path for JSON/YAML formats (defaults to
|
|
873
|
+
`coverage_report.json` or `coverage_report.yaml`)
|
|
874
|
+
`--exclude=TYPES`:: Comma-separated list of EXPRESS entity types to exclude
|
|
875
|
+
from coverage analysis (e.g., `TYPE,CONSTANT,TYPE:SELECT`)
|
|
876
|
+
`--ignore-files=FILE`:: Path to YAML file containing array of file patterns
|
|
877
|
+
to ignore from overall coverage calculation
|
|
878
|
+
|
|
879
|
+
[example]
|
|
880
|
+
.To analyze documentation coverage of a schema collection
|
|
881
|
+
[source,sh]
|
|
882
|
+
----
|
|
883
|
+
$ suma expressir coverage schemas-srl.yml
|
|
884
|
+
----
|
|
885
|
+
|
|
886
|
+
.To analyze coverage and export as JSON
|
|
887
|
+
[source,sh]
|
|
888
|
+
----
|
|
889
|
+
$ suma expressir coverage schemas-srl.yml --format=json --output=coverage.json
|
|
890
|
+
----
|
|
891
|
+
|
|
892
|
+
.To analyze with exclusions
|
|
893
|
+
[source,sh]
|
|
894
|
+
----
|
|
895
|
+
$ suma expressir coverage schemas/ --exclude=TYPE:ENUMERATION,PARAMETER
|
|
896
|
+
----
|
|
897
|
+
|
|
898
|
+
.To analyze multiple sources
|
|
899
|
+
[source,sh]
|
|
900
|
+
----
|
|
901
|
+
$ suma expressir coverage schemas-srl.yml additional-schemas.yml
|
|
902
|
+
----
|
|
903
|
+
|
|
904
|
+
The coverage report includes:
|
|
905
|
+
|
|
906
|
+
* Overall coverage statistics (total entities, documented entities, percentage)
|
|
907
|
+
* Per-file coverage details
|
|
908
|
+
* Per-directory coverage summaries
|
|
909
|
+
* List of undocumented entities by type and name
|
|
910
|
+
|
|
911
|
+
==== Format subcommand
|
|
912
|
+
|
|
913
|
+
The `format` subcommand pretty-prints EXPRESS schemas.
|
|
914
|
+
|
|
915
|
+
[source,sh]
|
|
916
|
+
----
|
|
917
|
+
$ suma expressir format PATH
|
|
918
|
+
----
|
|
919
|
+
|
|
920
|
+
Parameters:
|
|
921
|
+
|
|
922
|
+
`PATH`:: Path to the EXPRESS schema file to format
|
|
923
|
+
|
|
924
|
+
[example]
|
|
925
|
+
.To format an EXPRESS schema
|
|
926
|
+
[source,sh]
|
|
927
|
+
----
|
|
928
|
+
$ suma expressir format schema.exp
|
|
929
|
+
----
|
|
930
|
+
|
|
931
|
+
==== Clean subcommand
|
|
932
|
+
|
|
933
|
+
The `clean` subcommand strips remarks and prettifies EXPRESS schemas.
|
|
934
|
+
|
|
935
|
+
[source,sh]
|
|
936
|
+
----
|
|
937
|
+
$ suma expressir clean PATH [options]
|
|
938
|
+
----
|
|
939
|
+
|
|
940
|
+
Parameters:
|
|
941
|
+
|
|
942
|
+
`PATH`:: Path to the EXPRESS schema file to clean
|
|
943
|
+
|
|
944
|
+
Options:
|
|
945
|
+
|
|
946
|
+
`--output=FILE`:: Output file path (defaults to stdout)
|
|
947
|
+
|
|
948
|
+
[example]
|
|
949
|
+
.To clean an EXPRESS schema and save to file
|
|
950
|
+
[source,sh]
|
|
951
|
+
----
|
|
952
|
+
$ suma expressir clean schema.exp --output=cleaned_schema.exp
|
|
953
|
+
----
|
|
954
|
+
|
|
955
|
+
==== Validate subcommand
|
|
956
|
+
|
|
957
|
+
The `validate` subcommand validates EXPRESS schemas for syntactic correctness.
|
|
958
|
+
|
|
959
|
+
[source,sh]
|
|
960
|
+
----
|
|
961
|
+
$ suma expressir validate PATH [PATH...]
|
|
962
|
+
----
|
|
963
|
+
|
|
964
|
+
Parameters:
|
|
965
|
+
|
|
966
|
+
`PATH`:: One or more paths to EXPRESS schema files or directories to validate
|
|
967
|
+
|
|
968
|
+
[example]
|
|
969
|
+
.To validate EXPRESS schemas
|
|
970
|
+
[source,sh]
|
|
971
|
+
----
|
|
972
|
+
$ suma expressir validate schema.exp
|
|
973
|
+
$ suma expressir validate schemas/
|
|
974
|
+
----
|
|
975
|
+
|
|
976
|
+
==== Additional information
|
|
977
|
+
|
|
978
|
+
For complete documentation of all Expressir commands and options, see the
|
|
979
|
+
https://github.com/lutaml/expressir[Expressir documentation].
|
|
980
|
+
|
|
981
|
+
|
|
686
982
|
== Usage: Ruby
|
|
687
983
|
|
|
688
984
|
=== General
|