mddb 0.0.18 → 0.0.19
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.
- data/lib/mddb/commands/run.rb +12 -3
- data/lib/mddb/runner.rb +14 -4
- data/lib/mddb/version.rb +1 -1
- metadata +1 -1
data/lib/mddb/commands/run.rb
CHANGED
@@ -14,9 +14,18 @@ module Mddb::Commands
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def local
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
ARGV.shift
|
18
|
+
if ARGV.split("..").count == 2
|
19
|
+
a = ARGV.split("..").map {|d| d.to_i}
|
20
|
+
x = Mddb::Runner.new
|
21
|
+
x.run(a[0],a[1])
|
22
|
+
elsif ARGV == "all"
|
23
|
+
a = ARGV.split("..").map {|d| d.to_i}
|
24
|
+
x = Mddb::Runner.new
|
25
|
+
x.run(0,0)
|
26
|
+
else
|
27
|
+
puts "Please supply a range of frames: eg. 1..10 or use 'all'"
|
28
|
+
end
|
20
29
|
end
|
21
30
|
end
|
22
31
|
ARGV.shift
|
data/lib/mddb/runner.rb
CHANGED
@@ -19,9 +19,17 @@ module Mddb
|
|
19
19
|
|
20
20
|
def run (start, finish)
|
21
21
|
if self.fine?
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
unless start == 0 or finish == 0
|
23
|
+
(start..finish).each do |f|
|
24
|
+
puts "Running => Frame #{f}"
|
25
|
+
self.calculations(f)
|
26
|
+
end
|
27
|
+
else
|
28
|
+
fids = Frame.all.map {|f| f.fid}
|
29
|
+
fids.each do |f|
|
30
|
+
puts "Running => Frame #{f}"
|
31
|
+
self.calculations(f)}
|
32
|
+
end
|
25
33
|
end
|
26
34
|
end
|
27
35
|
end
|
@@ -33,13 +41,15 @@ module Mddb
|
|
33
41
|
object_count = objects.count
|
34
42
|
complete = 0
|
35
43
|
failed = 0
|
44
|
+
calcs = objects.first.list_calculations
|
36
45
|
objects.each do |o|
|
37
46
|
begin
|
38
47
|
o.run
|
39
48
|
complete += 1
|
49
|
+
print "\r Models (#{i+1}/#{model_count}) => #{k} Completed #{complete}/#{object_count} Failed: #{failed}"
|
40
50
|
rescue
|
41
51
|
failed += 1
|
42
|
-
print "\r Models (#{i}/#{model_count}) => #{k}
|
52
|
+
print "\r Models (#{i+1}/#{model_count}) => #{k} Completed #{complete}/#{object_count} Failed: #{failed}"
|
43
53
|
end
|
44
54
|
end
|
45
55
|
print "\n"
|
data/lib/mddb/version.rb
CHANGED