scout-gear 10.8.0 → 10.8.1

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: 7a3b309720cd9c3116460e682e1da0810a8601a406de1a86bb2e63c2dc1b2e7e
4
- data.tar.gz: 03ee884261ff3393b2d9e52c1361260bd2c55d3038c244251dc75b357891eb93
3
+ metadata.gz: a16e6fadbdab77f5dd56efff644adb5b79c7765642d87cee21f297eb4e783bee
4
+ data.tar.gz: 2d4e225ec569e3fc8f569835b865effc6b3428e23b6feba3d4f9e8d092cb8a13
5
5
  SHA512:
6
- metadata.gz: 66b6d4780304a2f50f6a7aa384c86df78909851d1c9176d71ebaa67c7bb43b334b10b092fb4d636d1dbeada466db19d17af12d28f181de27ec0fd54450a1367c
7
- data.tar.gz: 4efa2ebbc04db80cae4592887ab7f825cdc4783ffd381c1073c5d1e762f034b9c0c0a6e581948bfca96195653d88500c07525e922d7229c81306893a13e41809
6
+ metadata.gz: 3103bc1c224105e7a5d5ac74181a62c6457d6b38cb4f59db2615be3962cef24777f25918977d738c02903b0b831606991c1015b2a7fa77fb03def9fce1b29cc7
7
+ data.tar.gz: a09e7bf564fc5e4711bee14df56b7e8cd108b52cd9f02318d255964b58a9bc7585829a411629733c9cdd78060ac8d9b932491924d8227c03540fe93f55d04ccf
data/VERSION CHANGED
@@ -1 +1 @@
1
- 10.8.0
1
+ 10.8.1
data/bin/scout CHANGED
@@ -66,7 +66,7 @@ require 'scout/simple_opt'
66
66
  require 'scout/log'
67
67
 
68
68
  options = SOPT.setup <<EOF
69
- Ruby bioinformatics toolkit
69
+ Scout
70
70
 
71
71
  $ #{$0} <command> <subcommand> ... -a --arg1 --arg2='value' --arg3 'another-value'
72
72
 
@@ -75,7 +75,7 @@ $ #{$0} <command> <subcommand> ... -a --arg1 --arg2='value' --arg3 'another-valu
75
75
  --dev* #{Log.color :yellow, "Find development libraries in the directory specified"}
76
76
  --nocolor #{Log.color :yellow, "Disable colored output"}
77
77
  --nobar #{Log.color :yellow, "Disable progress report"}
78
- --locate_file #{Log.color :yellow, "Report the location of the script instead of executing it"}
78
+ --locate_file #{Log.color :yellow, "Report the location of the script but do not execute it"}
79
79
  -ck--config_keys* #{Log.color :yellow, "Override some config keys"}
80
80
  EOF
81
81
 
@@ -106,7 +106,7 @@ class KnowledgeBase
106
106
  new_paths = _fp(rest, clean_matches, new_assignments)
107
107
  next unless new_paths
108
108
  paths[match] = new_paths
109
- end
109
+ end if matches
110
110
 
111
111
  return false if paths.empty?
112
112
 
@@ -2,11 +2,21 @@ require 'scout/entity'
2
2
  require 'scout/workflow'
3
3
 
4
4
  module EntityWorkflow
5
+ attr_accessor :entity_name
6
+
7
+ def entity_name=(name)
8
+ @entity_name = name
9
+ helper name do
10
+ entity
11
+ end
12
+ end
5
13
 
6
14
  def self.extended(base)
7
15
  base.extend Workflow
8
16
  base.extend Entity
9
17
 
18
+ base.entity_name ||= 'entity'
19
+
10
20
  base.instance_variable_set(:@annotation_inputs, IndiferentHash.setup({})) unless base.instance_variables.include?(:@annotation_inputs)
11
21
  class << base
12
22
  def annotation_input(name, type=nil, desc=nil, default=nil, options = {})
@@ -20,7 +30,7 @@ module EntityWorkflow
20
30
  base.setup(clean_name.dup, inputs.to_hash)
21
31
  end
22
32
 
23
- base.helper :entity_list do
33
+ base.helper :entity_list do
24
34
  list = inputs.last
25
35
  list = list.load if Step === list
26
36
  base.setup(list, inputs.to_hash)
@@ -46,12 +56,13 @@ module EntityWorkflow
46
56
  input annotation
47
57
  end
48
58
  end
59
+
49
60
  case property_type
50
61
  when :single, :single2array
