lutaml-express 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/macos.yml +36 -0
- data/.github/workflows/ubuntu.yml +38 -0
- data/.github/workflows/windows.yml +41 -0
- data/.gitignore +3 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +12 -0
- data/README.adoc +51 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/lutaml/express.rb +10 -0
- data/lib/lutaml/express/lutaml_path/document_wrapper.rb +37 -0
- data/lib/lutaml/express/parsers/exp.rb +21 -0
- data/lib/lutaml/express/version.rb +7 -0
- data/lutaml-express.gemspec +35 -0
- data/spec/express/express_spec.rb +7 -0
- data/spec/express/lutaml_path/document_wrapper_spec.rb +38 -0
- data/spec/express/parsers/exp_spec.rb +30 -0
- data/spec/fixtures/test.exp +121 -0
- data/spec/spec_helper.rb +21 -0
- metadata +178 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cfc0bc6b2ffb2f237b0feecae3c16fc2989f7c90bdfec27f39b1c8eab2f9e532
|
4
|
+
data.tar.gz: 55fade4b6c10f2521dd404bd0cc1934a73128c5d6c5d273c90022e9cf422413e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b7acf19de4cd29f7344c3d1638ca57b44d55c01c02fb651a7d4a965853a56a1c702dbc3e5c1ac6acf2264d9db3fe9ad19e420fd436564a56301802cda25e60f6
|
7
|
+
data.tar.gz: 3c1db516c6f26b796428eeef5073bb7d934862a6afaacadd99ce933a8aacdd15e2d3f727a7be6f5742996b98888cd1bca15fd91865fad18f6a2926adae53dede
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: macos
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
paths-ignore:
|
8
|
+
- .github/workflows/ubuntu.yml
|
9
|
+
- .github/workflows/windows.yml
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test-macos:
|
13
|
+
name: Test on Ruby ${{ matrix.ruby }} macOS
|
14
|
+
runs-on: macos-latest
|
15
|
+
continue-on-error: ${{ matrix.experimental }}
|
16
|
+
strategy:
|
17
|
+
fail-fast: false
|
18
|
+
matrix:
|
19
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
20
|
+
experimental: [false]
|
21
|
+
include:
|
22
|
+
- ruby: '2.7'
|
23
|
+
experimental: true
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@master
|
26
|
+
- name: Use Ruby
|
27
|
+
uses: actions/setup-ruby@v1
|
28
|
+
with:
|
29
|
+
ruby-version: ${{ matrix.ruby }}
|
30
|
+
- name: Update gems
|
31
|
+
run: |
|
32
|
+
sudo gem install bundler --force
|
33
|
+
bundle install --jobs 4 --retry 3
|
34
|
+
- name: Run specs
|
35
|
+
run: |
|
36
|
+
bundle exec rake
|
@@ -0,0 +1,38 @@
|
|
1
|
+
name: ubuntu
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
tags:
|
7
|
+
- '*'
|
8
|
+
pull_request:
|
9
|
+
paths-ignore:
|
10
|
+
- .github/workflows/macos.yml
|
11
|
+
- .github/workflows/windows.yml
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
test-linux:
|
15
|
+
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
16
|
+
runs-on: ubuntu-latest
|
17
|
+
continue-on-error: ${{ matrix.experimental }}
|
18
|
+
strategy:
|
19
|
+
fail-fast: false
|
20
|
+
matrix:
|
21
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
+
experimental: [false]
|
23
|
+
include:
|
24
|
+
- ruby: '2.7'
|
25
|
+
experimental: true
|
26
|
+
steps:
|
27
|
+
- uses: actions/checkout@master
|
28
|
+
- name: Use Ruby
|
29
|
+
uses: actions/setup-ruby@v1
|
30
|
+
with:
|
31
|
+
ruby-version: ${{ matrix.ruby }}
|
32
|
+
- name: Update gems
|
33
|
+
run: |
|
34
|
+
gem install bundler
|
35
|
+
bundle install --jobs 4 --retry 3
|
36
|
+
- name: Run specs
|
37
|
+
run: |
|
38
|
+
bundle exec rake
|
@@ -0,0 +1,41 @@
|
|
1
|
+
name: windows
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
paths-ignore:
|
8
|
+
- .github/workflows/macos.yml
|
9
|
+
- .github/workflows/ubuntu.yml
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
test-windows:
|
13
|
+
name: Test on Ruby ${{ matrix.ruby }} Windows
|
14
|
+
runs-on: windows-latest
|
15
|
+
continue-on-error: ${{ matrix.experimental }}
|
16
|
+
strategy:
|
17
|
+
fail-fast: false
|
18
|
+
matrix:
|
19
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
20
|
+
experimental: [false]
|
21
|
+
# Does not supported yet:
|
22
|
+
# Ruby (< 2.7.dev, >= 2.3), which is required by gem 'nokogiri (~> 1.10)', is not
|
23
|
+
# available in the local ruby installation
|
24
|
+
# include:
|
25
|
+
# - ruby: '2.7'
|
26
|
+
# experimental: true
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@master
|
29
|
+
- name: Use Ruby
|
30
|
+
uses: actions/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby }}
|
33
|
+
- name: Update gems
|
34
|
+
shell: pwsh
|
35
|
+
run: |
|
36
|
+
gem install bundler
|
37
|
+
bundle config --local path vendor/bundle
|
38
|
+
bundle install --jobs 4 --retry 3
|
39
|
+
- name: Run specs
|
40
|
+
run: |
|
41
|
+
bundle exec rake
|
data/.gitignore
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at ronald.tse@ribose.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in lutaml-express.gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
gem "rake", "~> 12.0"
|
9
|
+
gem "lutaml",
|
10
|
+
git: "git@github.com:lutaml/lutaml.git",
|
11
|
+
branch: "feature/objects-lookup-dsl"
|
12
|
+
gem "jmespath", "~> 1.4"
|
data/README.adoc
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
= lutaml-express
|
2
|
+
|
3
|
+
== Functionality
|
4
|
+
|
5
|
+
Gem-extention for lutaml, works with EXPRESS files
|
6
|
+
|
7
|
+
=== Installation
|
8
|
+
|
9
|
+
With bundler:
|
10
|
+
|
11
|
+
[source,ruby]
|
12
|
+
----
|
13
|
+
# Gemfile
|
14
|
+
gem "lutaml-express"
|
15
|
+
----
|
16
|
+
|
17
|
+
Then in console:
|
18
|
+
|
19
|
+
[source,console]
|
20
|
+
----
|
21
|
+
$ bundle
|
22
|
+
----
|
23
|
+
|
24
|
+
With RubyGems:
|
25
|
+
|
26
|
+
[source,console]
|
27
|
+
----
|
28
|
+
$ gem install lutaml-express
|
29
|
+
----
|
30
|
+
|
31
|
+
=== Usage
|
32
|
+
|
33
|
+
[source,ruby]
|
34
|
+
----
|
35
|
+
Lutaml::Express::Parsers::Exp.parse(File.new('/path/to/file.exp')) # => Expressir::Model::Repository
|
36
|
+
----
|
37
|
+
|
38
|
+
== Development
|
39
|
+
|
40
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
41
|
+
|
42
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
43
|
+
|
44
|
+
## Contributing
|
45
|
+
|
46
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lutaml-express. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/lutaml-express/blob/master/CODE_OF_CONDUCT.md).
|
47
|
+
|
48
|
+
|
49
|
+
== Code of Conduct
|
50
|
+
|
51
|
+
Everyone interacting in the Lutaml::Uml project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lutaml-express/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "lutaml/express"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'lutaml/lutaml_path/document_wrapper'
|
2
|
+
|
3
|
+
module Lutaml
|
4
|
+
module Express
|
5
|
+
module LutamlPath
|
6
|
+
class DocumentWrapper < ::Lutaml::LutamlPath::DocumentWrapper
|
7
|
+
SCHEMA_ATTRIBUTES = %w[
|
8
|
+
id
|
9
|
+
constants
|
10
|
+
declarations
|
11
|
+
entities
|
12
|
+
functions
|
13
|
+
interfaces
|
14
|
+
procedures
|
15
|
+
rules
|
16
|
+
subtype_constraints
|
17
|
+
types
|
18
|
+
version
|
19
|
+
].freeze
|
20
|
+
|
21
|
+
protected
|
22
|
+
|
23
|
+
def serialize_document(repository)
|
24
|
+
repository.schemas.each_with_object({}) do |schema, res|
|
25
|
+
res['schemas'] ||= []
|
26
|
+
serialized_schema = SCHEMA_ATTRIBUTES.each_with_object({}) do |name, nested_res|
|
27
|
+
attr_value = schema.send(name)
|
28
|
+
nested_res[name] = serialize_value(attr_value)
|
29
|
+
end
|
30
|
+
res[schema.id] = serialized_schema
|
31
|
+
res['schemas'].push(serialized_schema)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'expressir'
|
4
|
+
require 'expressir/express_exp/parser'
|
5
|
+
|
6
|
+
module Lutaml
|
7
|
+
module Express
|
8
|
+
module Parsers
|
9
|
+
# Class for parsing .exp schema files into Expressir::Model::Repository
|
10
|
+
class Exp
|
11
|
+
# @param [String] io - file object with path to .exp file
|
12
|
+
# [Hash] options - options for parsing
|
13
|
+
#
|
14
|
+
# @return [Expressir::Model::Repository]
|
15
|
+
def self.parse(io, options = {})
|
16
|
+
Expressir::ExpressExp::Parser.from_exp(io.path)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/lutaml/express/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "lutaml-express"
|
7
|
+
spec.version = Lutaml::Express::VERSION
|
8
|
+
spec.authors = ["Ribose Inc."]
|
9
|
+
spec.email = ["open.source@ribose.com'"]
|
10
|
+
|
11
|
+
spec.summary = "EXPRESS model module for LutaML."
|
12
|
+
spec.description = "EXPRESS model module for LutaML."
|
13
|
+
spec.homepage = "https://github.com/lutaml/lutaml-express"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/lutaml/lutaml-express/releases"
|
19
|
+
|
20
|
+
spec.files = `git ls-files`.split("\n")
|
21
|
+
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
22
|
+
|
23
|
+
spec.bindir = "exe"
|
24
|
+
spec.require_paths = ["lib"]
|
25
|
+
|
26
|
+
spec.add_runtime_dependency "expressir", "~> 0.2.0"
|
27
|
+
|
28
|
+
spec.add_development_dependency "byebug"
|
29
|
+
spec.add_development_dependency "nokogiri", "~> 1.10"
|
30
|
+
spec.add_development_dependency "rubocop", "~> 0.54.0"
|
31
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
32
|
+
spec.add_development_dependency "pry", "~> 0.12.2"
|
33
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
34
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
35
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "spec_helper"
|
4
|
+
|
5
|
+
RSpec.describe Lutaml::Express::LutamlPath::DocumentWrapper do
|
6
|
+
describe ".parse" do
|
7
|
+
subject(:lutaml_path) { described_class.new(repository) }
|
8
|
+
subject(:serialized_document) do
|
9
|
+
lutaml_path.serialized_document
|
10
|
+
end
|
11
|
+
|
12
|
+
context "when simple diagram without attributes" do
|
13
|
+
let(:repository) do
|
14
|
+
Lutaml::Express::Parsers::Exp.parse(File.new(fixtures_path("test.exp")))
|
15
|
+
end
|
16
|
+
let(:schema) { 'annotated_3d_model_data_quality_criteria_schema' }
|
17
|
+
let(:entities_names) do
|
18
|
+
%w[
|
19
|
+
a3m_data_quality_criteria_representation
|
20
|
+
a3m_data_quality_criterion
|
21
|
+
a3m_data_quality_criterion_specific_applied_value
|
22
|
+
a3m_data_quality_target_accuracy_association
|
23
|
+
a3m_detailed_report_request
|
24
|
+
a3m_summary_report_request_with_representative_value]
|
25
|
+
end
|
26
|
+
|
27
|
+
it "serializes repository attributes" do
|
28
|
+
expect(serialized_document.keys).to(eq(['schemas', schema]))
|
29
|
+
expect(serialized_document['schemas'].map {|n| n['id'] }).to(eq([schema]))
|
30
|
+
end
|
31
|
+
|
32
|
+
it "correctly finds elements by jmespath expression" do
|
33
|
+
expect(serialized_document['schemas'].first['entities']
|
34
|
+
.map {|n| n['id'] }).to(eq(entities_names))
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "spec_helper"
|
4
|
+
|
5
|
+
RSpec.describe Lutaml::Express::Parsers::Exp do
|
6
|
+
describe ".parse" do
|
7
|
+
subject(:parse) { described_class.parse(content) }
|
8
|
+
|
9
|
+
context "when simple diagram without attributes" do
|
10
|
+
let(:content) do
|
11
|
+
File.new(fixtures_path("test.exp"))
|
12
|
+
end
|
13
|
+
|
14
|
+
it "creates Expressir::Model::Repository object from supplied exp file" do
|
15
|
+
expect(parse).to be_instance_of(Expressir::Model::Repository)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "correctly reads schema attributes" do
|
19
|
+
expect(parse.schemas.first.id).to(eq('annotated_3d_model_data_quality_criteria_schema'))
|
20
|
+
expect(parse.schemas.first.entities.map(&:id))
|
21
|
+
.to(eq(["a3m_data_quality_criteria_representation",
|
22
|
+
"a3m_data_quality_criterion",
|
23
|
+
"a3m_data_quality_criterion_specific_applied_value",
|
24
|
+
"a3m_data_quality_target_accuracy_association",
|
25
|
+
"a3m_detailed_report_request",
|
26
|
+
"a3m_summary_report_request_with_representative_value"]))
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,121 @@
|
|
1
|
+
(*
|
2
|
+
$Id: test.exp,v 1.3 2020/07/30 05:18:54 ftanaka Exp $
|
3
|
+
ISO 10303 TC184/SC4/WG12 N10658
|
4
|
+
|
5
|
+
EXPRESS Source:
|
6
|
+
ISO 10303-59 ed3 Quality of product shape data - Annotated 3d model data quality criteria schema
|
7
|
+
|
8
|
+
The following permission notice and disclaimer shall be included in all copies of this EXPRESS schema ("the Schema"),
|
9
|
+
and derivations of the Schema:
|
10
|
+
|
11
|
+
Copyright ISO 2020 All rights reserved
|
12
|
+
Permission is hereby granted, free of charge in perpetuity, to any person obtaining a copy of the Schema,
|
13
|
+
to use, copy, modify, merge and distribute free of charge, copies of the Schema for the purposes of developing,
|
14
|
+
implementing, installing and using software based on the Schema, and to permit persons to whom the Schema is furnished to do so,
|
15
|
+
subject to the following conditions:
|
16
|
+
|
17
|
+
THE SCHEMA IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
18
|
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
20
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SCHEMA OR THE
|
22
|
+
USE OR OTHER DEALINGS IN THE SCHEMA.
|
23
|
+
|
24
|
+
In addition, any modified copy of the Schema shall include the following notice:
|
25
|
+
|
26
|
+
THIS SCHEMA HAS BEEN MODIFIED FROM THE SCHEMA DEFINED IN
|
27
|
+
ISO 10303-59 ed3 Quality of product shape data - Annotated 3d model data quality criteria schema
|
28
|
+
AND SHOULD NOT BE INTERPRETED AS COMPLYING WITH THAT STANDARD
|
29
|
+
*)
|
30
|
+
|
31
|
+
SCHEMA annotated_3d_model_data_quality_criteria_schema '{iso standard 10303 part(59) version(3) object(1) annotated_3d_model_data_quality_criteria_schema(6)}';
|
32
|
+
|
33
|
+
(* Need select eleemnts for measure_value *)
|
34
|
+
REFERENCE FROM measure_schema
|
35
|
+
(measure_value);
|
36
|
+
|
37
|
+
REFERENCE FROM product_data_quality_criteria_schema
|
38
|
+
(data_quality_criteria_representation,
|
39
|
+
data_quality_criterion,
|
40
|
+
data_quality_measurement_requirement,
|
41
|
+
detailed_report_request_with_number_of_data,
|
42
|
+
summary_report_request);
|
43
|
+
|
44
|
+
REFERENCE FROM representation_schema
|
45
|
+
(representation,
|
46
|
+
representation_item);
|
47
|
+
|
48
|
+
REFERENCE FROM shape_data_quality_criteria_schema
|
49
|
+
(shape_data_quality_assessment_specification_select,
|
50
|
+
shape_measurement_accuracy);
|
51
|
+
|
52
|
+
REFERENCE FROM support_resource_schema
|
53
|
+
(identifier,
|
54
|
+
label,
|
55
|
+
text);
|
56
|
+
|
57
|
+
TYPE a3m_accuracy_associated_target_select = EXTENSIBLE SELECT;
|
58
|
+
END_TYPE;
|
59
|
+
|
60
|
+
TYPE a3m_data_quality_accuracy_type_name = EXTENSIBLE ENUMERATION;
|
61
|
+
END_TYPE;
|
62
|
+
|
63
|
+
TYPE a3m_data_quality_inspected_element_type_name = EXTENSIBLE ENUMERATION;
|
64
|
+
END_TYPE;
|
65
|
+
|
66
|
+
TYPE a3m_data_quality_measured_data_type_name = EXTENSIBLE ENUMERATION;
|
67
|
+
END_TYPE;
|
68
|
+
|
69
|
+
TYPE a3m_data_quality_type_name_for_location_of_extreme_value = EXTENSIBLE ENUMERATION;
|
70
|
+
END_TYPE;
|
71
|
+
|
72
|
+
TYPE summary_stats_value_type = ENUMERATION OF
|
73
|
+
(average_value,
|
74
|
+
max_value,
|
75
|
+
min_value);
|
76
|
+
END_TYPE;
|
77
|
+
|
78
|
+
ENTITY a3m_data_quality_criteria_representation
|
79
|
+
SUBTYPE OF (data_quality_criteria_representation);
|
80
|
+
WHERE
|
81
|
+
WR1: SIZEOF( QUERY( q <* SELF\representation.items|
|
82
|
+
'ANNOTATED_3D_MODEL_DATA_QUALITY_CRITERIA_SCHEMA.' +
|
83
|
+
'A3M_DATA_QUALITY_CRITERION' IN TYPEOF(q))) > 0;
|
84
|
+
END_ENTITY;
|
85
|
+
|
86
|
+
ENTITY a3m_data_quality_criterion
|
87
|
+
ABSTRACT SUPERTYPE
|
88
|
+
SUBTYPE OF(data_quality_criterion, data_quality_measurement_requirement);
|
89
|
+
assessment_specification : shape_data_quality_assessment_specification_select;
|
90
|
+
measured_data_type : a3m_data_quality_measured_data_type_name;
|
91
|
+
inspected_elements_types: LIST[1:?] OF a3m_data_quality_inspected_element_type_name;
|
92
|
+
accuracy_types : LIST [0:?] OF a3m_data_quality_accuracy_type_name;
|
93
|
+
location_of_extreme_value_types: LIST[0:?] OF a3m_data_quality_type_name_for_location_of_extreme_value;
|
94
|
+
END_ENTITY;
|
95
|
+
|
96
|
+
ENTITY a3m_data_quality_criterion_specific_applied_value
|
97
|
+
ABSTRACT SUPERTYPE
|
98
|
+
SUBTYPE OF(representation_item);
|
99
|
+
criterion_to_assign_the_value: a3m_data_quality_criterion;
|
100
|
+
applied_value : measure_value;
|
101
|
+
END_ENTITY;
|
102
|
+
|
103
|
+
ENTITY a3m_data_quality_target_accuracy_association;
|
104
|
+
id : identifier;
|
105
|
+
name : label;
|
106
|
+
description : OPTIONAL text;
|
107
|
+
accuracy_specification : shape_measurement_accuracy;
|
108
|
+
target_to_associate : a3m_accuracy_associated_target_select;
|
109
|
+
END_ENTITY;
|
110
|
+
|
111
|
+
ENTITY a3m_detailed_report_request
|
112
|
+
SUBTYPE OF(detailed_report_request_with_number_of_data);
|
113
|
+
value_type_requested : summary_stats_value_type;
|
114
|
+
END_ENTITY;
|
115
|
+
|
116
|
+
ENTITY a3m_summary_report_request_with_representative_value
|
117
|
+
SUBTYPE OF(summary_report_request);
|
118
|
+
value_type_requested : summary_stats_value_type;
|
119
|
+
END_ENTITY;
|
120
|
+
|
121
|
+
END_SCHEMA;
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "lutaml/express"
|
5
|
+
require "byebug"
|
6
|
+
|
7
|
+
RSpec.configure do |config|
|
8
|
+
# Enable flags like --only-failures and --next-failure
|
9
|
+
config.example_status_persistence_file_path = ".rspec_status"
|
10
|
+
|
11
|
+
# Disable RSpec exposing methods globally on `Module` and `main`
|
12
|
+
config.disable_monkey_patching!
|
13
|
+
|
14
|
+
config.expect_with :rspec do |c|
|
15
|
+
c.syntax = :expect
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def fixtures_path(path)
|
20
|
+
File.join(File.expand_path("./fixtures", __dir__), path)
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: lutaml-express
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ribose Inc.
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-10-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: expressir
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: byebug
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: nokogiri
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.10'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.10'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.54.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.54.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: pry
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.12.2
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.12.2
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rake
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '10.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '10.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.0'
|
125
|
+
description: EXPRESS model module for LutaML.
|
126
|
+
email:
|
127
|
+
- open.source@ribose.com'
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- ".github/workflows/macos.yml"
|
133
|
+
- ".github/workflows/ubuntu.yml"
|
134
|
+
- ".github/workflows/windows.yml"
|
135
|
+
- ".gitignore"
|
136
|
+
- CODE_OF_CONDUCT.md
|
137
|
+
- Gemfile
|
138
|
+
- README.adoc
|
139
|
+
- Rakefile
|
140
|
+
- bin/console
|
141
|
+
- bin/setup
|
142
|
+
- lib/lutaml/express.rb
|
143
|
+
- lib/lutaml/express/lutaml_path/document_wrapper.rb
|
144
|
+
- lib/lutaml/express/parsers/exp.rb
|
145
|
+
- lib/lutaml/express/version.rb
|
146
|
+
- lutaml-express.gemspec
|
147
|
+
- spec/express/express_spec.rb
|
148
|
+
- spec/express/lutaml_path/document_wrapper_spec.rb
|
149
|
+
- spec/express/parsers/exp_spec.rb
|
150
|
+
- spec/fixtures/test.exp
|
151
|
+
- spec/spec_helper.rb
|
152
|
+
homepage: https://github.com/lutaml/lutaml-express
|
153
|
+
licenses:
|
154
|
+
- MIT
|
155
|
+
metadata:
|
156
|
+
homepage_uri: https://github.com/lutaml/lutaml-express
|
157
|
+
source_code_uri: https://github.com/lutaml/lutaml-express
|
158
|
+
changelog_uri: https://github.com/lutaml/lutaml-express/releases
|
159
|
+
post_install_message:
|
160
|
+
rdoc_options: []
|
161
|
+
require_paths:
|
162
|
+
- lib
|
163
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
requirements: []
|
174
|
+
rubygems_version: 3.0.3
|
175
|
+
signing_key:
|
176
|
+
specification_version: 4
|
177
|
+
summary: EXPRESS model module for LutaML.
|
178
|
+
test_files: []
|