cpee 2.1.140 → 2.1.143

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/compliance-view.html +2 -5
  3. data/cockpit/compliance.html +2 -5
  4. data/cockpit/conformance.html +299 -0
  5. data/cockpit/css/compliance.css +7 -42
  6. data/cockpit/css/ui.css +7 -5
  7. data/cockpit/edit.html +1 -4
  8. data/cockpit/graph.html +1 -4
  9. data/cockpit/index.html +1 -4
  10. data/cockpit/js/compliance.js +102 -258
  11. data/cockpit/js/extended_columns.js +1 -1
  12. data/cockpit/js/instance.js +50 -19
  13. data/cockpit/js/llm.js +153 -81
  14. data/cockpit/js/mp-conformance.js +84 -0
  15. data/cockpit/js/parameters.js +3 -1
  16. data/cockpit/js/ui.js +2 -2
  17. data/cockpit/js/wfadaptor.js +41 -30
  18. data/cockpit/llm.html +1 -4
  19. data/cockpit/llmmodel.html +1 -4
  20. data/cockpit/model.html +1 -4
  21. data/cockpit/only_llm.html +1 -4
  22. data/cockpit/rngs/aggregations.rng +15 -0
  23. data/cockpit/rngs/intervals.rng +12 -0
  24. data/cockpit/rngs/nlrequirements.rng +8 -0
  25. data/cockpit/rngs/requirements.rng +2 -2
  26. data/cockpit/rngs/rules.rng +30 -0
  27. data/cockpit/templates/Coopis 2010.xml +10 -2
  28. data/cockpit/themes/base.js +5 -4
  29. data/cockpit/themes/presetlr/theme.js +2 -0
  30. data/cockpit/track.html +1 -4
  31. data/cpee.gemspec +1 -1
  32. data/lib/cpee/implementation_callbacks.rb +4 -2
  33. data/lib/cpee/implementation_notifications.rb +2 -2
  34. data/lib/cpee/implementation_properties.rb +36 -18
  35. data/lib/cpee/message.rb +3 -1
  36. data/lib/properties/set-properties.rng +4 -0
  37. data/lib/properties/set-some-properties.rng +4 -0
  38. data/lib/properties/set-testset.rng +4 -0
  39. data/lib/properties/transformation.rng +43 -34
  40. data/server/executionhandlers/ruby/controller.rb +16 -9
  41. data/server/resources/notifications/logging/subscription.xml +5 -0
  42. data/server/routing/end.pid +1 -1
  43. data/server/routing/forward-events-00.pid +1 -1
  44. data/server/routing/forward-votes.pid +1 -1
  45. data/server/routing/persist.pid +1 -1
  46. data/server/routing/persist.rb +1 -0
  47. metadata +7 -1
@@ -1,40 +1,46 @@
1
1
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
2
  <define name="transformation">
3
3
  <element name="transformation" ns="http://cpee.org/ns/properties/2.0">
4
- <element name="description">
5
- <attribute name="type">
6
- <choice>
7
- <value>copy</value>
8
- <value>rest</value>
9
- <value>xslt</value>
10
- <value>clean</value>
11
- <value>none</value>
12
- </choice>
13
- </attribute>
14
- <data type="anyURI"/>
15
- </element>
16
- <element name="dataelements">
17
- <attribute name="type">
18
- <choice>
19
- <value>rest</value>
20
- <value>xslt</value>
21
- <value>clean</value>
22
- <value>none</value>
23
- </choice>
24
- </attribute>
25
- <data type="anyURI"/>
26
- </element>
27
- <element name="endpoints">
28
- <attribute name="type">
29
- <choice>
30
- <value>rest</value>
31
- <value>xslt</value>
32
- <value>clean</value>
33
- <value>none</value>
34
- </choice>
35
- </attribute>
36
- <data type="anyURI"/>
37
- </element>
4
+ <optional>
5
+ <element name="description">
6
+ <attribute name="type">
7
+ <choice>
8
+ <value>copy</value>
9
+ <value>rest</value>
10
+ <value>xslt</value>
11
+ <value>clean</value>
12
+ <value>none</value>
13
+ </choice>
14
+ </attribute>
15
+ <data type="anyURI"/>
16
+ </element>
17
+ </optional>
18
+ <optional>
19
+ <element name="dataelements">
20
+ <attribute name="type">
21
+ <choice>
22
+ <value>rest</value>
23
+ <value>xslt</value>
24
+ <value>clean</value>
25
+ <value>none</value>
26
+ </choice>
27
+ </attribute>
28
+ <data type="anyURI"/>
29
+ </element>
30
+ </optional>
31
+ <optional>
32
+ <element name="endpoints">
33
+ <attribute name="type">
34
+ <choice>
35
+ <value>rest</value>
36
+ <value>xslt</value>
37
+ <value>clean</value>
38
+ <value>none</value>
39
+ </choice>
40
+ </attribute>
41
+ <data type="anyURI"/>
42
+ </element>
43
+ </optional>
38
44
  <optional>
