spout 0.6.0.beta6 → 0.6.0.beta7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spout/version.rb +1 -1
- data/lib/spout/views/index.html.erb +77 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8321e511c49c9c76cdda7d8be1e289190888a05b
|
4
|
+
data.tar.gz: 831e1f22202f30316a79c51e8ed93971600b4225
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74529bff8848f4aff638e9b3a5bf0086dcd408e9b2988f2eaad48777c3feeab149c7dcef319f67de058351bd55ae9c8caa7e80322c6c31e4129c60c4834d58b6
|
7
|
+
data.tar.gz: 905223a0af8901f51167aa3a0c1e269a18b7919b0ef7b807eb62562ee393b59beb1a0e962276be5614fa961432c3eb180a9fbcf525a405eb376e60294fbc13a9
|
data/lib/spout/version.rb
CHANGED
@@ -36,10 +36,19 @@ body {
|
|
36
36
|
/* Set the fixed height of the footer here */
|
37
37
|
height: 60px;
|
38
38
|
background-color: #f5f5f5;
|
39
|
+
padding: 0px 30px;
|
39
40
|
}
|
40
41
|
code.success {
|
41
42
|
color: #468847;
|
42
43
|
background-color: #dff0d8;
|
44
|
+
}
|
45
|
+
code.default {
|
46
|
+
color: #333;
|
47
|
+
background-color: #f5f5f5;
|
48
|
+
}
|
49
|
+
tfoot td {
|
50
|
+
vertical-align: middle !important;
|
51
|
+
padding-bottom: 0px !important;
|
43
52
|
}
|
44
53
|
</style>
|
45
54
|
</head>
|
@@ -47,14 +56,12 @@ code.success {
|
|
47
56
|
<body>
|
48
57
|
|
49
58
|
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
50
|
-
<div class="
|
51
|
-
<
|
52
|
-
<a class="navbar-brand" href="#">Spout Coverage</a>
|
53
|
-
</div>
|
59
|
+
<div class="navbar-header" style="padding: 0px 30px">
|
60
|
+
<a class="navbar-brand" href="#">Spout Coverage</a>
|
54
61
|
</div>
|
55
62
|
</div>
|
56
63
|
|
57
|
-
<div
|
64
|
+
<div style="padding: 30px 30px 10px 30px;">
|
58
65
|
|
59
66
|
<table class="table">
|
60
67
|
<thead>
|
@@ -62,6 +69,7 @@ code.success {
|
|
62
69
|
<th>CSV</th>
|
63
70
|
<th>Coverage</th>
|
64
71
|
<th>Columns</th>
|
72
|
+
<th>Columns Defined</th>
|
65
73
|
<th>Columns Missed</th>
|
66
74
|
</tr>
|
67
75
|
</thead>
|
@@ -76,8 +84,9 @@ code.success {
|
|
76
84
|
<span class="text-muted">---</span>
|
77
85
|
<% end %>
|
78
86
|
</td>
|
79
|
-
<td><%= number_with_delimiter( total_column_count ) %></td>
|
80
|
-
<td><%= number_with_delimiter(
|
87
|
+
<td><code class="default"><%= number_with_delimiter( total_column_count ) %></code></td>
|
88
|
+
<td><code class="success"><%= number_with_delimiter( mapped_column_count ) %></code></td>
|
89
|
+
<td><code><%= number_with_delimiter( total_column_count - mapped_column_count ) %></code></td>
|
81
90
|
</tr>
|
82
91
|
<% end %>
|
83
92
|
</tbody>
|
@@ -95,6 +104,60 @@ code.success {
|
|
95
104
|
<th>Values</th>
|
96
105
|
</tr>
|
97
106
|
</thead>
|
107
|
+
<tfoot>
|
108
|
+
<tr>
|
109
|
+
<td style="text-align:middle"><p class="lead">Coverage</p></td>
|
110
|
+
<td style="text-align:middle"><p class="lead"><%= total_count = @matching_results.count %></p></td>
|
111
|
+
<td style="text-align:center">
|
112
|
+
<% matched = @matching_results.count{|csv, column, scr| scr.file_name_test} %>
|
113
|
+
<% matched_percent = (matched * 100.0 / total_count).floor %>
|
114
|
+
<% missing_percent = 100 - matched_percent %>
|
115
|
+
<%= number_with_delimiter( matched ) %> of <%= number_with_delimiter( total_count ) %>
|
116
|
+
<div class="progress progress-striped">
|
117
|
+
<div class="progress-bar progress-bar-success" style="width: <%= matched_percent %>%"></div>
|
118
|
+
<div class="progress-bar progress-bar-danger" style="width: <%= missing_percent %>%"></div>
|
119
|
+
</div>
|
120
|
+
</td>
|
121
|
+
<td style="text-align:center">
|
122
|
+
<% matched = @matching_results.count{|csv, column, scr| scr.json_id_test} %>
|
123
|
+
<% matched_percent = (matched * 100.0 / total_count).floor %>
|
124
|
+
<% missing_percent = 100 - matched_percent %>
|
125
|
+
<%= number_with_delimiter( matched ) %> of <%= number_with_delimiter( total_count ) %>
|
126
|
+
<div class="progress progress-striped">
|
127
|
+
<div class="progress-bar progress-bar-success" style="width: <%= matched_percent %>%"></div>
|
128
|
+
<div class="progress-bar progress-bar-danger" style="width: <%= missing_percent %>%"></div>
|
129
|
+
</div>
|
130
|
+
</td>
|
131
|
+
<td style="text-align:center">
|
132
|
+
<% matched = @matching_results.count{|csv, column, scr| scr.variable_type_test} %>
|
133
|
+
<% matched_percent = (matched * 100.0 / total_count).floor %>
|
134
|
+
<% missing_percent = 100 - matched_percent %>
|
135
|
+
<%= number_with_delimiter( matched ) %> of <%= number_with_delimiter( total_count ) %>
|
136
|
+
<div class="progress progress-striped">
|
137
|
+
<div class="progress-bar progress-bar-success" style="width: <%= matched_percent %>%"></div>
|
138
|
+
<div class="progress-bar progress-bar-danger" style="width: <%= missing_percent %>%"></div>
|
139
|
+
</div>
|
140
|
+
</td>
|
141
|
+
<td style="text-align:center">
|
142
|
+
<% matched = @matching_results.count{|csv, column, scr| scr.json['type'] == 'choices' and scr.domain_test} %>
|
143
|
+
<% total_count = @matching_results.count{|csv, column, scr| scr.json['type'] == 'choices'} %>
|
144
|
+
<% matched_percent = (matched * 100.0 / total_count).floor %>
|
145
|
+
<% missing_percent = 100 - matched_percent %>
|
146
|
+
<%= number_with_delimiter( matched ) %> of <%= number_with_delimiter( total_count ) %>
|
147
|
+
<div class="progress progress-striped">
|
148
|
+
<div class="progress-bar progress-bar-success" style="width: <%= matched_percent %>%"></div>
|
149
|
+
<div class="progress-bar progress-bar-danger" style="width: <%= missing_percent %>%"></div>
|
150
|
+
</div>
|
151
|
+
</td>
|
152
|
+
<td>
|
153
|
+
<ul class="list-unstyled">
|
154
|
+
<li><code class="success">Value exists in dataset, and value exists in domain</code></li>
|
155
|
+
<li><code class="default">Value <b>does not exist</b> in dataset, but value exists in domain</code></li>
|
156
|
+
<li><code>Value exists in dataset, but value <b>does not exist</b> in domain</code></li>
|
157
|
+
</ul>
|
158
|
+
</td>
|
159
|
+
</tr>
|
160
|
+
</tfoot>
|
98
161
|
<tbody>
|
99
162
|
<% @matching_results.each do |csv, column, scr| %>
|
100
163
|
<tr>
|
@@ -132,11 +195,15 @@ code.success {
|
|
132
195
|
</td>
|
133
196
|
<td style="white-space:nowrap">
|
134
197
|
<% if scr.json['type'] == 'choices' %>
|
135
|
-
<%
|
198
|
+
<% unused_values = scr.valid_values - scr.csv_values %>
|
199
|
+
<% if scr.values_test and unused_values.size == 0 %>
|
136
200
|
<div class="text-success" style="text-align:center"><span class="glyphicon glyphicon-ok"></span></div>
|
137
201
|
<% else %>
|
138
202
|
<% (scr.valid_values + scr.csv_values.compact.sort).uniq.each do |value| %>
|
139
|
-
|
203
|
+
<% class_type = '' %>
|
204
|
+
<% class_type = 'success' if scr.valid_values.include?(value) %>
|
205
|
+
<% class_type = 'default' if unused_values.include?(value) %>
|
206
|
+
<code class="<%= class_type %>"><%= value %></code>
|
140
207
|
<% end %>
|
141
208
|
<% end %>
|
142
209
|
<% end %>
|
@@ -149,9 +216,7 @@ code.success {
|
|
149
216
|
</div><!-- /.container -->
|
150
217
|
|
151
218
|
<div id="footer">
|
152
|
-
<
|
153
|
-
<p class="text-muted" style="margin: 20px 0;">Generated by <a href="https://github.com/sleepepi/spout">Spout</a> v<%= Spout::VERSION::STRING %></p>
|
154
|
-
</div>
|
219
|
+
<p class="text-muted" style="margin: 20px 0;">Generated by <a href="https://github.com/sleepepi/spout">Spout</a> v<%= Spout::VERSION::STRING %></p>
|
155
220
|
</div>
|
156
221
|
|
157
222
|
</body></html>
|