scout-gear 9.0.0 → 10.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.vimproject +3 -3
- data/Rakefile +1 -2
- data/VERSION +1 -1
- data/bin/scout +0 -1
- data/lib/rbbt-scout.rb +2 -1
- data/lib/scout/offsite/exceptions.rb +9 -0
- data/lib/scout/offsite/ssh.rb +1 -0
- data/lib/scout/semaphore.rb +2 -0
- data/lib/scout/tsv/dumper.rb +1 -0
- data/lib/scout/tsv/open.rb +8 -2
- data/lib/scout/tsv/parser.rb +1 -1
- data/lib/scout/tsv/persist/adapter.rb +2 -2
- data/lib/scout/tsv/persist.rb +1 -0
- data/lib/scout/tsv/util.rb +1 -1
- data/lib/scout/tsv.rb +1 -1
- data/lib/scout/work_queue/exceptions.rb +18 -0
- data/lib/scout/work_queue.rb +1 -0
- data/lib/scout/workflow/definition.rb +1 -1
- data/lib/scout/workflow/step/config.rb +1 -1
- data/lib/scout/workflow/step/dependencies.rb +3 -2
- data/lib/scout/workflow/step/file.rb +5 -1
- data/lib/scout/workflow/step/info.rb +8 -2
- data/lib/scout/workflow/step/provenance.rb +28 -10
- data/lib/scout/workflow/step/status.rb +4 -0
- data/lib/scout/workflow/step.rb +18 -6
- data/lib/scout/workflow/task/dependencies.rb +1 -0
- data/lib/scout/workflow/task/inputs.rb +6 -1
- data/lib/scout/workflow/task.rb +22 -3
- data/lib/scout/workflow/usage.rb +1 -0
- data/lib/scout/workflow.rb +13 -4
- data/lib/scout-gear.rb +1 -10
- data/scout-gear.gemspec +8 -98
- data/scout_commands/workflow/task +2 -3
- data/test/scout/workflow/step/test_provenance.rb +24 -1
- data/test/scout/workflow/task/test_inputs.rb +0 -4
- metadata +7 -110
- data/lib/scout/cmd.rb +0 -347
- data/lib/scout/concurrent_stream.rb +0 -284
- data/lib/scout/config.rb +0 -168
- data/lib/scout/exceptions.rb +0 -151
- data/lib/scout/indiferent_hash/case_insensitive.rb +0 -30
- data/lib/scout/indiferent_hash/options.rb +0 -115
- data/lib/scout/indiferent_hash.rb +0 -96
- data/lib/scout/log/color.rb +0 -224
- data/lib/scout/log/color_class.rb +0 -269
- data/lib/scout/log/fingerprint.rb +0 -69
- data/lib/scout/log/progress/report.rb +0 -244
- data/lib/scout/log/progress/util.rb +0 -173
- data/lib/scout/log/progress.rb +0 -106
- data/lib/scout/log/trap.rb +0 -107
- data/lib/scout/log.rb +0 -441
- data/lib/scout/meta_extension.rb +0 -100
- data/lib/scout/misc/digest.rb +0 -63
- data/lib/scout/misc/filesystem.rb +0 -25
- data/lib/scout/misc/format.rb +0 -255
- data/lib/scout/misc/helper.rb +0 -31
- data/lib/scout/misc/insist.rb +0 -56
- data/lib/scout/misc/monitor.rb +0 -66
- data/lib/scout/misc/system.rb +0 -73
- data/lib/scout/misc.rb +0 -10
- data/lib/scout/named_array.rb +0 -138
- data/lib/scout/open/lock/lockfile.rb +0 -587
- data/lib/scout/open/lock.rb +0 -68
- data/lib/scout/open/remote.rb +0 -135
- data/lib/scout/open/stream.rb +0 -491
- data/lib/scout/open/util.rb +0 -244
- data/lib/scout/open.rb +0 -170
- data/lib/scout/path/find.rb +0 -204
- data/lib/scout/path/tmpfile.rb +0 -8
- data/lib/scout/path/util.rb +0 -107
- data/lib/scout/path.rb +0 -51
- data/lib/scout/persist/open.rb +0 -17
- data/lib/scout/persist/path.rb +0 -15
- data/lib/scout/persist/serialize.rb +0 -157
- data/lib/scout/persist.rb +0 -104
- data/lib/scout/resource/open.rb +0 -8
- data/lib/scout/resource/path.rb +0 -80
- data/lib/scout/resource/produce/rake.rb +0 -69
- data/lib/scout/resource/produce.rb +0 -151
- data/lib/scout/resource/scout.rb +0 -3
- data/lib/scout/resource/software.rb +0 -178
- data/lib/scout/resource/util.rb +0 -55
- data/lib/scout/resource.rb +0 -41
- data/lib/scout/simple_opt/accessor.rb +0 -54
- data/lib/scout/simple_opt/doc.rb +0 -126
- data/lib/scout/simple_opt/get.rb +0 -57
- data/lib/scout/simple_opt/parse.rb +0 -67
- data/lib/scout/simple_opt/setup.rb +0 -26
- data/lib/scout/simple_opt.rb +0 -5
- data/lib/scout/tmpfile.rb +0 -129
- data/test/scout/indiferent_hash/test_case_insensitive.rb +0 -16
- data/test/scout/indiferent_hash/test_options.rb +0 -46
- data/test/scout/log/test_progress.rb +0 -108
- data/test/scout/misc/test_digest.rb +0 -30
- data/test/scout/misc/test_filesystem.rb +0 -30
- data/test/scout/misc/test_insist.rb +0 -13
- data/test/scout/misc/test_system.rb +0 -21
- data/test/scout/open/test_lock.rb +0 -52
- data/test/scout/open/test_remote.rb +0 -25
- data/test/scout/open/test_stream.rb +0 -676
- data/test/scout/open/test_util.rb +0 -73
- data/test/scout/path/test_find.rb +0 -119
- data/test/scout/path/test_util.rb +0 -22
- data/test/scout/persist/test_open.rb +0 -37
- data/test/scout/persist/test_path.rb +0 -37
- data/test/scout/persist/test_serialize.rb +0 -114
- data/test/scout/resource/test_path.rb +0 -46
- data/test/scout/resource/test_produce.rb +0 -77
- data/test/scout/resource/test_software.rb +0 -24
- data/test/scout/resource/test_util.rb +0 -27
- data/test/scout/simple_opt/test_doc.rb +0 -16
- data/test/scout/simple_opt/test_get.rb +0 -11
- data/test/scout/simple_opt/test_parse.rb +0 -10
- data/test/scout/simple_opt/test_setup.rb +0 -77
- data/test/scout/test_cmd.rb +0 -85
- data/test/scout/test_concurrent_stream.rb +0 -29
- data/test/scout/test_config.rb +0 -66
- data/test/scout/test_indiferent_hash.rb +0 -26
- data/test/scout/test_log.rb +0 -32
- data/test/scout/test_meta_extension.rb +0 -80
- data/test/scout/test_misc.rb +0 -6
- data/test/scout/test_named_array.rb +0 -43
- data/test/scout/test_open.rb +0 -146
- data/test/scout/test_path.rb +0 -54
- data/test/scout/test_persist.rb +0 -186
- data/test/scout/test_resource.rb +0 -26
- data/test/scout/test_tmpfile.rb +0 -53
- /data/test/scout/{log/test_color.rb → test_offsite.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5af158e978a724dacd722c9584cb4fd3b7f46fff8a4619272b1d2c2258418600
|
4
|
+
data.tar.gz: 6bd5da8eba38542376f4b5566154fc16105f3742ba0758a37139d0ff9679d06e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9f6f4d2a5e223d740332b627c9606907d69536696f477401087b4f72bee09d1b374d060275ecb3fad5e38c27010417d36d661d985c58d71e3cec4bf04bbcbf7
|
7
|
+
data.tar.gz: a7b8e5d1bfd1057bd93cfbd4a2439bccf0e28848f3e08923c81da8bcc2fe1a489ffb2e220587ecb4533ad0cf7edcf506f3c4557955dfa11356d816b87b379968
|
data/.vimproject
CHANGED
data/Rakefile
CHANGED
@@ -20,10 +20,9 @@ Juwelier::Tasks.new do |gem|
|
|
20
20
|
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
21
21
|
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
22
22
|
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
23
|
-
gem.add_runtime_dependency '
|
23
|
+
gem.add_runtime_dependency 'scout-essentials'
|
24
24
|
gem.add_runtime_dependency 'net-ssh'
|
25
25
|
gem.add_runtime_dependency 'matrix'
|
26
|
-
gem.add_runtime_dependency 'sys-proctable'
|
27
26
|
gem.add_runtime_dependency 'RubyInline'
|
28
27
|
#gem.add_runtime_dependency 'tokyocabinet'
|
29
28
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
10.0.1
|
data/bin/scout
CHANGED
data/lib/rbbt-scout.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
$LOAD_PATH.unshift File.join(__dir__, '../modules/rbbt-util/lib')
|
2
|
-
module
|
2
|
+
module Scout
|
3
3
|
extend Resource
|
4
4
|
self.path_maps = Path.path_maps.merge(:rbbt_lib => File.expand_path(File.join(__dir__, '../modules/rbbt-util/', '{TOPLEVEL}','{SUBPATH}')))
|
5
5
|
end
|
6
|
+
Rbbt = Scout
|
6
7
|
|
7
8
|
Resource.set_software_env Rbbt.software
|
data/lib/scout/offsite/ssh.rb
CHANGED
data/lib/scout/semaphore.rb
CHANGED
data/lib/scout/tsv/dumper.rb
CHANGED
data/lib/scout/tsv/open.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require 'scout/open'
|
2
2
|
require_relative '../work_queue'
|
3
3
|
|
4
4
|
module MultipleResult
|
@@ -20,7 +20,7 @@ module Open
|
|
20
20
|
into.add *res
|
21
21
|
when TSV, Hash
|
22
22
|
key, value = res
|
23
|
-
if into.type == :double
|
23
|
+
if TSV === into && into.type == :double
|
24
24
|
into.zip_new key, value, insitu: false
|
25
25
|
else
|
26
26
|
into[key] = value
|
@@ -118,6 +118,12 @@ module Open
|
|
118
118
|
callback.call res if callback
|
119
119
|
nil
|
120
120
|
end
|
121
|
+
when Hash
|
122
|
+
obj.each do |key,value|
|
123
|
+
res = block.call(key,value)
|
124
|
+
callback.call res if callback
|
125
|
+
nil
|
126
|
+
end
|
121
127
|
when Array
|
122
128
|
obj.each do |line|
|
123
129
|
res = block.call(line)
|
data/lib/scout/tsv/parser.rb
CHANGED
data/lib/scout/tsv/persist.rb
CHANGED
data/lib/scout/tsv/util.rb
CHANGED
data/lib/scout/tsv.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
class DoneProcessing < Exception
|
2
|
+
attr_accessor :pid
|
3
|
+
def initialize(pid = Process.pid)
|
4
|
+
@pid = pid
|
5
|
+
end
|
6
|
+
|
7
|
+
def message
|
8
|
+
"Done processing pid #{pid}"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class WorkerException < ScoutException
|
13
|
+
attr_accessor :worker_exception, :pid
|
14
|
+
def initialize(worker_exception, pid)
|
15
|
+
@worker_exception = worker_exception
|
16
|
+
@pid = pid
|
17
|
+
end
|
18
|
+
end
|
data/lib/scout/work_queue.rb
CHANGED
@@ -7,11 +7,12 @@ class Step
|
|
7
7
|
direct_deps << dep
|
8
8
|
end
|
9
9
|
seen.concat direct_deps.collect{|d| d.path }
|
10
|
-
direct_deps.inject(direct_deps){|acc,d| acc.concat(d.rec_dependencies(connected,
|
10
|
+
direct_deps.inject(direct_deps){|acc,d| acc.concat(d.rec_dependencies(connected, seen)); acc }
|
11
11
|
end
|
12
12
|
|
13
13
|
def recursive_inputs
|
14
|
-
recursive_inputs = @inputs.to_hash
|
14
|
+
recursive_inputs = NamedArray === @inputs ? @inputs.to_hash : {}
|
15
|
+
return recursive_inputs if dependencies.nil?
|
15
16
|
dependencies.inject(recursive_inputs) do |acc,dep|
|
16
17
|
acc.merge(dep.recursive_inputs)
|
17
18
|
end
|
@@ -9,12 +9,18 @@ class Step
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
+
def self.load_info(info_file)
|
13
|
+
info = Persist.load(info_file, SERIALIZER) || {}
|
14
|
+
IndiferentHash.setup(info)
|
15
|
+
end
|
16
|
+
|
12
17
|
def load_info
|
13
|
-
@info =
|
14
|
-
IndiferentHash.setup(@info)
|
18
|
+
@info = Step.load_info(info_file)
|
15
19
|
@info_load_time = Time.now
|
16
20
|
end
|
17
21
|
|
22
|
+
|
23
|
+
|
18
24
|
def save_info(info = nil)
|
19
25
|
Persist.save(info, info_file, SERIALIZER)
|
20
26
|
@info_load_time = Time.now
|
@@ -83,10 +83,25 @@ class Step
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
-
str
|
86
|
+
str
|
87
87
|
end
|
88
88
|
|
89
|
-
def self.
|
89
|
+
def self.prov_indent(step, offset, input_dependencies)
|
90
|
+
return (" " * (offset))
|
91
|
+
if step.alias?
|
92
|
+
(" " * offset + "🡵")
|
93
|
+
elsif step.overriden_task
|
94
|
+
(" " * offset + "🡇")
|
95
|
+
elsif input_dependencies.include?(step)
|
96
|
+
(" " * offset + "┝")
|
97
|
+
elsif step.input_dependencies.any?
|
98
|
+
(" " * offset + "╰")
|
99
|
+
else
|
100
|
+
(" " * (offset+1))
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.prov_report(step, offset = 0, task = nil, seen = [], expand_repeats = false, input = nil, input_dependencies = nil)
|
90
105
|
info = step.info || {}
|
91
106
|
info[:task_name] = task
|
92
107
|
path = step.path
|
@@ -101,7 +116,7 @@ class Step
|
|
101
116
|
|
102
117
|
this_step_msg = prov_report_msg(status, name, path, info, input)
|
103
118
|
|
104
|
-
input_dependencies
|
119
|
+
input_dependencies ||= {}
|
105
120
|
step.dependencies.each do |dep|
|
106
121
|
if dep.input_dependencies.any?
|
107
122
|
dep.input_dependencies.each do |id|
|
@@ -116,8 +131,10 @@ class Step
|
|
116
131
|
end
|
117
132
|
end if step.dependencies
|
118
133
|
|
119
|
-
str =
|
120
|
-
|
134
|
+
str = []
|
135
|
+
|
136
|
+
indent = prov_indent(step, offset, input_dependencies)
|
137
|
+
str << indent + this_step_msg if ENV["SCOUT_ORIGINAL_STACK"] == 'true'
|
121
138
|
|
122
139
|
step.dependencies.dup.tap{|l|
|
123
140
|
l.reverse! if ENV["SCOUT_ORIGINAL_STACK"] == 'true'
|
@@ -126,10 +143,10 @@ class Step
|
|
126
143
|
new = ! seen.include?(path)
|
127
144
|
if new
|
128
145
|
seen << path
|
129
|
-
str
|
146
|
+
str.concat(prov_report(dep, offset + 1, task, seen, expand_repeats, input_dependencies[dep], input_dependencies.dup).split("\n"))
|
130
147
|
else
|
131
148
|
if expand_repeats
|
132
|
-
str << Log.color(Step.status_color(dep.status), Log.uncolor(prov_report(dep, offset+1, task)))
|
149
|
+
str << Log.color(Step.status_color(dep.status), Log.uncolor(prov_report(dep, offset+1, task, input_dependencies[dep], input_dependencies.dup)))
|
133
150
|
else
|
134
151
|
info = dep.info || {}
|
135
152
|
status = info[:status] || :missing
|
@@ -138,13 +155,14 @@ class Step
|
|
138
155
|
status = :unsync if status == :done and not Open.exist?(path)
|
139
156
|
status = :notfound if status == :noinfo and not Open.exist?(path)
|
140
157
|
|
141
|
-
|
158
|
+
dep_indent = prov_indent(dep, offset+1, input_dependencies)
|
159
|
+
str << dep_indent + Log.color(Step.status_color(status), Log.uncolor(prov_report_msg(status, name, path, info, input_dependencies[dep])))
|
142
160
|
end
|
143
161
|
end
|
144
162
|
end if step.dependencies
|
145
163
|
|
146
|
-
str
|
164
|
+
str << indent + this_step_msg unless ENV["SCOUT_ORIGINAL_STACK"] == 'true'
|
147
165
|
|
148
|
-
str
|
166
|
+
str * "\n"
|
149
167
|
end
|
150
168
|
end
|
data/lib/scout/workflow/step.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'scout/path'
|
2
|
+
require 'scout/persist'
|
3
3
|
require_relative 'step/info'
|
4
4
|
require_relative 'step/status'
|
5
5
|
require_relative 'step/load'
|
@@ -33,7 +33,9 @@ class Step
|
|
33
33
|
def inputs
|
34
34
|
@inputs ||= begin
|
35
35
|
if info_file && Open.exists?(info_file)
|
36
|
-
info[:inputs]
|
36
|
+
inputs = info[:inputs]
|
37
|
+
NamedArray.setup(inputs, info[:input_names]) if inputs && info[:input_names]
|
38
|
+
inputs
|
37
39
|
else
|
38
40
|
[]
|
39
41
|
end
|
@@ -61,6 +63,10 @@ class Step
|
|
61
63
|
@name ||= File.basename(@path)
|
62
64
|
end
|
63
65
|
|
66
|
+
def short_path
|
67
|
+
[workflow.to_s, task_name, name] * "/"
|
68
|
+
end
|
69
|
+
|
64
70
|
def clean_name
|
65
71
|
return @id if @id
|
66
72
|
return info[:clean_name] if info.include? :clean_name
|
@@ -122,9 +128,10 @@ class Step
|
|
122
128
|
begin
|
123
129
|
Persist.persist(name, type, :path => path, :tee_copies => tee_copies) do
|
124
130
|
clear_info
|
131
|
+
input_names = (task.respond_to?(:inputs) && task.inputs) ? task.inputs.collect{|name,_| name} : []
|
125
132
|
merge_info :status => :start, :start => Time.now,
|
126
133
|
:pid => Process.pid, :pid_hostname => Misc.hostname,
|
127
|
-
:inputs => MetaExtension.purge(inputs), :type => type,
|
134
|
+
:inputs => MetaExtension.purge(inputs), :input_names => input_names, :type => type,
|
128
135
|
:dependencies => dependencies.collect{|d| d.path }
|
129
136
|
|
130
137
|
@result = exec
|
@@ -278,9 +285,10 @@ class Step
|
|
278
285
|
end
|
279
286
|
|
280
287
|
def step(task_name)
|
288
|
+
task_name = task_name.to_sym
|
281
289
|
dependencies.each do |dep|
|
282
|
-
return dep if dep.task_name == task_name
|
283
|
-
return dep if dep.overriden_task == task_name
|
290
|
+
return dep if dep.task_name && dep.task_name.to_sym == task_name
|
291
|
+
return dep if dep.overriden_task && dep.overriden_task.to_sym == task_name
|
284
292
|
rec_dep = dep.step(task_name)
|
285
293
|
return rec_dep if rec_dep
|
286
294
|
end
|
@@ -302,4 +310,8 @@ class Step
|
|
302
310
|
def task_signature
|
303
311
|
[workflow.to_s, task_name] * "#"
|
304
312
|
end
|
313
|
+
|
314
|
+
def alias?
|
315
|
+
task.alias? if task
|
316
|
+
end
|
305
317
|
end
|
@@ -54,6 +54,7 @@ module Task
|
|
54
54
|
if provided_inputs.include?(overriden = [workflow.name, task] * "#")
|
55
55
|
dep = provided_inputs[overriden]
|
56
56
|
dep = Step.new dep unless Step === dep
|
57
|
+
dep = dep.dup
|
57
58
|
dep.type = workflow.tasks[task].type
|
58
59
|
dep.overriden_task = task
|
59
60
|
dep.overriden_workflow = workflow
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require 'scout/named_array'
|
2
2
|
module Task
|
3
3
|
def self.format_input(value, type, options = {})
|
4
4
|
return value if IO === value || StringIO === value || Step === value
|
@@ -87,6 +87,8 @@ module Task
|
|
87
87
|
if Path.is_filename?(value)
|
88
88
|
relative_file = save_file_input(value, directory)
|
89
89
|
Open.write(input_file + ".as_file", relative_file)
|
90
|
+
elsif Step === value
|
91
|
+
Open.write(input_file + ".as_step", value.short_path)
|
90
92
|
elsif type == :file
|
91
93
|
relative_file = save_file_input(value, directory)
|
92
94
|
Persist.save(relative_file, input_file, :file)
|
@@ -115,6 +117,9 @@ module Task
|
|
115
117
|
value = Open.read(filename).strip
|
116
118
|
value.sub!(/^\./, File.dirname(filename)) if value.start_with?("./")
|
117
119
|
inputs[name] = value
|
120
|
+
elsif filename.end_with?('.as_step')
|
121
|
+
value = Open.read(filename).strip
|
122
|
+
inputs[name] = Step.load value
|
118
123
|
elsif (options && (options[:noload] || options[:stream] || options[:nofile]))
|
119
124
|
inputs[name] = filename
|
120
125
|
else
|
data/lib/scout/workflow/task.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require 'scout/meta_extension'
|
2
|
+
require 'scout/named_array'
|
3
3
|
require_relative 'step'
|
4
4
|
require_relative 'task/inputs'
|
5
5
|
require_relative 'task/dependencies'
|
@@ -45,6 +45,21 @@ module Task
|
|
45
45
|
IndiferentHash.setup(provided_inputs)
|
46
46
|
id = DEFAULT_NAME if id.nil?
|
47
47
|
|
48
|
+
|
49
|
+
missing_inputs = []
|
50
|
+
self.inputs.each do |input,type,desc,val,options|
|
51
|
+
next unless options && options[:required]
|
52
|
+
missing_inputs << input unless provided_inputs.include?(input)
|
53
|
+
end if self.inputs
|
54
|
+
|
55
|
+
if missing_inputs.length == 1
|
56
|
+
raise ParameterException, "Input '#{missing_inputs.first}' is required but was not provided or is nil"
|
57
|
+
end
|
58
|
+
|
59
|
+
if missing_inputs.length > 1
|
60
|
+
raise ParameterException, "Inputs #{Misc.humanize_list(missing_inputs)} are required but were not provided or are nil"
|
61
|
+
end
|
62
|
+
|
48
63
|
provided_inputs = load_inputs(provided_inputs[:load_inputs]) if Hash === provided_inputs && provided_inputs[:load_inputs]
|
49
64
|
|
50
65
|
inputs, non_default_inputs, input_digest_str = process_inputs provided_inputs, id
|
@@ -52,7 +67,7 @@ module Task
|
|
52
67
|
compute = {}
|
53
68
|
dependencies = dependencies(id, provided_inputs, non_default_inputs, compute)
|
54
69
|
|
55
|
-
non_default_inputs.concat provided_inputs.keys.select{|k| String === k && k.include?("#") } if Hash === provided_inputs
|
70
|
+
#non_default_inputs.concat provided_inputs.keys.select{|k| String === k && k.include?("#") } if Hash === provided_inputs
|
56
71
|
|
57
72
|
non_default_inputs.uniq!
|
58
73
|
|
@@ -95,4 +110,8 @@ module Task
|
|
95
110
|
Step.new path.find, inputs, dependencies, id, non_default_inputs, step_provided_inputs, compute, &self
|
96
111
|
end
|
97
112
|
end
|
113
|
+
|
114
|
+
def alias?
|
115
|
+
@extension == :dep_task
|
116
|
+
end
|
98
117
|
end
|
data/lib/scout/workflow/usage.rb
CHANGED
@@ -136,6 +136,7 @@ module Workflow
|
|
136
136
|
|
137
137
|
dep_tree = {}
|
138
138
|
task = self.tasks[task_name]
|
139
|
+
raise "TaskNotFound: #{task_name}" if task.nil?
|
139
140
|
task.deps.each do |workflow, task, options|
|
140
141
|
next if seen.include? dep
|
141
142
|
seen << [workflow, task, options.merge(seen_options)]
|
data/lib/scout/workflow.rb
CHANGED
@@ -6,8 +6,8 @@ require_relative 'workflow/documentation'
|
|
6
6
|
require_relative 'workflow/usage'
|
7
7
|
require_relative 'workflow/deployment'
|
8
8
|
|
9
|
-
|
10
|
-
|
9
|
+
require 'scout/resource'
|
10
|
+
require 'scout/resource/scout'
|
11
11
|
|
12
12
|
module Workflow
|
13
13
|
class << self
|
@@ -27,7 +27,9 @@ module Workflow
|
|
27
27
|
|
28
28
|
def self.require_workflow(workflow_name_orig)
|
29
29
|
first = nil
|
30
|
-
workflow_name_orig.split("+").each do |
|
30
|
+
workflow_name_orig.split("+").each do |complete_workflow_name|
|
31
|
+
self.main = nil
|
32
|
+
workflow_name, *subworkflows = complete_workflow_name.split("::")
|
31
33
|
workflow = workflow_name
|
32
34
|
workflow = Path.setup('workflows')[workflow_name]["workflow.rb"] unless Open.exists?(workflow)
|
33
35
|
workflow = Path.setup('workflows')[Misc.snake_case(workflow_name)]["workflow.rb"] unless Open.exists?(workflow)
|
@@ -40,7 +42,14 @@ module Workflow
|
|
40
42
|
else
|
41
43
|
raise "Workflow #{workflow_name} not found"
|
42
44
|
end
|
43
|
-
|
45
|
+
|
46
|
+
current = begin
|
47
|
+
Kernel.const_get(complete_workflow_name)
|
48
|
+
rescue
|
49
|
+
self.main || workflows.last
|
50
|
+
end
|
51
|
+
|
52
|
+
first ||= current
|
44
53
|
end
|
45
54
|
first
|
46
55
|
end
|
data/lib/scout-gear.rb
CHANGED
@@ -1,12 +1,3 @@
|
|
1
|
-
|
2
|
-
require_relative 'scout/indiferent_hash'
|
3
|
-
require_relative 'scout/tmpfile'
|
4
|
-
require_relative 'scout/log'
|
5
|
-
require_relative 'scout/path'
|
6
|
-
require_relative 'scout/simple_opt'
|
7
|
-
require_relative 'scout/resource'
|
8
|
-
require_relative 'scout/resource/scout'
|
9
|
-
require_relative 'scout/persist'
|
1
|
+
require 'scout-essentials'
|
10
2
|
require_relative 'scout/tsv'
|
11
|
-
require_relative 'scout/config'
|
12
3
|
require_relative 'scout/offsite'
|