expressir 2.1.29 → 2.1.31
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/docs.yml +98 -0
- data/.github/workflows/links.yml +100 -0
- data/.github/workflows/rake.yml +4 -0
- data/.github/workflows/release.yml +5 -0
- data/.github/workflows/validate_schemas.yml +1 -1
- data/.gitignore +3 -0
- data/.rubocop.yml +1 -1
- data/.rubocop_todo.yml +209 -55
- data/Gemfile +2 -1
- data/README.adoc +650 -83
- data/docs/Gemfile +12 -0
- data/docs/_config.yml +141 -0
- data/docs/_guides/changes/changes-format.adoc +778 -0
- data/docs/_guides/changes/importing-eengine.adoc +898 -0
- data/docs/_guides/changes/index.adoc +396 -0
- data/docs/_guides/changes/programmatic-usage.adoc +1038 -0
- data/docs/_guides/changes/validating-changes.adoc +681 -0
- data/docs/_guides/cli/benchmark-performance.adoc +834 -0
- data/docs/_guides/cli/coverage-analysis.adoc +921 -0
- data/docs/_guides/cli/format-schemas.adoc +547 -0
- data/docs/_guides/cli/index.adoc +8 -0
- data/docs/_guides/cli/managing-changes.adoc +927 -0
- data/docs/_guides/cli/validate-ascii.adoc +645 -0
- data/docs/_guides/cli/validate-schemas.adoc +534 -0
- data/docs/_guides/index.adoc +165 -0
- data/docs/_guides/ler/creating-packages.adoc +664 -0
- data/docs/_guides/ler/index.adoc +305 -0
- data/docs/_guides/ler/loading-packages.adoc +707 -0
- data/docs/_guides/ler/package-formats.adoc +748 -0
- data/docs/_guides/ler/querying-packages.adoc +826 -0
- data/docs/_guides/ler/validating-packages.adoc +750 -0
- data/docs/_guides/liquid/basic-templates.adoc +813 -0
- data/docs/_guides/liquid/documentation-generation.adoc +1042 -0
- data/docs/_guides/liquid/drops-reference.adoc +829 -0
- data/docs/_guides/liquid/filters-and-tags.adoc +912 -0
- data/docs/_guides/liquid/index.adoc +468 -0
- data/docs/_guides/manifests/creating-manifests.adoc +483 -0
- data/docs/_guides/manifests/index.adoc +307 -0
- data/docs/_guides/manifests/resolving-manifests.adoc +557 -0
- data/docs/_guides/manifests/validating-manifests.adoc +713 -0
- data/docs/_guides/ruby-api/formatting-schemas.adoc +605 -0
- data/docs/_guides/ruby-api/index.adoc +257 -0
- data/docs/_guides/ruby-api/parsing-files.adoc +421 -0
- data/docs/_guides/ruby-api/search-engine.adoc +609 -0
- data/docs/_guides/ruby-api/working-with-repository.adoc +577 -0
- data/docs/_pages/data-model.adoc +665 -0
- data/docs/_pages/express-language.adoc +506 -0
- data/docs/_pages/getting-started.adoc +414 -0
- data/docs/_pages/index.adoc +116 -0
- data/docs/_pages/introduction.adoc +256 -0
- data/docs/_pages/ler-packages.adoc +837 -0
- data/docs/_pages/parsers.adoc +683 -0
- data/docs/_pages/schema-manifests.adoc +431 -0
- data/docs/_references/index.adoc +228 -0
- data/docs/_tutorials/creating-ler-package.adoc +735 -0
- data/docs/_tutorials/documentation-coverage.adoc +795 -0
- data/docs/_tutorials/index.adoc +221 -0
- data/docs/_tutorials/liquid-templates.adoc +806 -0
- data/docs/_tutorials/parsing-your-first-schema.adoc +522 -0
- data/docs/_tutorials/querying-schemas.adoc +751 -0
- data/docs/_tutorials/working-with-multiple-schemas.adoc +676 -0
- data/docs/index.adoc +242 -0
- data/docs/lychee.toml +84 -0
- data/examples/demo_ler_usage.sh +86 -0
- data/examples/ler/README.md +111 -0
- data/examples/ler/simple_example.ler +0 -0
- data/examples/ler/simple_schema.exp +33 -0
- data/examples/ler_build.rb +75 -0
- data/examples/ler_cli.rb +79 -0
- data/examples/ler_demo_complete.rb +276 -0
- data/examples/ler_query.rb +91 -0
- data/examples/ler_query_examples.rb +305 -0
- data/examples/ler_stats.rb +81 -0
- data/examples/phase3_demo.rb +159 -0
- data/examples/query_demo_simple.rb +131 -0
- data/expressir.gemspec +2 -0
- data/lib/expressir/changes/schema_change.rb +32 -22
- data/lib/expressir/changes/{edition_change.rb → version_change.rb} +3 -3
- data/lib/expressir/cli.rb +12 -4
- data/lib/expressir/commands/changes_import_eengine.rb +2 -2
- data/lib/expressir/commands/changes_validate.rb +1 -1
- data/lib/expressir/commands/manifest.rb +427 -0
- data/lib/expressir/commands/package.rb +1274 -0
- data/lib/expressir/commands/validate.rb +70 -37
- data/lib/expressir/commands/validate_ascii.rb +607 -0
- data/lib/expressir/commands/validate_load.rb +88 -0
- data/lib/expressir/express/formatter.rb +5 -1
- data/lib/expressir/express/formatters/remark_item_formatter.rb +25 -0
- data/lib/expressir/express/parser.rb +33 -0
- data/lib/expressir/manifest/resolver.rb +213 -0
- data/lib/expressir/manifest/validator.rb +195 -0
- data/lib/expressir/model/declarations/entity.rb +6 -0
- data/lib/expressir/model/dependency_resolver.rb +270 -0
- data/lib/expressir/model/indexes/entity_index.rb +103 -0
- data/lib/expressir/model/indexes/reference_index.rb +148 -0
- data/lib/expressir/model/indexes/type_index.rb +149 -0
- data/lib/expressir/model/interface_validator.rb +384 -0
- data/lib/expressir/model/repository.rb +400 -5
- data/lib/expressir/model/repository_validator.rb +295 -0
- data/lib/expressir/model/search_engine.rb +525 -0
- data/lib/expressir/model.rb +4 -94
- data/lib/expressir/package/builder.rb +200 -0
- data/lib/expressir/package/metadata.rb +81 -0
- data/lib/expressir/package/reader.rb +165 -0
- data/lib/expressir/schema_manifest.rb +11 -1
- data/lib/expressir/version.rb +1 -1
- data/lib/expressir.rb +16 -3
- metadata +115 -5
- data/docs/benchmarking.adoc +0 -107
- data/docs/liquid_drops.adoc +0 -1547
|
@@ -1,52 +1,85 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "thor"
|
|
4
|
+
|
|
1
5
|
module Expressir
|
|
2
6
|
module Commands
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
x = Pathname.new(path).realpath.relative_path_from(Dir.pwd)
|
|
10
|
-
say "Validating #{x}"
|
|
11
|
-
ret = validate_schema(path)
|
|
7
|
+
# Thor subcommand for EXPRESS validation operations
|
|
8
|
+
class Validate < Thor
|
|
9
|
+
desc "load PATH_OR_MANIFEST",
|
|
10
|
+
"Validate EXPRESS schema loading and version strings"
|
|
11
|
+
long_desc <<~DESC
|
|
12
|
+
Validate EXPRESS schema(s) for parsing errors and version string presence.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
end
|
|
14
|
+
Accepts either:
|
|
15
|
+
- Individual EXPRESS file paths (*.exp)
|
|
16
|
+
- A Schema Manifest YAML file (*.yaml) containing schema definitions
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
no_version << "Missing version string: schema `#{schema_id}` | #{x}"
|
|
20
|
-
end
|
|
21
|
-
end
|
|
18
|
+
When using a Schema Manifest, all schemas in the manifest will be validated.
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
Examples:
|
|
21
|
+
# Validate individual EXPRESS files
|
|
22
|
+
expressir validate load schema1.exp schema2.exp
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
# Validate schemas from a manifest
|
|
25
|
+
expressir validate load manifest.yaml
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
# Validate with verbose output
|
|
28
|
+
expressir validate load manifest.yaml --verbose
|
|
29
|
+
DESC
|
|
30
|
+
method_option :verbose, type: :boolean, default: false,
|
|
31
|
+
desc: "Show verbose output"
|
|
32
|
+
def load(*paths)
|
|
33
|
+
require_relative "validate_load"
|
|
34
|
+
ValidateLoad.new(options).run(paths)
|
|
29
35
|
end
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
desc "ascii PATH_OR_MANIFEST",
|
|
38
|
+
"Validate EXPRESS files for ASCII-only content"
|
|
39
|
+
long_desc <<~DESC
|
|
40
|
+
Validate EXPRESS file(s) for non-ASCII characters and provide replacement suggestions.
|
|
32
41
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
Accepts either:
|
|
43
|
+
- Individual EXPRESS file path (*.exp)
|
|
44
|
+
- A directory path (with --recursive option)
|
|
45
|
+
- A Schema Manifest YAML file (*.yaml) containing schema definitions
|
|
46
|
+
|
|
47
|
+
When using a Schema Manifest, all schemas in the manifest will be validated.
|
|
48
|
+
|
|
49
|
+
This command:
|
|
50
|
+
- Scans each line for non-ASCII characters
|
|
51
|
+
- Reports detailed information about each violation
|
|
52
|
+
- Provides specific replacement suggestions (AsciiMath or ISO 10303-11)
|
|
53
|
+
- Displays a summary table showing all violations
|
|
54
|
+
- Optionally outputs structured data in YAML format
|
|
55
|
+
|
|
56
|
+
Examples:
|
|
57
|
+
# Validate a single EXPRESS file
|
|
58
|
+
expressir validate ascii schema.exp
|
|
59
|
+
|
|
60
|
+
# Validate all EXPRESS files in a directory recursively
|
|
61
|
+
expressir validate ascii ../iso-10303/schemas -r
|
|
62
|
+
|
|
63
|
+
# Validate schemas from a manifest
|
|
64
|
+
expressir validate ascii manifest.yaml
|
|
42
65
|
|
|
43
|
-
|
|
44
|
-
|
|
66
|
+
# Output results in YAML format
|
|
67
|
+
expressir validate ascii manifest.yaml -y
|
|
45
68
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
69
|
+
# Include remarks in validation (default: false)
|
|
70
|
+
expressir validate ascii schema.exp --check-remarks
|
|
71
|
+
DESC
|
|
72
|
+
method_option :recursive, type: :boolean, default: false, aliases: "-r",
|
|
73
|
+
desc: "Validate EXPRESS files under the specified path recursively"
|
|
74
|
+
method_option :yaml, type: :boolean, default: false, aliases: "-y",
|
|
75
|
+
desc: "Output results in YAML format"
|
|
76
|
+
method_option :check_remarks, type: :boolean, default: false,
|
|
77
|
+
desc: "Include remarks in ASCII validation (default: false, remarks are excluded)"
|
|
78
|
+
method_option :verbose, type: :boolean, default: false,
|
|
79
|
+
desc: "Show verbose output"
|
|
80
|
+
def ascii(path)
|
|
81
|
+
require_relative "validate_ascii"
|
|
82
|
+
ValidateAscii.new(options).run(path)
|
|
50
83
|
end
|
|
51
84
|
end
|
|
52
85
|
end
|