scout-gear 10.7.8 → 10.7.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68a4a6cd64e357c099695cee41af47fd35b2c3b78475ca90baf8e55078b224da
4
- data.tar.gz: 289ed4ac91ec47e7c108c395df28cc3d0050668f5e59e9dc6cfa1ebc3e795c0f
3
+ metadata.gz: 6399697b155a59acc6b18d1767bfc8c062a9d354c650478f8a57a82946f3593d
4
+ data.tar.gz: 9fa7e065c8d9f56484e2a8e63bb215aafc28b032c6bcc95691d0a725855154a5
5
5
  SHA512:
6
- metadata.gz: 70626145e7e3d51790384c594f8d6896b2a033007e76a9547aba74857fce9d0916f0a25d8b08424e90605af93800168b4ec339c1c73b47c7f6094aa545016667
7
- data.tar.gz: d731d71fc54d2c95314fbb2f07cceda081e312b5bf270fa9b42ac4b842c51b32f7302070bc98f271ac5603a57d46158fd7cbd646e5c7eed6c233a016e0cad820
6
+ metadata.gz: ae10dd542865799ab9abfc453caf2833687bfd4b74df51c4a52144a3a59bda31c41ab48078c6e5eb6f22df4053974867a0e8b163dfb7b9e843008d21279534b5
7
+ data.tar.gz: 48054781097bf5be8f59f1331cb830db7dffa543d3034c96e3d64288bdd14cea91af104f73a70aecdd60ac4d8cf02760ef6b5e5b7fe18aa5609e52948322c0fa
data/.vimproject CHANGED
@@ -131,7 +131,6 @@ scout-gear=/$PWD filter="*.rb *.yaml" {
131
131
  }
132
132
  scout-gear.rb
133
133
  workflow-scout.rb
134
- rbbt-scout.rb
135
134
  scout.rb
136
135
  }
137
136
  scout_commands=scout_commands filter="*"{
data/Rakefile CHANGED
@@ -55,5 +55,4 @@ Rake::RDocTask.new do |rdoc|
55
55
  rdoc.title = "scout-gear #{version}"
56
56
  rdoc.rdoc_files.include('README*')
57
57
  rdoc.rdoc_files.include('lib/**/*.rb')
58
- rdoc.rdoc_files.include('../modules/rbbt-util/lib/**/*.rb')
59
58
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.7.8
1
+ 10.7.9
data/bin/scout CHANGED
@@ -62,9 +62,8 @@ if _i = ARGV.index("--require")
62
62
  end
63
63
  end
64
64
 
65
- require 'scout-gear'
66
-
67
65
  require 'scout/simple_opt'
66
+ require 'scout/log'
68
67
 
69
68
  options = SOPT.setup <<EOF
70
69
  Ruby bioinformatics toolkit
@@ -90,7 +89,10 @@ end
90
89
 
91
90
  if options[:log]
92
91
  Log.severity = options.delete(:log).to_i
92
+ require 'scout-gear'
93
93
  else
94
+ require 'scout-gear'
95
+
94
96
  global_severity = Log.get_level(Scout.etc.log_severity.read.strip) if Scout.etc.log_severity.exists?
95
97
  if ENV["SCOUT_LOG"]
96
98
  Log.severity = ENV["SCOUT_LOG"].to_i
@@ -9,6 +9,7 @@ module Workflow
9
9
 
10
10
  if Open.directory?(file)
11
11
  clean_name = name2clean_name name
12
+ clean_name = nil if clean_name == Task::DEFAULT_NAME
12
13
  inputs = workflow.tasks[task].load_inputs(file)
13
14
  workflow.job(task, clean_name, inputs)
14
15
  else
@@ -1,15 +1,13 @@
1
1
  class Step
2
2
  def save_inputs(inputs_dir)
3
3
  if clean_name != name
4
- hash = name[clean_name.length..-1]
5
- inputs_dir += hash
4
+ #hash = name[clean_name.length..-1]
5
+ #inputs_dir += hash
6
6
  Log.medium "Saving job inputs to: #{Log.fingerprint inputs_dir}"
7
7
  self.task.save_inputs(inputs_dir, provided_inputs)
8
- inputs_dir
9
8
  else
10
9
  Log.medium "Saving no input job: #{Log.fingerprint inputs_dir}"
11
10
  Open.touch(inputs_dir)
12
- inputs_dir
13
11
  end
14
12
  end
15
13
  end
@@ -133,16 +133,19 @@ module Task
133
133
  end
134
134
 
135
135
  def save_inputs(directory, provided_inputs = {})
136
+ saved = []
136
137
  self.recursive_inputs.each_with_index do |p,i|
137
138
  name, type, desc, value, options = p
138
139
  next unless provided_inputs.include?(name)
139
- value = provided_inputs[name]
140
140
 
141
+ saved << name
142
+
143
+ value = provided_inputs[name]
141
144
  Task.save_input(directory, name, type, value)
142
145
  end
146
+ saved
143
147
  end
144
148
 
145
-
146
149
  def self.load_input_from_file(filename, type, options = nil)
147
150
  if Open.exists?(filename) || filename = Dir.glob(File.join(filename + ".*")).first
148
151
  if filename.end_with?('.as_file')
data/scout-gear.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: scout-gear 10.7.8 ruby lib
5
+ # stub: scout-gear 10.7.9 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "scout-gear".freeze
9
- s.version = "10.7.8".freeze
9
+ s.version = "10.7.9".freeze
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Miguel Vazquez".freeze]
14
- s.date = "2025-04-11"
14
+ s.date = "2025-04-16"
15
15
  s.description = "Scout gear: workflow, TSVs, persistence, entities, associations, and knowledge_bases.".freeze
16
16
  s.email = "mikisvaz@gmail.com".freeze
17
17
  s.executables = ["scout".freeze]
@@ -30,7 +30,6 @@ Gem::Specification.new do |s|
30
30
  "bin/scout",
31
31
  "doc/lib/scout/path.md",
32
32
  "doc/lib/scout/workflow/task.md",
33
- "lib/rbbt-scout.rb",
34
33
  "lib/scout-gear.rb",
35
34
  "lib/scout.rb",
36
35
  "lib/scout/association.rb",
@@ -251,7 +250,7 @@ Gem::Specification.new do |s|
251
250
  ]
