scout-gear 8.1.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.vimproject +22 -0
  3. data/VERSION +1 -1
  4. data/bin/scout +1 -0
  5. data/lib/rbbt-scout.rb +2 -1
  6. data/lib/scout/cmd.rb +9 -5
  7. data/lib/scout/indiferent_hash.rb +17 -0
  8. data/lib/scout/log/progress/report.rb +1 -0
  9. data/lib/scout/log.rb +14 -11
  10. data/lib/scout/misc/filesystem.rb +2 -3
  11. data/lib/scout/offsite/ssh.rb +3 -0
  12. data/lib/scout/offsite/step.rb +20 -3
  13. data/lib/scout/open/stream.rb +0 -1
  14. data/lib/scout/open.rb +8 -8
  15. data/lib/scout/path.rb +1 -1
  16. data/lib/scout/persist/serialize.rb +1 -1
  17. data/lib/scout/resource/open.rb +8 -0
  18. data/lib/scout/resource/path.rb +12 -9
  19. data/lib/scout/resource/software.rb +4 -2
  20. data/lib/scout/resource.rb +2 -0
  21. data/lib/scout/tsv/dumper.rb +3 -1
  22. data/lib/scout/tsv/parser.rb +13 -3
  23. data/lib/scout/work_queue.rb +1 -0
  24. data/lib/scout/workflow/deployment/orchestrator.rb +17 -8
  25. data/lib/scout/workflow/step/dependencies.rb +9 -3
  26. data/lib/scout/workflow/step/info.rb +8 -0
  27. data/lib/scout/workflow/step/inputs.rb +5 -0
  28. data/lib/scout/workflow/step/status.rb +22 -2
  29. data/lib/scout/workflow/step.rb +11 -4
  30. data/lib/scout/workflow/task/dependencies.rb +2 -0
  31. data/lib/scout/workflow/task/inputs.rb +14 -9
  32. data/lib/scout/workflow/task.rb +4 -2
  33. data/lib/scout/workflow/usage.rb +21 -33
  34. data/lib/scout/workflow.rb +17 -13
  35. data/scout-gear.gemspec +9 -3
  36. data/scout_commands/resource/produce +66 -0
  37. data/scout_commands/template +52 -0
  38. data/scout_commands/workflow/install +3 -0
  39. data/scout_commands/workflow/task +24 -5
  40. data/share/software/install_helpers +2 -2
  41. data/share/templates/command +25 -0
  42. data/share/templates/workflow.rb +14 -0
  43. data/test/scout/offsite/test_step.rb +0 -1
  44. data/test/scout/test_persist.rb +2 -2
  45. data/test/scout/test_work_queue.rb +1 -1
  46. data/test/scout/tsv/test_parser.rb +21 -0
  47. data/test/scout/workflow/step/test_info.rb +0 -1
  48. data/test/scout/workflow/task/test_dependencies.rb +2 -0
  49. data/test/scout/workflow/task/test_inputs.rb +0 -1
  50. data/test/scout/workflow/test_definition.rb +1 -1
  51. metadata +8 -2
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'scout'
4
+
5
+ $0 = "scout #{$previous_commands.any? ? $previous_commands*" " + " " : "" }#{ File.basename(__FILE__) }" if $previous_commands
6
+
7
+ options = SOPT.setup <<EOF
8
+
9
+ Description of the tool
10
+
11
+ $ #{$0} [<options>] <filename> [<other|->]*
12
+
13
+ -h--help Print this help
14
+ EOF
15
+ if options[:help]
16
+ if defined? scout_usage
17
+ scout_usage
18
+ else
19
+ puts SOPT.doc
20
+ end
21
+ exit 0
22
+ end
23
+
24
+
25
+
@@ -0,0 +1,14 @@
1
+ Misc.add_libdir if __FILE__ == $0
2
+
3
+ #require 'scout/sources/MODULE'
4
+
5
+ module MODULE
6
+ extend Workflow
7
+
8
+
9
+ end
10
+
11
+ #require 'MODULE/tasks/basic.rb'
12
+
13
+ #require 'scout/knowledge_base/MODULE'
14
+ #require 'scout/entity/MODULE'
@@ -19,7 +19,6 @@ TestWF.directory = Path.setup("#{tmpdir.offsite.TestWF}")
19
19
 
20
20
  job = wf.job(:string)
21
21
 
22
- sss 0
23
22
  off = OffsiteStep.setup job, server: 'localhost', workflow_name: wffile
24
23
 
25
24
  refute off.done?
@@ -138,8 +138,8 @@ class TestPersist < Test::Unit::TestCase
138
138
  Open.write(output2, io)
139
139
  end
140
140
  end
141
- Process.wait pid1
142
- Process.wait pid2
141
+ Process.waitpid pid1
142
+ Process.waitpid pid2
143
143
 
144
144
  assert File.exist?(output1) || File.exist?(output2)
145
145
  [pid1, pid2].zip([output2, output1]).each do |pid, found|
@@ -56,7 +56,7 @@ class TestWorkQueue < Test::Unit::TestCase
56
56
  end
57
57
  end
58
58
 
59
- Process.wait pid
59
+ Process.waitpid pid
60
60
  q.close
61
61
 
62
62
  q.join
@@ -95,6 +95,27 @@ k a|A b|B
95
95
  assert_equal 'a', tsv['k'][0][0]
96
96
  end
97
97
 
98
+ def test_parse_head
99
+ content =<<-EOF
100
+ #: :sep=" "#:type=:double
101
+ #Key ValueA ValueB
102
+ k a|A b|B
103
+ k1 a|A b|B
104
+ k2 a|A b|B
105
+ k3 a|A b|B
106
+ k4 a|A b|B
107
+ EOF
108
+ content = StringIO.new content
109
+
110
+ tsv = TSV.parse(content, :head => 2)
111
+ assert_equal 2, tsv.keys.length
112
+
113
+ content.rewind
114
+ tsv = TSV.parse(content, :head => 3)
115
+ assert_equal 3, tsv.keys.length
116
+ end
117
+
118
+
98
119
  def test_parse_fields
99
120
  content =<<-EOF
100
121
  #: :sep=" "#:type=:double
@@ -41,6 +41,5 @@ class TestStepInfo < Test::Unit::TestCase
41
41
  refute Path === step1.info[:inputs][0]
42
42
 
43
43
  end
44
-
45
44
  end
46
45
  end
@@ -20,6 +20,8 @@ class TestTaskDependencies < Test::Unit::TestCase
20
20
 
21
21
  assert_equal 18, wf.job(:step2, :input1 => 2, "TaskInputs#step1" => step1_job).exec
22
22
 
23
+ assert_equal [step1_job.path], wf.job(:step2, :input1 => 2, "TaskInputs#step1" => step1_job).overriden_deps.collect{|d| d.path }
24
+
23
25
  assert_equal 18, wf.job(:step2, "TaskInputs#step1" => step1_job).exec
24
26
  end
25
27
 
@@ -111,7 +111,6 @@ class TestTaskInput < Test::Unit::TestCase
111
111
  def test_save_and_load
112
112
  task = self.example_task
113
113
 
114
- sss 0
115
114
  TmpFile.with_file("2\n3") do |integer_array_file|
116
115
  inputs = {:string => "String", :integer => 2, :integer_array => integer_array_file, :float_array => %w(1.1 2.2)}
117
116
  original_digest = task.process_inputs(inputs).last
@@ -1,7 +1,7 @@
1
1
  require File.expand_path(__FILE__).sub(%r(/test/.*), '/test/test_helper.rb')
2
2
  require File.expand_path(__FILE__).sub(%r(.*/test/), '').sub(/test_(.*)\.rb/,'\1')
3
3
 
4
- class TestClass < Test::Unit::TestCase
4
+ class TestWorkflowDefinition < Test::Unit::TestCase
5
5
  def test_function_task
6
6
  wf = Workflow.annonymous_workflow do
7
7
  self.name = "StringLength"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout-gear
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.0
4
+ version: 9.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-15 00:00:00.000000000 Z
11
+ date: 2023-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor
@@ -203,6 +203,7 @@ files:
203
203
  - lib/scout/persist/path.rb
204
204
  - lib/scout/persist/serialize.rb
205
205
  - lib/scout/resource.rb
206
+ - lib/scout/resource/open.rb
206
207
  - lib/scout/resource/path.rb
207
208
  - lib/scout/resource/produce.rb
208
209
  - lib/scout/resource/produce/rake.rb
@@ -252,6 +253,7 @@ files:
252
253
  - lib/scout/workflow/step/dependencies.rb
253
254
  - lib/scout/workflow/step/file.rb
254
255
  - lib/scout/workflow/step/info.rb
256
+ - lib/scout/workflow/step/inputs.rb
255
257
  - lib/scout/workflow/step/load.rb
256
258
  - lib/scout/workflow/step/progress.rb
257
259
  - lib/scout/workflow/step/provenance.rb
@@ -269,6 +271,8 @@ files:
269
271
  - scout_commands/glob
270
272
  - scout_commands/offsite
271
273
  - scout_commands/rbbt
274
+ - scout_commands/resource/produce
275
+ - scout_commands/template
272
276
  - scout_commands/update
273
277
  - scout_commands/workflow/info
274
278
  - scout_commands/workflow/install
@@ -277,6 +281,8 @@ files:
277
281
  - share/color/color_names
278
282
  - share/color/diverging_colors.hex
279
283
  - share/software/install_helpers
284
+ - share/templates/command
285
+ - share/templates/workflow.rb
280
286
  - test/scout/indiferent_hash/test_case_insensitive.rb
281
287
  - test/scout/indiferent_hash/test_options.rb
282
288
  - test/scout/log/test_color.rb