taverna-t2flow 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,9 @@
1
1
  = Changes log for the T2Flow Ruby Gem
2
2
 
3
+ == Version 0.5.1
4
+
5
+ * Added some missing processor colours.
6
+
3
7
  == Version 0.5.0
4
8
 
5
9
  * Split out model classes into different files.
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ require 'jeweler'
17
17
 
18
18
  task :default => [:test]
19
19
 
20
- T2FLOW_GEM_VERSION = "0.5.0"
20
+ T2FLOW_GEM_VERSION = "0.5.1"
21
21
 
22
22
  Jeweler::Tasks.new do |s|
23
23
  s.name = "taverna-t2flow"
@@ -20,43 +20,44 @@ module T2Flow
20
20
  # `dot -Tpng -o"path/to/the/output/image" #{out_file.path}`
21
21
  class Dot
22
22
 
23
- @@processor_colours = {
24
- 'apiconsumer' => '#98fb98',
25
- 'beanshell' => '#deb887',
26
- 'biomart' => '#d1eeee',
27
- 'localworker' => '#d15fee',
28
- 'biomobywsdl' => '#ffb90f',
29
- 'biomoby' => '#ffb90f',
30
- 'biomobyobject' => '#ffd700',
31
- 'biomobyparser' => '#ffffff',
32
- 'inferno' => 'violetred1',
33
- 'notification' => 'mediumorchid2',
34
- 'rdfgenerator' => 'purple',
35
- 'rserv' => 'lightgoldenrodyellow',
36
- 'seqhound' => '#836fff',
37
- 'soaplabwsdl' => '#fafad2',
38
- 'soaplab' => '#fafad2',
39
- 'stringconstant' => '#b0c4de',
40
- 'talisman' => 'plum2',
41
- 'bsf' => 'burlywood2',
42
- 'abstractprocessor' => 'lightgoldenrodyellow',
43
- 'xmlsplitter' => '#ab92ea',
44
- 'rshell' => '#648faa',
45
- 'arbitrarywsdl' => 'darkolivegreen3',
46
- 'wsdl' => '#a2cd5a',
47
- 'workflow' => 'crimson',
48
- 'rest' => '#7aafff',
49
- 'xpath' => '#e6ff5e',
50
- 'externaltool' => '#f28c55',
51
- 'spreadsheet' => '#40e0d0',
52
- 'dataflow' => '#ffc0cb',
53
- 'rshell' => '#648faa',
23
+ PROCESSOR_COLOURS = {
24
+ :apiconsumer => "#98fb98", #palegreen
25
+ :beanshell => "#deb887", #burlywood2
26
+ :biomart => "#d1eeee", #lightcyan2
27
+ :localworker => "#d15fee", #mediumorchid2
28
+ :biomobywsdl => "#ffb90f", #darkgoldenrod1
29
+ :biomoby => "#ffb90f", #darkgoldenrod1
30
+ :biomobyobject => "#ffd700", #gold
31
+ :biomobyparser => "#ffffff", #white
32
+ :inferno => "violetred1",
33
+ :notification => "mediumorchid2",
34
+ :rdfgenerator => "purple",
35
+ :rserv => "lightgoldenrodyellow",
36
+ :seqhound => "#836fff",
37
+ :soaplabwsdl => "#fafad2",
38
+ :soaplab => "#fafad2",
39
+ :stringconstant => "#b0c4de",
40
+ :talisman => "plum2",
41
+ :bsf => "burlywood2",
42
+ :abstractprocessor => "lightgoldenrodyellow",
43
+ :xmlsplitter => "#ab92ea",
44
+ :rshell => "#648faa",
45
+ :arbitrarywsdl => "darkolivegreen3",
46
+ :wsdl => "#a2cd5a",
47
+ :workflow => "crimson",
48
+ :rest => "#7aafff",
49
+ :xpath => "#e6ff5e",
50
+ :externaltool => "#f28c55",
51
+ :spreadsheet => "#40e0d0",
52
+ :dataflow => "#ffc0cb",
53
+ :interaction => "#6aeb9f",
54
+ :component => "#e693d2"
54
55
  }
56
+
57
+ FILL_COLOURS = %w{white aliceblue antiquewhite beige}
55
58
 
56
- @@fill_colours = %w{white aliceblue antiquewhite beige}
57
-
58
- @@ranksep = '0.22'
59
- @@nodesep = '0.05'
59
+ RANK_SEP = '0.22'
60
+ NODE_SEP = '0.05'
60
61
 
61
62
  # Creates a new dot object for interaction.
62
63
  def initialize
@@ -78,8 +79,8 @@ module T2Flow
78
79
  stream.puts ' style=""'
79
80
  stream.puts ' labeljust="left"'
80
81
  stream.puts ' clusterrank="local"'
81
- stream.puts " ranksep=\"#@@ranksep\""
82
- stream.puts " nodesep=\"#@@nodesep\""
82
+ stream.puts " ranksep=\"#RANK_SEP\""
83
+ stream.puts " nodesep=\"#NODE_SEP\""
83
84
  stream.puts ' ]'
84
85
  stream.puts
85
86
  stream.puts ' node ['
@@ -114,7 +115,7 @@ module T2Flow
114
115
  stream.puts ' fontsize="10"'
115
116
  stream.puts ' fontcolor="black"'
116
117
  stream.puts ' clusterrank="local"'
117
- stream.puts " fillcolor=\"#{@@fill_colours[depth % @@fill_colours.length]}\""
118
+ stream.puts " fillcolor=\"#{FILL_COLOURS[depth % FILL_COLOURS.length]}\""
118
119
  stream.puts ' style="filled"'
119
120
  end
120
121
  dataflow.processors.each {|processor| write_processor(stream, processor, prefix, depth)}
@@ -208,7 +209,6 @@ module T2Flow
208
209
  else
209
210
  processor = dataflow.processors.select{|p| p.name == link.source.split(':')[0]}[0]
210
211
  if "#{processor.type}" == "workflow"
211
- df = @t2flow_model.dataflow(processor.dataflow_id)
212
212
  stream.write " \"#{prefix}#{processor.name}WORKFLOWINTERNALSINK_#{link.source.split(':')[1]}\""
213
213
  else
214
214
  stream.write " \"#{prefix}#{processor.name}\""
@@ -220,7 +220,6 @@ module T2Flow
220
220
  else
221
221
  processor = dataflow.processors.select{|p| p.name == link.sink.split(':')[0]}[0]
222
222
  if "#{processor.type}" == "workflow"
223
- df = @t2flow_model.dataflow(processor.dataflow_id)
224
223
  stream.write "\"#{prefix}#{processor.name}WORKFLOWINTERNALSOURCE_#{link.sink.split(':')[1]}\""
225
224
  else
226
225
  stream.write "\"#{prefix}#{processor.name}\""
@@ -248,7 +247,7 @@ module T2Flow
248
247
  end
249
248
 
250
249
  def get_colour(processor_name) # :nodoc:
251
- colour = @@processor_colours[processor_name]
250
+ colour = PROCESSOR_COLOURS[processor_name.to_sym]
252
251
  if colour
253
252
  colour
254
253
  else
@@ -258,7 +257,7 @@ module T2Flow
258
257
 
259
258
  # Returns true if the given name is a processor; false otherwise
260
259
  def Dot.is_processor?(processor_name)
261
- true if @@processor_colours[processor_name]
260
+ true if get_colour(processor_name)
262
261
  end
263
262
 
264
263
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "taverna-t2flow"
8
- s.version = "0.5.0"
8
+ s.version = "0.5.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Finn Bacall", "Robert Haines", "David Withers", "Mannie Tagarira"]
12
- s.date = "2014-03-11"
12
+ s.date = "2014-03-14"
13
13
  s.description = "This a gem developed by myGrid for the purpose of interacting with Taverna 2 workflows. An example use would be the image genaration for the model representing Taverna 2 workflows as used in myExperiment."