252
251
  s.homepage = "http://github.com/mikisvaz/scout-gear".freeze
253
252
  s.licenses = ["MIT".freeze]
254
- s.rubygems_version = "3.6.5".freeze
253
+ s.rubygems_version = "3.6.6".freeze
255
254
  s.summary = "basic gear for scouts".freeze
256
255
 
257
256
  s.specification_version = 4
@@ -15,6 +15,7 @@ Path map defaults to :user
15
15
  -h--help Print this help
16
16
  -s--source* Host of source path
17
17
  -t--target* Host of target path
18
+ -d--delete Delete source files
18
19
  EOF
19
20
  if options[:help]
20
21
  if defined? scout_usage
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'scout'
4
+ require 'scout/aws/s3'
4
5
  require 'scout/workflow/deployment/queue'
5
6
  require 'scout/workflow/deployment/orchestrator'
6
7
 
@@ -17,6 +18,7 @@ $ #{$0} [<options>] ([<workflow>] [<task>] [<name>] | <filename>)
17
18
  --continuous Process continuously
18
19
  --produce_timer* Produce timer for sleeping
19
20
  --produce_cpus* Cpus to use concurrently producing jobs
21
+ -r--requires* Require files
20
22
  EOF
21
23
  if options[:help]
22
24
  if defined? scout_usage
@@ -26,7 +28,13 @@ if options[:help]
26
28
  end
27
29
  exit 0
28
30
  end
29
- list, continuous = IndiferentHash.process_options options, :list, :continuous
31
+ list, continuous, requires = IndiferentHash.process_options options, :list, :continuous, :requires
32
+
33
+ if requires
34
+ requires.split(",").each do |file|
35
+ require file
36
+ end
37
+ end
30
38
 
31
39
  queue_dir = Scout.var.queue
32
40
 
@@ -34,7 +42,7 @@ class TrayAgain < Exception; end
34
42
 
35
43
  begin
36
44
  if ARGV.empty?
37
- files = queue_dir.glob("*/*/*")
45
+ files = queue_dir.glob_all("*/*/*")
38
46
  if list
39
47
  puts files * "\n"
40
48
  exit
@@ -49,12 +57,12 @@ begin
49
57
  exit
50
58
 
51
59
  else
52
- files = queue_dir.glob("#{workflow}/*/*")
60
+ files = queue_dir.glob_all("#{workflow}/*/*")
53
61
  end
54
62
  elsif name.nil?
55
- files = queue_dir.glob("#{workflow}/#{task}/*")
63
+ files = queue_dir.glob_all("#{workflow}/#{task}/*")
56
64
  else
57
- files = queue_dir.glob("#{workflow}/#{task}/#{name}*")
65
+ files = queue_dir.glob_all("#{workflow}/#{task}/#{name}*")
58
66
  end
59
67
  end
60
68
 
@@ -71,7 +79,11 @@ begin
71
79
 
72
80
  Workflow.job_cache.clear
73
81
 
74
- if continuous
82
+ if files.any?
83
+ Log.debug "Re-checking for new jobs"
84
+ sleep 1
85
+ raise Workflow::Orchestrator::NoWork
86
+ elsif continuous
75
87
  Log.debug "Continuous processing"
76
88
  sleep 1
77
89
  raise Workflow::Orchestrator::NoWork
@@ -107,8 +107,9 @@ else
107
107
  case deploy
108
108
  when "queue"
109
109
  if ! job.done?
110
- save_inputs = Scout.var.queue[workflow.to_s][task_name][job.clean_name].find
111
- puts job.save_inputs(save_inputs)
110
+ save_inputs = Scout.var.queue[workflow.to_s][task_name][job.name].find
111
+ job.save_inputs(save_inputs)
112
+ puts save_inputs
112
113
  exit
113
114
  end
114
115
  when "serial"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout-gear
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.7.8
4
+ version: 10.7.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-11 00:00:00.000000000 Z
10
+ date: 2025-04-16 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: scout-essentials
@@ -99,7 +99,6 @@ files:
99
99
  - bin/scout
100
100
  - doc/lib/scout/path.md
101
101
  - doc/lib/scout/workflow/task.md
102
- - lib/rbbt-scout.rb
103
102
  - lib/scout-gear.rb
104
103
  - lib/scout.rb
105
104
  - lib/scout/association.rb
@@ -335,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
334
  - !ruby/object:Gem::Version
336
335
  version: '0'
337
336
  requirements: []
338
- rubygems_version: 3.6.5
337
+ rubygems_version: 3.6.6
339
338
  specification_version: 4
340
339
  summary: basic gear for scouts
341
340
  test_files: []
data/lib/rbbt-scout.rb DELETED
@@ -1,8 +0,0 @@
1
- $LOAD_PATH.unshift File.join(__dir__, '../modules/rbbt-util/lib')
2
- module Scout
3
- extend Resource
4
- self.path_maps = Path.path_maps.merge(:rbbt_lib => File.expand_path(File.join(__dir__, '../modules/rbbt-util/', '{TOPLEVEL}','{SUBPATH}')))
5
- end
6
- Rbbt = Scout
7
-
8
- Resource.set_software_env Rbbt.software