ea 0.6.148 → 0.6.150
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/gemfiles/published.gemfile +24 -0
- data/lib/ea/qea/factory/enum_transformer.rb +9 -2
- data/lib/ea/svg/parity/corpus_report.rb +42 -4
- data/lib/ea/svg/parity/suite.rb +59 -15
- data/lib/ea/version.rb +1 -1
- data/lib/ea/xmi/parser.rb +2 -0
- data/lib/tasks/svg_bench.rake +93 -73
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ccbd367c2cf700e3ecdd83ae2ab2a14d88f70c9fbe478127e89cee1a860a9574
|
|
4
|
+
data.tar.gz: f914db10c1a19fced5d2af85cb124236b2df6100c61815fc2c6bda7df745c6ed
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5d5bed4c2ee549d1ab44165188c1c291519911bc4f110de19de3f37986b48fc6e7345d7c0567f2734dd83a05f03f40dcf51a6795b511c2dc4923ebd815bb7f2b
|
|
7
|
+
data.tar.gz: 7a161d6fe22bc2331a03c366deee1a9ae73166d6536558f1e09e853f9dc78058dc40824d1419b852e6f82f1a4bb34c3000bb5c3db6788a2d78e6438128af2682
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# CI-identical published-gem resolution for local testing — the
|
|
4
|
+
# replacement for the removed EA_FORCE_RUBYGEMS env-var switch.
|
|
5
|
+
#
|
|
6
|
+
# BUNDLE_GEMFILE=gemfiles/published.gemfile bundle install
|
|
7
|
+
# BUNDLE_GEMFILE=gemfiles/published.gemfile bundle exec rspec
|
|
8
|
+
#
|
|
9
|
+
# Stands alone (does not eval the root Gemfile): every dependency
|
|
10
|
+
# resolves from rubygems, exactly as CI resolves it.
|
|
11
|
+
|
|
12
|
+
source "https://rubygems.org"
|
|
13
|
+
|
|
14
|
+
gemspec path: ".."
|
|
15
|
+
|
|
16
|
+
gem "canon"
|
|
17
|
+
gem "emf"
|
|
18
|
+
gem "emfsvg"
|
|
19
|
+
gem "fontist"
|
|
20
|
+
gem "lutaml-uml"
|
|
21
|
+
gem "xmi"
|
|
22
|
+
|
|
23
|
+
gem "rake"
|
|
24
|
+
gem "rspec", "~> 3.0"
|
|
@@ -62,12 +62,19 @@ module Ea
|
|
|
62
62
|
def build_enum_value(ea_attr)
|
|
63
63
|
Lutaml::Uml::Value.new.tap do |value|
|
|
64
64
|
value.name = ea_attr.name
|
|
65
|
+
value.initial = present_text(ea_attr.default)
|
|
65
66
|
value.id = normalize_guid_to_xmi_format(ea_attr.ea_guid, "EAID")
|
|
66
|
-
value.definition = ea_attr.notes
|
|
67
|
-
ea_attr.notes.nil? || ea_attr.notes.empty?
|
|
67
|
+
value.definition = present_text(ea_attr.notes)
|
|
68
68
|
end
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
+
# @return [String, nil] the text when non-blank, otherwise nil
|
|
72
|
+
def present_text(text)
|
|
73
|
+
return nil if text.nil? || text.empty?
|
|
74
|
+
|
|
75
|
+
text
|
|
76
|
+
end
|
|
77
|
+
|
|
71
78
|
end
|
|
72
79
|
end
|
|
73
80
|
end
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "json"
|
|
4
|
+
require "yaml"
|
|
4
5
|
|
|
5
6
|
module Ea
|
|
6
7
|
module Svg
|
|
@@ -35,8 +36,41 @@ module Ea
|
|
|
35
36
|
result
|
|
36
37
|
end
|
|
37
38
|
|
|
39
|
+
# YAML uses plain string keys so gate consumers can safe-load it.
|
|
40
|
+
# Include clean diagrams with zero counts; omit unreferenced diagrams
|
|
41
|
+
# exactly as Suite does. Counts use Suite's default tolerances.
|
|
42
|
+
def run_baseline(output_path:, io: $stdout)
|
|
43
|
+
suite = Suite.new(document, ref_dir).measure
|
|
44
|
+
rows = baseline_rows(suite)
|
|
45
|
+
result = { "totals" => baseline_totals(rows), "diagrams" => rows }
|
|
46
|
+
File.write(output_path, YAML.dump(result))
|
|
47
|
+
print_baseline(suite, rows, io)
|
|
48
|
+
result
|
|
49
|
+
end
|
|
50
|
+
|
|
38
51
|
private
|
|
39
52
|
|
|
53
|
+
def baseline_rows(suite)
|
|
54
|
+
suite.per_diagram.map do |diagram|
|
|
55
|
+
{ "id" => diagram.id, "name" => diagram.name,
|
|
56
|
+
"deltas" => diagram.delta_summary.transform_keys(&:to_s) }
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def baseline_totals(rows)
|
|
61
|
+
rows.each_with_object(Hash.new(0)) do |row, sum|
|
|
62
|
+
row.fetch("deltas").each { |key, count| sum[key] += count }
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def print_baseline(suite, rows, io)
|
|
67
|
+
io.puts "Diagrams: #{suite.total} (failures: #{suite.failures.size})"
|
|
68
|
+
rows.each do |row|
|
|
69
|
+
deltas = row.fetch("deltas").map { |key, count| "#{key}=#{count}" }.join(" ")
|
|
70
|
+
io.puts " #{row.fetch("id")} (#{row.fetch("name")}): #{deltas}"
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
40
74
|
def diagrams_with_references
|
|
41
75
|
document.diagrams.select { |d| reference_path_for(d) }
|
|
42
76
|
end
|
|
@@ -45,7 +79,7 @@ module Ea
|
|
|
45
79
|
# fall back to the raw diagram id for non-QEA sources.
|
|
46
80
|
def reference_path_for(diagram)
|
|
47
81
|
[
|
|
48
|
-
File.join(ref_dir, "EAID_#{diagram.id.tr(
|
|
82
|
+
File.join(ref_dir, "EAID_#{diagram.id.tr("-", "_")}.svg"),
|
|
49
83
|
File.join(ref_dir, "#{Ea::Sources::Qea::IdNormalizer.to_eaid(diagram.id)}.svg"),
|
|
50
84
|
File.join(ref_dir, "#{diagram.id}.svg")
|
|
51
85
|
].find { |p| File.exist?(p) }
|
|
@@ -55,9 +89,7 @@ module Ea
|
|
|
55
89
|
ref_path = reference_path_for(diagram)
|
|
56
90
|
return nil unless ref_path
|
|
57
91
|
|
|
58
|
-
ours =
|
|
59
|
-
diagram, model_index: index, document: document
|
|
60
|
-
).render
|
|
92
|
+
ours = render_diagram(diagram, index)
|
|
61
93
|
differ = Differ.new(ours: ours, reference: File.read(ref_path))
|
|
62
94
|
deltas = differ.text_deltas
|
|
63
95
|
|
|
@@ -68,6 +100,12 @@ module Ea
|
|
|
68
100
|
}
|
|
69
101
|
end
|
|
70
102
|
|
|
103
|
+
def render_diagram(diagram, index)
|
|
104
|
+
Ea::Svg::EaEmitter::Document.new(
|
|
105
|
+
diagram, model_index: index, document: document
|
|
106
|
+
).render
|
|
107
|
+
end
|
|
108
|
+
|
|
71
109
|
def totals(rows)
|
|
72
110
|
sum = DELTA_KEYS.to_h { |k| [k, 0] }
|
|
73
111
|
shapes = { matched: 0, missing: 0, extra: 0 }
|
data/lib/ea/svg/parity/suite.rb
CHANGED
|
@@ -5,12 +5,14 @@ require "nokogiri"
|
|
|
5
5
|
module Ea
|
|
6
6
|
module Svg
|
|
7
7
|
module Parity
|
|
8
|
-
# Drives
|
|
8
|
+
# Drives Checker and Differ across every diagram in a Document
|
|
9
9
|
# that has a matching reference SVG. Drives from any source
|
|
10
10
|
# the Document supports (qea or xmi) since the Document is
|
|
11
11
|
# format-agnostic.
|
|
12
12
|
class Suite
|
|
13
13
|
ELEMENT_TYPES = %i[rect polygon path text].freeze
|
|
14
|
+
TEXT_DELTAS = %i[moved_text missing_text extra_text wrong_font wrong_size wrong_weight].freeze
|
|
15
|
+
GEOMETRY_DELTAS = %i[dx dy dwidth dheight max_point_delta].freeze
|
|
14
16
|
|
|
15
17
|
attr_reader :document, :ref_dir
|
|
16
18
|
|
|
@@ -47,10 +49,54 @@ module Ea
|
|
|
47
49
|
document: document).render
|
|
48
50
|
reference = File.read(ref_path)
|
|
49
51
|
checker = Checker.new(ours: ours, reference: reference)
|
|
50
|
-
DiagramReport.new(diagram: diagram, report: checker.report
|
|
52
|
+
DiagramReport.new(diagram: diagram, report: checker.report,
|
|
53
|
+
differ: Differ.new(ours: ours, reference: reference))
|
|
51
54
|
end
|
|
52
55
|
|
|
53
|
-
|
|
56
|
+
# Epsilon applies to measured geometry; text/font mismatches retain
|
|
57
|
+
# Differ's classification (including its text movement threshold).
|
|
58
|
+
Tolerances = Data.define(:epsilon) do
|
|
59
|
+
def initialize(epsilon: Differ::EPSILON)
|
|
60
|
+
raise ArgumentError, "epsilon must be finite and non-negative" unless epsilon.finite? && epsilon >= 0
|
|
61
|
+
|
|
62
|
+
super
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
DiagramReport = Struct.new(:diagram, :report, :differ, keyword_init: true) do
|
|
67
|
+
def delta_summary(tolerances = Tolerances.new)
|
|
68
|
+
texts = differ.text_deltas
|
|
69
|
+
TEXT_DELTAS.to_h { |key| [key, texts[key].size] }.merge(
|
|
70
|
+
missing_shapes: differ.shape_summary[:missing],
|
|
71
|
+
extra_shapes: differ.shape_summary[:extra],
|
|
72
|
+
shape_geometry: geometry_count(tolerances),
|
|
73
|
+
**connector_summary(tolerances)
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def clean?(tolerances = Tolerances.new)
|
|
78
|
+
delta_summary(tolerances).values.all?(&:zero?)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def geometry_count(tolerances)
|
|
82
|
+
differ.shape_deltas.count do |delta|
|
|
83
|
+
delta.slice(*GEOMETRY_DELTAS).values.any? { |value| value.abs > tolerances.epsilon }
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
private :geometry_count
|
|
87
|
+
|
|
88
|
+
def connector_summary(tolerances)
|
|
89
|
+
deltas = differ.connector_deltas
|
|
90
|
+
{
|
|
91
|
+
source_endpoints: deltas.count { |delta| delta[:source_delta] > tolerances.epsilon },
|
|
92
|
+
target_endpoints: deltas.count { |delta| delta[:target_delta] > tolerances.epsilon },
|
|
93
|
+
arrowhead_tips: deltas.sum do |delta|
|
|
94
|
+
delta[:arrowhead_deltas].count { |head| head[:tip_delta] > tolerances.epsilon }
|
|
95
|
+
end
|
|
96
|
+
}
|
|
97
|
+
end
|
|
98
|
+
private :connector_summary
|
|
99
|
+
|
|
54
100
|
def id
|
|
55
101
|
diagram.id
|
|
56
102
|
end
|
|
@@ -64,6 +110,7 @@ module Ea
|
|
|
64
110
|
end
|
|
65
111
|
end
|
|
66
112
|
|
|
113
|
+
# Collects diagram results and aggregates counts across the suite.
|
|
67
114
|
class Report
|
|
68
115
|
attr_reader :per_diagram
|
|
69
116
|
|
|
@@ -71,6 +118,10 @@ module Ea
|
|
|
71
118
|
@per_diagram = per_diagram
|
|
72
119
|
end
|
|
73
120
|
|
|
121
|
+
def failures(tolerances = Tolerances.new)
|
|
122
|
+
per_diagram.reject { |diagram| diagram.clean?(tolerances) }
|
|
123
|
+
end
|
|
124
|
+
|
|
74
125
|
def total
|
|
75
126
|
per_diagram.size
|
|
76
127
|
end
|
|
@@ -80,19 +131,12 @@ module Ea
|
|
|
80
131
|
end
|
|
81
132
|
|
|
82
133
|
def aggregate_shape_counts
|
|
83
|
-
ours
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
ours[:path] += dr.report.path.ours
|
|
89
|
-
ours[:text] += dr.report.text.ours
|
|
90
|
-
ref[:rect] += dr.report.rect.reference
|
|
91
|
-
ref[:polygon] += dr.report.polygon.reference
|
|
92
|
-
ref[:path] += dr.report.path.reference
|
|
93
|
-
ref[:text] += dr.report.text.reference
|
|
134
|
+
%i[ours reference].to_h do |side|
|
|
135
|
+
counts = ELEMENT_TYPES.to_h do |type|
|
|
136
|
+
[type, per_diagram.sum { |dr| dr.report.public_send(type).public_send(side) }]
|
|
137
|
+
end
|
|
138
|
+
[side, counts]
|
|
94
139
|
end
|
|
95
|
-
{ ours: ours, reference: ref }
|
|
96
140
|
end
|
|
97
141
|
|
|
98
142
|
def text_overlap_avg
|
data/lib/ea/version.rb
CHANGED
data/lib/ea/xmi/parser.rb
CHANGED
|
@@ -601,6 +601,8 @@ module Ea
|
|
|
601
601
|
|
|
602
602
|
::Lutaml::Uml::Value.new.tap do |value|
|
|
603
603
|
value.name = owned_literal.name
|
|
604
|
+
ext_attr = fetch_attribute_node(owned_literal.id)
|
|
605
|
+
value.initial = ext_attr.initial if ext_attr&.initial
|
|
604
606
|
value.type = lookup_entity_name(uml_type_id) || uml_type_id
|
|
605
607
|
value.definition = lookup_attribute_documentation(owned_literal.id)
|
|
606
608
|
end
|
data/lib/tasks/svg_bench.rake
CHANGED
|
@@ -3,85 +3,105 @@
|
|
|
3
3
|
require "ea"
|
|
4
4
|
require "ea/svg/parity"
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
agg = suite.aggregate_shape_counts
|
|
6
|
+
module Ea
|
|
7
|
+
module Svg
|
|
8
|
+
module Parity
|
|
9
|
+
# Formatting shared by the benchmark tasks; parity baselines use CorpusReport.
|
|
10
|
+
module BenchOutput
|
|
11
|
+
def self.shape_counts(counts, width:)
|
|
12
|
+
%i[rect path polygon text].each do |key|
|
|
13
|
+
ours = counts[:ours][key]
|
|
14
|
+
reference = counts[:reference][key]
|
|
15
|
+
delta = ours - reference
|
|
16
|
+
puts " #{key.to_s.ljust(7)} ours=#{ours.to_s.rjust(width)} ref=#{reference.to_s.rjust(width)} " \
|
|
17
|
+
"delta=#{delta.to_s.rjust(5)} (#{percentage(delta, reference)}%)"
|
|
18
|
+
end
|
|
19
|
+
end
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
outliers = suite.outliers(shape_tolerance: tolerance)
|
|
35
|
-
unless outliers.empty?
|
|
36
|
-
puts "\nOutliers (#{outliers.size}):"
|
|
37
|
-
outliers.first(20).each do |dr|
|
|
38
|
-
r = dr.report
|
|
39
|
-
puts " #{dr.id} (#{dr.name}): shape_delta=#{r.shape_delta_total} text=#{r.text_delta}"
|
|
21
|
+
def self.percentage(delta, reference)
|
|
22
|
+
reference.zero? ? 0.0 : (delta.to_f / reference * 100).round(1)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.reference_dir(exports_dir, name)
|
|
26
|
+
# EA export folders may omit a QEA version suffix such as ".1".
|
|
27
|
+
names = [name, name.sub(/\.\d+$/, "")]
|
|
28
|
+
paths = names.product(%w[images Images]).map do |base, images|
|
|
29
|
+
File.join(exports_dir, base, images)
|
|
30
|
+
end
|
|
31
|
+
paths.find { |path| Dir.exist?(path) }
|
|
32
|
+
end
|
|
40
33
|
end
|
|
41
34
|
end
|
|
42
35
|
end
|
|
36
|
+
end
|
|
43
37
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Dir.glob("#{qea_dir}/*.qea").sort.each do |qea_path|
|
|
53
|
-
name = File.basename(qea_path, ".qea")
|
|
54
|
-
# Strip version suffixes like ".1" from names like
|
|
55
|
-
# "20251010_current_plateau_v5.1" to match the exports
|
|
56
|
-
# directory "20251010_current_plateau_v5".
|
|
57
|
-
stripped_name = name.sub(/\.\d+$/, "")
|
|
58
|
-
# Reference images live in examples/exports/<name>/images or Images
|
|
59
|
-
candidates = [
|
|
60
|
-
File.join(exports_dir, name, "images"),
|
|
61
|
-
File.join(exports_dir, name, "Images"),
|
|
62
|
-
File.join(exports_dir, stripped_name, "images"),
|
|
63
|
-
File.join(exports_dir, stripped_name, "Images")
|
|
64
|
-
]
|
|
65
|
-
ref_dir = candidates.find { |p| Dir.exist?(p) }
|
|
66
|
-
if ref_dir.nil?
|
|
67
|
-
puts "#{name}: SKIP (no exports/images directory)"
|
|
68
|
-
next
|
|
69
|
-
end
|
|
38
|
+
desc "Report Suite deltas and write a YAML baseline (SOURCE, REF_DIR, OUTPUT_PATH=parity-baseline.yml)"
|
|
39
|
+
task "svg:parity_report", %i[source ref_dir output_path] do |_t, args|
|
|
40
|
+
source = args[:source]
|
|
41
|
+
ref_dir = args[:ref_dir]
|
|
42
|
+
abort "usage: rake svg:parity_report[source,ref_dir,output_path]" unless source && ref_dir
|
|
43
|
+
abort "source not found: #{source}" unless File.exist?(source)
|
|
44
|
+
abort "ref_dir not found: #{ref_dir}" unless Dir.exist?(ref_dir)
|
|
70
45
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
46
|
+
doc = Ea::Svg::Parity::Source.new(source).load
|
|
47
|
+
Ea::Svg::Parity::CorpusReport.new(document: doc, ref_dir: ref_dir)
|
|
48
|
+
.run_baseline(output_path: args[:output_path] || "parity-baseline.yml")
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
desc "Score rendered SVG against EA reference SVGs (SOURCE.xmi or .qea + REF_DIR)"
|
|
52
|
+
task "svg:bench", %i[source ref_dir tolerance] do |_t, args|
|
|
53
|
+
source = args[:source] || ENV["EA_BENCH_SOURCE"] ||
|
|
54
|
+
File.expand_path("~/src/mn/mn-samples-plateau/sources/xmi/plateau_all_packages_export.xmi")
|
|
55
|
+
ref_dir = args[:ref_dir] || ENV["EA_BENCH_REF_DIR"] ||
|
|
56
|
+
File.expand_path("~/src/mn/mn-samples-plateau/sources/001-mds/xmi-images")
|
|
57
|
+
tolerance = (args[:tolerance] || ENV["EA_BENCH_TOLERANCE"] || "5").to_i
|
|
58
|
+
|
|
59
|
+
abort "source not found: #{source}" unless File.exist?(source)
|
|
60
|
+
abort "ref_dir not found: #{ref_dir}" unless Dir.exist?(ref_dir)
|
|
61
|
+
|
|
62
|
+
doc = Ea::Svg::Parity::Source.new(source).load
|
|
63
|
+
suite = Ea::Svg::Parity::Suite.new(doc, ref_dir).measure
|
|
64
|
+
agg = suite.aggregate_shape_counts
|
|
65
|
+
|
|
66
|
+
puts "Source: #{source}"
|
|
67
|
+
puts "Refs: #{ref_dir}"
|
|
68
|
+
puts "Diagrams: #{suite.total} (matched: #{suite.matched(shape_tolerance: tolerance)})"
|
|
69
|
+
Ea::Svg::Parity::BenchOutput.shape_counts(agg, width: 6)
|
|
70
|
+
puts "Text overlap avg: #{(suite.text_overlap_avg * 100).round(1)}%"
|
|
71
|
+
|
|
72
|
+
outliers = suite.outliers(shape_tolerance: tolerance)
|
|
73
|
+
unless outliers.empty?
|
|
74
|
+
puts "\nOutliers (#{outliers.size}):"
|
|
75
|
+
outliers.first(20).each do |dr|
|
|
76
|
+
r = dr.report
|
|
77
|
+
puts " #{dr.id} (#{dr.name}): shape_delta=#{r.shape_delta_total} text=#{r.text_delta}"
|
|
85
78
|
end
|
|
86
79
|
end
|
|
87
80
|
end
|
|
81
|
+
|
|
82
|
+
desc "Bench every example QEA in examples/qea against its exports/Images"
|
|
83
|
+
task "svg:examples" do
|
|
84
|
+
project_root = File.expand_path("../..", __dir__)
|
|
85
|
+
qea_dir = File.join(project_root, "examples", "qea")
|
|
86
|
+
exports_dir = File.join(project_root, "examples", "exports")
|
|
87
|
+
|
|
88
|
+
abort "examples/qea not found at #{qea_dir}" unless Dir.exist?(qea_dir)
|
|
89
|
+
|
|
90
|
+
Dir.glob("#{qea_dir}/*.qea").sort.each do |qea_path|
|
|
91
|
+
name = File.basename(qea_path, ".qea")
|
|
92
|
+
ref_dir = Ea::Svg::Parity::BenchOutput.reference_dir(exports_dir, name)
|
|
93
|
+
if ref_dir.nil?
|
|
94
|
+
puts "#{name}: SKIP (no exports/images directory)"
|
|
95
|
+
next
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
doc = Ea::Sources::Qea::Adapter.from_path(qea_path)
|
|
99
|
+
suite = Ea::Svg::Parity::Suite.new(doc, ref_dir).measure
|
|
100
|
+
agg = suite.aggregate_shape_counts
|
|
101
|
+
|
|
102
|
+
matched = suite.matched(shape_tolerance: 5)
|
|
103
|
+
puts "#{name.ljust(40)} #{matched}/#{suite.total} matched"
|
|
104
|
+
Ea::Svg::Parity::BenchOutput.shape_counts(agg, width: 5)
|
|
105
|
+
puts ""
|
|
106
|
+
end
|
|
107
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ea
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.150
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -568,6 +568,7 @@ files:
|
|
|
568
568
|
- frontend/tsconfig.json
|
|
569
569
|
- frontend/vite.config.ts
|
|
570
570
|
- frontend/vitest.config.ts
|
|
571
|
+
- gemfiles/published.gemfile
|
|
571
572
|
- lib/ea.rb
|
|
572
573
|
- lib/ea/bridge.rb
|
|
573
574
|
- lib/ea/bridge/qea_to_uml.rb
|