39
45
  <!-- backtransformation: description from a directly set dslx. missing means copy -->
40
46
  <element name="dslx">
@@ -46,6 +52,9 @@
46
52
  <value>none</value>
47
53
  </choice>
48
54
  </attribute>
55
+ <optional>
56
+ <attribute name="extension"/>
57
+ </optional>
49
58
  <data type="anyURI"/>
50
59
  </element>
51
60
  </optional>
@@ -50,9 +50,13 @@ class Controller
50
50
 
51
51
  @callback_keys = {}
52
52
 
53
+ subscribed = WEEL::Continue.new
53
54
  @subs = Thread.new do
54
55
  @psredis = @opts[:redis_dyn].call "Instance #{@id} Callback Response"
55
56
  @psredis.psubscribe('callback-response:*','callback-end:*') do |on|
57
+ on.psubscribe do |pattern, count|
58
+ subscribed.continue if count == 2
59
+ end
56
60
  on.pmessage do |pat, what, message|
57
61
  if pat == 'callback-response:*'
58
62
  _, worker, identifier = what.split(':')
@@ -83,6 +87,7 @@ class Controller
83
87
  sleep 1
84
88
  retry
85
89
  end
90
+ subscribed.wait
86
91
  Thread.new do
87
92
  while true
88
93
  notify("status/resource_utilization", :mib => GetProcessMem.new.mb, **Process.times.to_h)
@@ -156,7 +161,10 @@ class Controller
156
161
  ### end all votes or it will not work
157
162
  Thread.new do # doing stuff in trap context is a nono. but in a thread its fine :-)
158
163
  @votes.each do |key|
159
- CPEE::Message::send(:'vote-response',key,base,@id,uuid,info,true,@redis)
164
+ # BEWARE111!!!1!! only send to worker 0, as voting goes through single worker
165
+ # (cause i am not smart enough to make it work with multiple workers. Also voting
166
+ # should not happen often, so the complexity is not worth it for now).
167
+ CPEE::Message::send(:'vote-response',key,base,@id,uuid,info,true,@redis,0)
160
168
  end
161
169
  end
162
170
  end
@@ -173,23 +181,22 @@ class Controller
173
181
  def vote(what,content={})
174
182
  topic, name = what.split('/')
175
183
  handler = File.join(topic,'vote',name)
176
- votes = []
184
+ pending = []
177
185
 
178
186
  @opts[:votes][handler]&.each do |client|
179
- voteid = SecureRandom.hex(16)
180
- content[:key] = voteid
181
- content[:attributes] = attributes
182
- content[:subscription] = client
183
- votes << voteid
184
- CPEE::Message::send(:vote,what,base,@id,uuid,info,content,@redis)
187
+ pending << content.merge(:key => SecureRandom.hex(16), :attributes => attributes, :subscription => client)
185
188
  end
189
+ votes = pending.map { |c| c[:key] }
186
190
 
187
191
  if votes.length > 0
188
192
  @votes += votes
189
193
  psredis = @opts[:redis_dyn].call "Instance #{@id} Vote"
