rbbt-util 5.21.84 → 5.21.85

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a49d93fb2f43d54bb645860d3cebbe8b963a49ef
4
- data.tar.gz: cdadbfaa80ca05d96d2bea551d46778baa22adf8
3
+ metadata.gz: 9b0026548f0fd257ee1c8034c380bc81421e6b43
4
+ data.tar.gz: 3d71f163382164f5403f405c22f46f810dc94fff
5
5
  SHA512:
6
- metadata.gz: 513419ec73b7769efd06ee338e8630cb811ee1640c43108d3d5b961e97057de8855109389696c432363eaaabe1982ae6d4e0d1b103f91865f5656dcb08b34d7e
7
- data.tar.gz: 1d7329702b78feaa162d9d457f266afb4d5f48727987ebeb38ee1ac3156068d846e019bd48692cd5e9a00239722726bd48340995fbcf5beacd2c1d09bfcf138d
6
+ metadata.gz: 1cbbdfe188342713c7656ddd3f0dca2e85b8dfcf920aad550e66128d5c57151553c1ec213c5bfd0f09646ed2bc1e2dde4e6a55d3a4844481d2016eec0595464d
7
+ data.tar.gz: 3164ac445b99c1a05e6741bde5c59bb8352ae7ff9c7bae7fef99bf0aad523f54291f14d59f4d4b9e71daa1dccf2f12f5e6926cb33ada09d104ca212a6743731c
data/lib/rbbt/workflow.rb CHANGED
@@ -359,20 +359,24 @@ module Workflow
359
359
  end
360
360
  end
361
361
 
362
+ #{{{ LOAD FROM FILE
363
+
362
364
  def get_job_step(step_path, task = nil, input_values = nil, dependencies = nil)
363
365
  step_path = step_path.call if Proc === step_path
364
366
  persist = input_values.nil? ? false : true
365
367
  persist = false
366
368
  key = Path === step_path ? step_path.find : step_path
369
+
367
370
  step = Step.new step_path, task, input_values, dependencies
368
371
 
372
+ set_step_dependencies(step) unless dependencies
373
+
369
374
  step.extend step_module
370
375
 
371
376
  step.task ||= task
372
377
  step.inputs ||= input_values
373
378
  step.dependencies = dependencies if dependencies and (step.dependencies.nil? or step.dependencies.length < dependencies.length)
374
379
 
375
- set_step_dependencies(step)
376
380
 
377
381
  step
378
382
  end
@@ -402,6 +406,8 @@ module Workflow
402
406
  get_job_step path, task
403
407
  end
404
408
 
409
+ #}}} LOAD FROM FILE
410
+
405
411
  def jobs(taskname, query = nil)
406
412
  task_dir = File.join(File.expand_path(workdir.find), taskname.to_s)
407
413
  pattern = File.join(File.expand_path(task_dir), '**/*')
@@ -70,7 +70,7 @@ class Step
70
70
  end
71
71
 
72
72
  def name
73
- path.sub(/.*\/#{Regexp.quote task.name.to_s}\/(.*)/, '\1')
73
+ path.sub(/.*\/#{Regexp.quote task_name.to_s}\/(.*)/, '\1')
74
74
  end
75
75
 
76
76
  def short_path
@@ -768,8 +768,10 @@ module Workflow
768
768
 
769
769
  new_=[]
770
770
  dep.each{|d|
771
- inputs = assign_dep_inputs({}, options.merge(d[:inputs]), real_dependencies, d[:workflow].task_info(d[:task]))
772
- d = d[:workflow].job(d[:task], d[:jobname], inputs) if Hash === d
771
+ if Hash === d
772
+ inputs = assign_dep_inputs({}, options.merge(d[:inputs]), real_dependencies, d[:workflow].task_info(d[:task]))
773
+ d = d[:workflow].job(d[:task], d[:jobname], inputs)
774
+ end
773
775
  ComputeDependency.setup(d, compute) if compute
774
776
  new_ << d
775
777
  }
@@ -80,6 +80,7 @@ class Step
80
80
  end
81
81
 
82
82
  def task_name
83
+ return @path.split("/")[-2] if @task.nil?
83
84
  @task.name
84
85
  end
85
86
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.21.84
4
+ version: 5.21.85
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez