rbbt-util 5.26.26 → 5.26.27
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.
- checksums.yaml +4 -4
- data/bin/rbbt +17 -7
- data/lib/rbbt/hpc.rb +8 -4
- data/lib/rbbt/tsv/attach/util.rb +10 -2
- data/lib/rbbt/workflow/accessor.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6047c6e75852ae9b3ec91c8950e3298a5d6005b9049adfe25d6edf7c4e36fa6
|
4
|
+
data.tar.gz: 91615cb7a2e9778cac5724c39d587a629db56d4ecdd340e904396e24b3becfe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e7b18ac930414fa922f5e52cf203e7ce733983f7ba31e79ba45e8537a5cf0804a271789575c1eef232110f652d2f8814d07f5d11e61abfb5fc595e9f3c75a8a
|
7
|
+
data.tar.gz: 514ff881334cbdb4faeba6f09038fd27fa2fbe5242582b85c1626c78731e9b836d6fd64f7b468e714d3091d16c0e63e48dfe3ea6c0a88f2e387550f855807fac
|
data/bin/rbbt
CHANGED
@@ -224,6 +224,7 @@ $previous_commands = []
|
|
224
224
|
|
225
225
|
cmd_alias
|
226
226
|
|
227
|
+
exit_status = 0
|
227
228
|
begin
|
228
229
|
while ARGV.any?
|
229
230
|
$command = ARGV.shift
|
@@ -234,38 +235,45 @@ begin
|
|
234
235
|
when dir[$command].exists?
|
235
236
|
if locate
|
236
237
|
puts dir[$command].find
|
237
|
-
|
238
|
+
exit_status = 0
|
239
|
+
exit exit_status
|
238
240
|
else
|
239
241
|
load dir[$command].find
|
240
|
-
|
242
|
+
exit_status = 0
|
243
|
+
exit exit_status
|
241
244
|
end
|
242
245
|
when File.exist?($command)
|
243
246
|
load $command
|
244
|
-
|
247
|
+
exit_status = 0
|
248
|
+
exit exit_status
|
245
249
|
else
|
246
250
|
error = "Command '#{$command }' not understood"
|
247
251
|
rbbt_usage($previous_commands)
|
248
252
|
print_error(error)
|
249
|
-
|
253
|
+
exit_status = -1
|
254
|
+
exit exit_status
|
250
255
|
end
|
251
256
|
end
|
252
257
|
|
253
258
|
rbbt_usage($previous_commands)
|
254
|
-
|
259
|
+
exit_status = 0
|
260
|
+
exit exit_status
|
255
261
|
|
256
262
|
rescue ParameterException
|
257
263
|
puts
|
258
264
|
rbbt_usage
|
259
265
|
print_error($!.message, $!.backtrace)
|
260
266
|
puts
|
261
|
-
|
267
|
+
exit_status = -1
|
268
|
+
exit exit_status
|
262
269
|
rescue SystemExit
|
263
270
|
rescue CmdStop
|
264
271
|
exit_status = $!.exit_status
|
265
272
|
exit exit_status
|
266
273
|
rescue Exception
|
267
274
|
Log.exception $!
|
268
|
-
|
275
|
+
exit_status = -1
|
276
|
+
exit exit_status
|
269
277
|
ensure
|
270
278
|
if options[:profile]
|
271
279
|
result = RubyProf.stop
|
@@ -273,3 +281,5 @@ ensure
|
|
273
281
|
printer.print(STDOUT, :min_percent => 10)
|
274
282
|
end
|
275
283
|
end
|
284
|
+
|
285
|
+
exit exit_status
|
data/lib/rbbt/hpc.rb
CHANGED
@@ -178,7 +178,7 @@ echo "/scratch/tmp/rbbt/projects/rbbt/workflows/" > $CONTAINER_DIR/.rbbt/etc/wor
|
|
178
178
|
env +=<<EOF
|
179
179
|
|
180
180
|
# Copy image
|
181
|
-
rsync -avz "$SINGULARITY_IMG" "$CONTAINER_DIR/rbbt.singularity.img"
|
181
|
+
rsync -avz "$SINGULARITY_IMG" "$CONTAINER_DIR/rbbt.singularity.img" 1>&2
|
182
182
|
SINGULARITY_IMG="$CONTAINER_DIR/rbbt.singularity.img"
|
183
183
|
EOF
|
184
184
|
end
|
@@ -426,9 +426,13 @@ EOF
|
|
426
426
|
options[:slurm_basedir] ||= File.join(tmp_directory, 'workdir')
|
427
427
|
slurm_basedir = options[:slurm_basedir]
|
428
428
|
inputs_dir = File.join(tmp_directory, 'inputs_dir')
|
429
|
-
Step.save_job_inputs(job, inputs_dir)
|
430
|
-
|
431
|
-
|
429
|
+
saved = Step.save_job_inputs(job, inputs_dir, options)
|
430
|
+
if saved
|
431
|
+
options[:inputs_dir] = inputs_dir
|
432
|
+
cmd = ['workflow', 'task', workflow.to_s, task.to_s, '-pf', '--load_inputs', inputs_dir, '--log', (options[:log] || Log.severity).to_s]
|
433
|
+
else
|
434
|
+
cmd = ['workflow', 'task', workflow.to_s, task.to_s, '-pf', '--log', (options[:log] || Log.severity).to_s]
|
435
|
+
end
|
432
436
|
|
433
437
|
|
434
438
|
template = self.template(cmd, options)
|
data/lib/rbbt/tsv/attach/util.rb
CHANGED
@@ -86,8 +86,16 @@ module TSV
|
|
86
86
|
[source_key]
|
87
87
|
else
|
88
88
|
if other.include? source_key
|
89
|
-
v = other.type
|
90
|
-
|
89
|
+
v = case other.type
|
90
|
+
when :flat
|
91
|
+
other[source_key]
|
92
|
+
when :single
|
93
|
+
[other[source_key]]
|
94
|
+
when :double
|
95
|
+
other[source_key][pos]
|
96
|
+
when :list
|
97
|
+
[other[source_key][pos]]
|
98
|
+
end
|
91
99
|
else
|
92
100
|
[nil]
|
93
101
|
end
|
@@ -84,7 +84,8 @@ class Step
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
-
def self.save_job_inputs(job, dir)
|
87
|
+
def self.save_job_inputs(job, dir, options = nil)
|
88
|
+
options = IndiferentHash.setup options.dup if options
|
88
89
|
|
89
90
|
task_name = job.task_name
|
90
91
|
workflow = job.workflow
|
@@ -92,9 +93,13 @@ class Step
|
|
92
93
|
task_info = workflow.task_info(task_name)
|
93
94
|
input_types = task_info[:input_types]
|
94
95
|
task_inputs = task_info[:inputs]
|
96
|
+
|
97
|
+
saved = false
|
95
98
|
job.recursive_inputs.zip(job.recursive_inputs.fields).each do |value,name|
|
96
99
|
next unless task_inputs.include? name.to_sym
|
100
|
+
next if options and ! options.include?(name)
|
97
101
|
next if value.nil?
|
102
|
+
saved = true
|
98
103
|
path = File.join(dir, name.to_s)
|
99
104
|
type = input_types[name].to_s
|
100
105
|
Log.debug "Saving job input #{name} (#{type}) into #{path}"
|
@@ -113,6 +118,8 @@ class Step
|
|
113
118
|
Open.write(path, value.to_s)
|
114
119
|
end
|
115
120
|
end
|
121
|
+
|
122
|
+
saved
|
116
123
|
end
|
117
124
|
|
118
125
|
def name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.26.
|
4
|
+
version: 5.26.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|