190
194
  collect = []
191
195
  changes = []
192
- psredis.subscribe(votes.map{|e| ['vote-response:00:' + e.to_s] }.flatten) do |on|
196
+ psredis.subscribe(votes.map{|e| 'vote-response:00:' + e }) do |on|
197
+ on.subscribe do |channel, count|
198
+ pending.each { |c| CPEE::Message::send(:vote,what,base,@id,uuid,info,c,@redis) } if count == votes.length
199
+ end
193
200
  on.message do |what, message|
194
201
  index = message.index(' ')
195
202
  mess = message[index+1..-1]
@@ -17,6 +17,7 @@
17
17
  <event>instantiation</event>
18
18
  <event>take</event>
19
19
  <event>giveback</event>
20
+ <event>probe</event>
20
21
  </topic>
21
22
  <topic id="state">
22
23
  <event>change</event>
@@ -24,7 +25,11 @@
24
25
  <topic id="description">
25
26
  <event>change</event>
26
27
  </topic>
28
+ <topic id="status">
29
+ <event>exposition</event>
30
+ </topic>
27
31
  <topic id="gateway">
32
+ <event>split</event>
28
33
  <event>decide</event>
29
34
  <event>join</event>
30
35
  </topic>
@@ -1 +1 @@
1
- 3635871
1
+ 2228432
@@ -1 +1 @@
1
- 3635891
1
+ 2228450
@@ -1 +1 @@
1
- 3635884
1
+ 2228444
@@ -1 +1 @@
1
- 3635877
1
+ 2228438
@@ -140,6 +140,7 @@ Daemonite.new do |opts|
140
140
  multi.set("instance:#{instance}/transformation/endpoints/@type",mess.dig('content','endpoints_type'),keepttl: true)
141
141
  multi.set("instance:#{instance}/transformation/dslx",mess.dig('content','dslx'),keepttl: true)
142
142
  multi.set("instance:#{instance}/transformation/dslx/@type",mess.dig('content','dslx_type'),keepttl: true)
143
+ multi.set("instance:#{instance}/transformation/dslx/@extension",mess.dig('content','dslx_extension'),keepttl: true)
143
144
  if mess.dig('content','change_pending') # same dslx, but the description is no longer the one for it
144
145
  multi.del("instance:#{instance}/description/@change_uuid")
145
146
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.140
4
+ version: 2.1.143
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -250,6 +250,7 @@ files:
250
250
  - cockpit/compliance.html
251
251
  - cockpit/config.json
252
252
  - cockpit/config.json.example
253
+ - cockpit/conformance.html
253
254
  - cockpit/contrib/graph_example.svg
254
255
  - cockpit/contrib/legend.svg
255
256
  - cockpit/contrib/symbols.svg
@@ -284,6 +285,7 @@ files:
284
285
  - cockpit/js/llm.js
285
286
  - cockpit/js/model.js
286
287
  - cockpit/js/modifiers.js
288
+ - cockpit/js/mp-conformance.js
287
289
  - cockpit/js/parameters.js
288
290
  - cockpit/js/track.js
289
291
  - cockpit/js/ui.js
@@ -292,11 +294,15 @@ files:
292
294
  - cockpit/llmmodel.html
293
295
  - cockpit/model.html
294
296
  - cockpit/only_llm.html
297
+ - cockpit/rngs/aggregations.rng
295
298
  - cockpit/rngs/attributes.rng
296
299
  - cockpit/rngs/dataelements.rng
297
300
  - cockpit/rngs/documents.rng
298
301
  - cockpit/rngs/endpoints.rng
302
+ - cockpit/rngs/intervals.rng
303
+ - cockpit/rngs/nlrequirements.rng
299
304
  - cockpit/rngs/requirements.rng
305
+ - cockpit/rngs/rules.rng
300
306
  - cockpit/templates.legacy/Async.xml
301
307
  - cockpit/templates.legacy/BCO.xml
302
308
  - cockpit/templates.legacy/BCS.xml