51
- input :entity, :string, "#{self.to_s} identifier", nil, jobname: true
62
+ input entity_name, :string, "#{self.to_s} identifier", nil, jobname: true
52
63
  task(task_name => result_type, &block)
53
64
  when :both
54
- input :entity, :string, "#{self.to_s} identifier", nil, jobname: true
65
+ input entity_name, :string, "#{self.to_s} identifier", nil, jobname: true
55
66
  input :list, :array, "#{self.to_s} identifier list"
56
67
  task(task_name => result_type, &block)
57
68
  else
@@ -59,7 +70,8 @@ module EntityWorkflow
59
70
  task(task_name => result_type, &block)
60
71
  end
61
72
 
62
- property task_name => property_type do |*args|
73
+ property_name = task_name.to_s.sub(/^(#{entity_name}_list|#{entity_name}|list)_/, '')
74
+ property property_name => property_type do |*args|
63
75
  job = job(task_name, *args)
64
76
  Array === job ? job.collect(&:run) : job.run
65
77
  end
@@ -83,11 +83,12 @@ module Task
83
83
 
84
84
  id = DEFAULT_NAME if id.nil?
85
85
 
86
+ sanitized_id = Path.sanitize_filename(id, 150)
86
87
  if non_default_inputs.any? && !(non_default_inputs == [jobname_input] && provided_inputs[jobname_input] == id)
87
88
  hash = Misc.digest(:inputs => input_digest_str, :dependencies => dependencies)
88
- name = [id, hash] * "_"
89
+ name = [sanitized_id, hash] * "_"
89
90
  else
90
- name = id
91
+ name = sanitized_id
91
92
  end
92
93
 
93
94
  extension = self.extension
@@ -139,14 +139,16 @@ module Workflow
139
139
  dep_tree = {}
140
140
  task = self.tasks[task_name]
141
141
  raise TaskNotFound, "Task #{task_name} in #{self.to_s}" if task.nil?
142
- task.deps.each do |workflow, task, options|
143
- next if seen.include? dep
144
- seen << [workflow, task, options.merge(seen_options)]
145
- next if task.nil?
146
142
 
147
- key = [workflow, task]
143
+ task.deps.each do |workflow, dep_task, options|
144
+ dep = [workflow, dep_task, options.merge(seen_options)]
145
+ #next if seen.include? dep
146
+ seen << dep
147
+ next if dep_task.nil?
148
148
 
149
- dep_tree[key] = workflow.dep_tree(task, seen, options.merge(seen_options))
149
+ dep_key = [workflow, dep_task]
150
+
151
+ dep_tree[dep_key] = workflow.dep_tree(dep_task, seen, options.merge(seen_options))
150
152
  end if task.deps
151
153
 
152
154
  @dep_tree[key] = dep_tree if save
@@ -163,6 +165,7 @@ module Workflow
163
165
  def _prov_tasks(tree)
164
166
  tasks = []
165
167
  heap = tree.values
168
+ heap = [tree]
166
169
  while heap.any?
167
170
  t = heap.pop
168
171
  t.each do |k,v|
@@ -188,10 +191,8 @@ module Workflow
188
191
  first = last.nil?
189
192
  last = _prov_tasks(workflow.dep_tree(task_name))
190
193
 
191
- break if child
192
-
193
194
  if child
194
- description << "->" << task_name.to_s
195
+ description << "->" << task_name.to_s
195
196
  elsif first
196
197
  description << "" << task_name.to_s
197
198
  else
@@ -204,7 +205,6 @@ module Workflow
204
205
  end
205
206
 
206
207
  def prov_tree(tree, offset = 0, seen = [])
207
-
208
208
  return "" if tree.empty?
209
209
 
210
210
  lines = []
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.8.0 ruby lib
5
+ # stub: scout-gear 10.8.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "scout-gear".freeze
9
- s.version = "10.8.0".freeze
9
+ s.version = "10.8.1".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-06-05"
14
+ s.date = "2025-06-12"
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]
@@ -115,7 +115,8 @@ else
115
115
  when "serial"
116
116
  job.run(true)
117
117
  when "local"
118
- orchestrator = Workflow::Orchestrator.new 3, "cpus" => Misc.processors
118
+ refresh = Scout::Config.get :refresh, :deploy, :local, :orchestrator, default: 3
119
+ orchestrator = Workflow::Orchestrator.new refresh.to_f, "cpus" => Misc.processors
119
120
  orchestrator.process({}, job)
120
121
  when "slurm"
121
122
  require 'rbbt-scout'
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.8.0
4
+ version: 10.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-06-05 00:00:00.000000000 Z
10
+ date: 2025-06-12 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: scout-essentials