t2-server 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.rdoc +4 -0
- data/README.rdoc +1 -1
- data/lib/t2-server.rb +1 -1
- data/lib/t2-server/run.rb +16 -12
- data/test/tc_run.rb +3 -2
- data/test/workflows/empty_list.t2flow +22 -11
- data/test/workflows/empty_list_input.baclava +86 -77
- metadata +4 -4
data/CHANGES.rdoc
CHANGED
data/README.rdoc
CHANGED
data/lib/t2-server.rb
CHANGED
@@ -43,7 +43,7 @@ require 't2-server/run'
|
|
43
43
|
# Taverna 2 Server instance.
|
44
44
|
module T2Server
|
45
45
|
# The version of this library
|
46
|
-
GEM_VERSION = "0.5.
|
46
|
+
GEM_VERSION = "0.5.3"
|
47
47
|
# The version of the Taverna 2 Server API that this library can interface with
|
48
48
|
API_VERSION = "2.2a1"
|
49
49
|
end
|
data/lib/t2-server/run.rb
CHANGED
@@ -452,22 +452,26 @@ module T2Server
|
|
452
452
|
private
|
453
453
|
def _get_output(output, refs=false, top=true)
|
454
454
|
output.strip_path!
|
455
|
-
result = []
|
456
|
-
|
457
|
-
# look at the contents of the output port
|
458
|
-
lists, items = ls("out/#{output}")
|
459
455
|
|
460
|
-
# if
|
461
|
-
#
|
462
|
-
if top
|
463
|
-
|
464
|
-
if
|
465
|
-
|
466
|
-
|
467
|
-
|
456
|
+
# if at the top level we need to check if the port represents a list
|
457
|
+
# or a singleton value
|
458
|
+
if top
|
459
|
+
lists, items = ls("out")
|
460
|
+
if items.include? output
|
461
|
+
if refs
|
462
|
+
return "#{@server.uri}/rest/runs/#{@uuid}/#{@links[:wdir]}/out/#{output}"
|
463
|
+
else
|
464
|
+
return @server.get_run_attribute(@uuid, "#{@links[:wdir]}/out/#{output}")
|
465
|
+
end
|
468
466
|
end
|
469
467
|
end
|
470
468
|
|
469
|
+
# we're not at the top level so look at the contents of the output port
|
470
|
+
lists, items = ls("out/#{output}")
|
471
|
+
|
472
|
+
# build up lists of results
|
473
|
+
result = []
|
474
|
+
|
471
475
|
# for each list recurse into it and add the items to the result
|
472
476
|
lists.each {|list| result << _get_output("#{output}/#{list}", refs, false)}
|
473
477
|
|
data/test/tc_run.rb
CHANGED
@@ -90,8 +90,9 @@ class TestRun < Test::Unit::TestCase
|
|
90
90
|
assert_nothing_raised(T2Server::RunStateError) do
|
91
91
|
@run.wait
|
92
92
|
end
|
93
|
-
assert_equal(@run.get_output("
|
94
|
-
|
93
|
+
assert_equal(@run.get_output("SINGLE"), [])
|
94
|
+
assert_equal(@run.get_output("MANY"), [[], [["Hello", ""]], [[], ["test"],
|
95
|
+
[]], [["boo"]]])
|
95
96
|
|
96
97
|
# run with baclava output
|
97
98
|
@run = T2Server::Run.create($address, $wkf_hello)
|
@@ -1,12 +1,23 @@
|
|
1
|
-
<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.2.0"><dataflow id="
|
2
|
-
<annotationAssertions>
|
3
|
-
<net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
|
4
|
-
<annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
|
5
|
-
<identification>536f469a-fd80-4efa-8d76-6cb2514123ec</identification>
|
6
|
-
</annotationBean>
|
7
|
-
<date>2010-11-04 18:00:12.867 GMT</date>
|
8
|
-
<creators />
|
9
|
-
<curationEventList />
|
10
|
-
</net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
|
11
|
-
</annotationAssertions>
|
1
|
+
<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.2.0"><dataflow id="373bb615-7dd3-46b4-9e3c-ee38e7460403" role="top"><name>Workflow1</name><inputPorts><port><name>MANY_IN</name><depth>3</depth><granularDepth>3</granularDepth><annotations /></port><port><name>SINGLE_IN</name><depth>1</depth><granularDepth>1</granularDepth><annotations /></port></inputPorts><outputPorts><port><name>MANY</name><annotations /></port><port><name>SINGLE</name><annotations /></port></outputPorts><processors /><conditions /><datalinks><datalink><sink type="dataflow"><port>MANY</port></sink><source type="dataflow"><port>MANY_IN</port></source></datalink><datalink><sink type="dataflow"><port>SINGLE</port></sink><source type="dataflow"><port>SINGLE_IN</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
|
2
|
+
<annotationAssertions>
|
3
|
+
<net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
|
4
|
+
<annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
|
5
|
+
<identification>536f469a-fd80-4efa-8d76-6cb2514123ec</identification>
|
6
|
+
</annotationBean>
|
7
|
+
<date>2010-11-04 18:00:12.867 GMT</date>
|
8
|
+
<creators />
|
9
|
+
<curationEventList />
|
10
|
+
</net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
|
11
|
+
</annotationAssertions>
|
12
|
+
</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
|
13
|
+
<annotationAssertions>
|
14
|
+
<net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
|
15
|
+
<annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
|
16
|
+
<identification>373bb615-7dd3-46b4-9e3c-ee38e7460403</identification>
|
17
|
+
</annotationBean>
|
18
|
+
<date>2010-11-09 13:50:13.127 GMT</date>
|
19
|
+
<creators />
|
20
|
+
<curationEventList />
|
21
|
+
</net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
|
22
|
+
</annotationAssertions>
|
12
23
|
</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
|
@@ -1,77 +1,86 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<b:dataThingMap xmlns:b="http://org.embl.ebi.escience/baclava/0.1alpha">
|
3
|
-
<b:dataThing key="
|
4
|
-
<b:myGridDataDocument lsid="" syntactictype="l(l('null'))">
|
5
|
-
<s:metadata xmlns:s="http://org.embl.ebi.escience/xscufl/0.1alpha" />
|
6
|
-
<b:partialOrder lsid="" type="list">
|
7
|
-
<b:relationList>
|
8
|
-
<b:relation parent="0" child="1" />
|
9
|
-
<b:relation parent="1" child="2" />
|
10
|
-
<b:relation parent="2" child="3" />
|
11
|
-
</b:relationList>
|
12
|
-
<b:itemList>
|
13
|
-
<b:partialOrder lsid="" type="list" index="0">
|
14
|
-
<b:relationList
|
15
|
-
|
16
|
-
<b:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
<b:itemList
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
<b:partialOrder lsid="" type="list" index="
|
59
|
-
<b:relationList />
|
60
|
-
<b:itemList>
|
61
|
-
<b:dataElement lsid="" index="0">
|
62
|
-
<b:dataElementData>
|
63
|
-
</b:dataElement>
|
64
|
-
</b:itemList>
|
65
|
-
</b:partialOrder>
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
</b:partialOrder>
|
72
|
-
</b:itemList>
|
73
|
-
</b:partialOrder>
|
74
|
-
</b:myGridDataDocument>
|
75
|
-
</b:dataThing>
|
76
|
-
|
77
|
-
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<b:dataThingMap xmlns:b="http://org.embl.ebi.escience/baclava/0.1alpha">
|
3
|
+
<b:dataThing key="MANY_IN">
|
4
|
+
<b:myGridDataDocument lsid="" syntactictype="l(l(l('null')))">
|
5
|
+
<s:metadata xmlns:s="http://org.embl.ebi.escience/xscufl/0.1alpha" />
|
6
|
+
<b:partialOrder lsid="" type="list">
|
7
|
+
<b:relationList>
|
8
|
+
<b:relation parent="0" child="1" />
|
9
|
+
<b:relation parent="1" child="2" />
|
10
|
+
<b:relation parent="2" child="3" />
|
11
|
+
</b:relationList>
|
12
|
+
<b:itemList>
|
13
|
+
<b:partialOrder lsid="" type="list" index="0">
|
14
|
+
<b:relationList />
|
15
|
+
<b:itemList>
|
16
|
+
<b:partialOrder lsid="" type="list" index="0">
|
17
|
+
<b:relationList />
|
18
|
+
<b:itemList>
|
19
|
+
<b:dataElement lsid="" index="0">
|
20
|
+
<b:dataElementData>Ym9v</b:dataElementData>
|
21
|
+
</b:dataElement>
|
22
|
+
</b:itemList>
|
23
|
+
</b:partialOrder>
|
24
|
+
</b:itemList>
|
25
|
+
</b:partialOrder>
|
26
|
+
<b:partialOrder lsid="" type="list" index="1">
|
27
|
+
<b:relationList />
|
28
|
+
<b:itemList>
|
29
|
+
<b:partialOrder lsid="" type="list" index="0">
|
30
|
+
<b:relationList>
|
31
|
+
<b:relation parent="0" child="1" />
|
32
|
+
</b:relationList>
|
33
|
+
<b:itemList>
|
34
|
+
<b:dataElement lsid="" index="0">
|
35
|
+
<b:dataElementData />
|
36
|
+
</b:dataElement>
|
37
|
+
<b:dataElement lsid="" index="1">
|
38
|
+
<b:dataElementData>SGVsbG8=</b:dataElementData>
|
39
|
+
</b:dataElement>
|
40
|
+
</b:itemList>
|
41
|
+
</b:partialOrder>
|
42
|
+
</b:itemList>
|
43
|
+
</b:partialOrder>
|
44
|
+
<b:partialOrder lsid="" type="list" index="2">
|
45
|
+
<b:relationList />
|
46
|
+
<b:itemList />
|
47
|
+
</b:partialOrder>
|
48
|
+
<b:partialOrder lsid="" type="list" index="3">
|
49
|
+
<b:relationList>
|
50
|
+
<b:relation parent="0" child="1" />
|
51
|
+
<b:relation parent="1" child="2" />
|
52
|
+
</b:relationList>
|
53
|
+
<b:itemList>
|
54
|
+
<b:partialOrder lsid="" type="list" index="0">
|
55
|
+
<b:relationList />
|
56
|
+
<b:itemList />
|
57
|
+
</b:partialOrder>
|
58
|
+
<b:partialOrder lsid="" type="list" index="1">
|
59
|
+
<b:relationList />
|
60
|
+
<b:itemList>
|
61
|
+
<b:dataElement lsid="" index="0">
|
62
|
+
<b:dataElementData>dGVzdA==</b:dataElementData>
|
63
|
+
</b:dataElement>
|
64
|
+
</b:itemList>
|
65
|
+
</b:partialOrder>
|
66
|
+
<b:partialOrder lsid="" type="list" index="2">
|
67
|
+
<b:relationList />
|
68
|
+
<b:itemList />
|
69
|
+
</b:partialOrder>
|
70
|
+
</b:itemList>
|
71
|
+
</b:partialOrder>
|
72
|
+
</b:itemList>
|
73
|
+
</b:partialOrder>
|
74
|
+
</b:myGridDataDocument>
|
75
|
+
</b:dataThing>
|
76
|
+
<b:dataThing key="SINGLE_IN">
|
77
|
+
<b:myGridDataDocument lsid="" syntactictype="l('null')">
|
78
|
+
<s:metadata xmlns:s="http://org.embl.ebi.escience/xscufl/0.1alpha" />
|
79
|
+
<b:partialOrder lsid="" type="list">
|
80
|
+
<b:relationList />
|
81
|
+
<b:itemList />
|
82
|
+
</b:partialOrder>
|
83
|
+
</b:myGridDataDocument>
|
84
|
+
</b:dataThing>
|
85
|
+
</b:dataThingMap>
|
86
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: t2-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 3
|
10
|
+
version: 0.5.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Robert Haines
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-09 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|