14
14
  s.email = ["support@mygrid.org.uk"]
15
15
  s.extra_rdoc_files = [
@@ -58,7 +58,7 @@ Gem::Specification.new do |s|
58
58
  s.homepage = "http://www.taverna.org.uk/"
59
59
  s.rdoc_options = ["-N", "--tab-width=2", "--main=README.rdoc"]
60
60
  s.require_paths = ["lib"]
61
- s.rubygems_version = "1.8.24"
61
+ s.rubygems_version = "1.8.29"
62
62
  s.summary = "Support for interacting with Taverna 2 workflows."
63
63
  s.test_files = ["test/run_tests.rb"]
64
64
 
@@ -1,24 +1,24 @@
1
- <workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.4.0"><dataflow id="fa8eeaf3-5816-4e19-afb4-468c318c9832" role="top"><name>Workflow1</name><inputPorts><port><name>in</name><depth>0</depth><granularDepth>0</granularDepth><annotations /></port></inputPorts><outputPorts><port><name>out</name><annotations /></port></outputPorts><processors><processor><name>Extract_PNG_dimensions</name><inputPorts><port><name>fromFilename</name><depth>0</depth></port></inputPorts><outputPorts><port><name>dimensions</name><depth>0</depth><granularDepth>0</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>net.sf.taverna.t2.component</group><artifact>component-activity</artifact><version>1.1.2</version></raven><class>net.sf.taverna.t2.component.ComponentActivity</class><inputMap><map from="fromFilename" to="fromFilename" /></inputMap><outputMap><map from="dimensions" to="dimensions" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.component.ComponentActivityConfigurationBean xmlns="">
2
- <registryBase>http://www.myexperiment.org</registryBase>
3
- <familyName>SCAPE Image Characterisation Component</familyName>
4
- <componentName>Extract PNG dimensions</componentName>
5
- <componentVersion>2</componentVersion>
6
- </net.sf.taverna.t2.component.ComponentActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
7
- <maxJobs>1</maxJobs>
8
- </net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="">
9
- <backoffFactor>1.0</backoffFactor>
10
- <initialDelay>1000</initialDelay>
11
- <maxDelay>5000</maxDelay>
12
- <maxRetries>0</maxRetries>
13
- </net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="fromFilename" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor></processors><conditions /><datalinks><datalink><sink type="processor"><processor>Extract_PNG_dimensions</processor><port>fromFilename</port></sink><source type="dataflow"><port>in</port></source></datalink><datalink><sink type="dataflow"><port>out</port></sink><source type="processor"><processor>Extract_PNG_dimensions</processor><port>dimensions</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
14
- <annotationAssertions>
15
- <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
16
- <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
17
- <identification>fa8eeaf3-5816-4e19-afb4-468c318c9832</identification>
18
- </annotationBean>
19
- <date>2014-03-11 09:20:07.794 UTC</date>
20
- <creators />
21
- <curationEventList />
22
- </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
23
- </annotationAssertions>
1
+ <workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.4.0"><dataflow id="fa8eeaf3-5816-4e19-afb4-468c318c9832" role="top"><name>Workflow1</name><inputPorts><port><name>in</name><depth>0</depth><granularDepth>0</granularDepth><annotations /></port></inputPorts><outputPorts><port><name>out</name><annotations /></port></outputPorts><processors><processor><name>Extract_PNG_dimensions</name><inputPorts><port><name>fromFilename</name><depth>0</depth></port></inputPorts><outputPorts><port><name>dimensions</name><depth>0</depth><granularDepth>0</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>net.sf.taverna.t2.component</group><artifact>component-activity</artifact><version>1.1.2</version></raven><class>net.sf.taverna.t2.component.ComponentActivity</class><inputMap><map from="fromFilename" to="fromFilename" /></inputMap><outputMap><map from="dimensions" to="dimensions" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.component.ComponentActivityConfigurationBean xmlns="">
2
+ <registryBase>http://www.myexperiment.org</registryBase>
3
+ <familyName>SCAPE Image Characterisation Component</familyName>
4
+ <componentName>Extract PNG dimensions</componentName>
5
+ <componentVersion>2</componentVersion>
6
+ </net.sf.taverna.t2.component.ComponentActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
7
+ <maxJobs>1</maxJobs>
8
+ </net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="">
9
+ <backoffFactor>1.0</backoffFactor>
10
+ <initialDelay>1000</initialDelay>
11
+ <maxDelay>5000</maxDelay>
12
+ <maxRetries>0</maxRetries>
13
+ </net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.4</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="fromFilename" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor></processors><conditions /><datalinks><datalink><sink type="processor"><processor>Extract_PNG_dimensions</processor><port>fromFilename</port></sink><source type="dataflow"><port>in</port></source></datalink><datalink><sink type="dataflow"><port>out</port></sink><source type="processor"><processor>Extract_PNG_dimensions</processor><port>dimensions</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
14
+ <annotationAssertions>
15
+ <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
16
+ <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
17
+ <identification>fa8eeaf3-5816-4e19-afb4-468c318c9832</identification>
18
+ </annotationBean>
19
+ <date>2014-03-11 09:20:07.794 UTC</date>
20
+ <creators />
21
+ <curationEventList />
22
+ </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
23
+ </annotationAssertions>
24
24
  </net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taverna-t2flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-03-11 00:00:00.000000000 Z
15
+ date: 2014-03-14 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rake
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  version: '0'
150
150
  requirements: []
151
151
  rubyforge_project:
152
- rubygems_version: 1.8.24
152
+ rubygems_version: 1.8.29
153
153
  signing_key:
154
154
  specification_version: 3
155
155
  summary: Support for interacting with Taverna 2 workflows.