rbbt-util 5.32.0 → 5.32.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/tsv/csv.rb +5 -0
- data/lib/rbbt/workflow/step/accessor.rb +1 -0
- data/lib/rbbt/workflow/util/archive.rb +1 -1
- data/lib/rbbt/workflow/util/trace.rb +6 -6
- 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: 4491182540571f16f4059ec742f210152862e77bda8c31355285c81daf8bfd8e
|
4
|
+
data.tar.gz: 313a4e9252f8b443fef52b4267e94b177f9cacd36a89d6db63010b4ae7fb275f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81b4b06eac8a44027a0c0f97510c75a2b0f3daf6594da4cd977c5d197318ee7e22db35e0c12f68dced5ab5aa0c1f0c152be77ed7bafe8c5588f2d274292b2035
|
7
|
+
data.tar.gz: 5ea83c058de9bde5bbae17b1c08308a7311c5c48d1c589f236300c3f437b667bd7012ad48a2c4890ab0c924168916809569367155b3a9300723a9c6596837d52
|
data/lib/rbbt/tsv/csv.rb
CHANGED
@@ -8,6 +8,7 @@ module TSV
|
|
8
8
|
noheaders = ! headers
|
9
9
|
|
10
10
|
type = options.delete :type
|
11
|
+
cast = options.delete :cast
|
11
12
|
merge = options.delete :merge
|
12
13
|
key_field = options.delete :key_field
|
13
14
|
fields = options.delete :fields
|
@@ -46,6 +47,10 @@ module TSV
|
|
46
47
|
else
|
47
48
|
key, *values = row
|
48
49
|
end
|
50
|
+
|
51
|
+
if cast
|
52
|
+
values = values.collect{|v| v.send cast }
|
53
|
+
end
|
49
54
|
|
50
55
|
case type
|
51
56
|
when :double, :flat
|
@@ -97,6 +97,7 @@ class Step
|
|
97
97
|
Open.ln_s(value.path, path)
|
98
98
|
when type.to_s == "file"
|
99
99
|
if String === value && File.exists?(value)
|
100
|
+
value = File.expand_path(value)
|
100
101
|
Open.ln_s(value, path)
|
101
102
|
else
|
102
103
|
value = value.collect{|v| v = "#{v}" if Path === v; v }if Array === value
|
@@ -70,8 +70,8 @@ module Workflow
|
|
70
70
|
|
71
71
|
start = data.column("Start.second").values.flatten.collect{|v| v.to_f}.min
|
72
72
|
eend = data.column("End.second").values.flatten.collect{|v| v.to_f}.max
|
73
|
-
total = eend - start
|
74
|
-
Log.info "Total time elapsed: #{total} seconds"
|
73
|
+
total = eend - start unless eend.nil? || start.nil?
|
74
|
+
Log.info "Total time elapsed: #{total} seconds" if total
|
75
75
|
|
76
76
|
data
|
77
77
|
end
|
@@ -178,7 +178,6 @@ rbbt.png_plot('#{plot}', 'plot(timeline)', width=#{width}, height=#{height}, poi
|
|
178
178
|
jobs = []
|
179
179
|
seed_jobs.each do |step|
|
180
180
|
jobs += step.rec_dependencies + [step]
|
181
|
-
|
182
181
|
step.info[:archived_info].each do |path,ainfo|
|
183
182
|
archived_step = Step.new path
|
184
183
|
class << archived_step
|
@@ -188,9 +187,10 @@ rbbt.png_plot('#{plot}', 'plot(timeline)', width=#{width}, height=#{height}, poi
|
|
188
187
|
end
|
189
188
|
jobs << archived_step
|
190
189
|
end if step.info[:archived_info]
|
190
|
+
|
191
191
|
end
|
192
192
|
|
193
|
-
jobs = jobs.uniq.sort_by{|job| t = job.info[:
|
193
|
+
jobs = jobs.uniq.sort_by{|job| t = job.info[:started]; t || Open.mtime(job.path) || Time.now }
|
194
194
|
|
195
195
|
data = trace_job_times(jobs, options[:fix_gap])
|
196
196
|
|
@@ -200,10 +200,10 @@ rbbt.png_plot('#{plot}', 'plot(timeline)', width=#{width}, height=#{height}, poi
|
|
200
200
|
|
201
201
|
raise "No jobs to process" if data.size == 0
|
202
202
|
|
203
|
-
plot, size, width, height = options.values_at :plot, :width, :height
|
203
|
+
plot, size, width, height = options.values_at :plot, :size, :width, :height
|
204
204
|
|
205
205
|
size = 800 if size.nil?
|
206
|
-
width = size * 2 if width.nil?
|
206
|
+
width = size.to_i * 2 if width.nil?
|
207
207
|
height = size if height.nil?
|
208
208
|
|
209
209
|
plot_trace_job_times(data, plot, width, height) if plot
|
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.32.
|
4
|
+
version: 5.32.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|