sushi_fabric 0.3.9 → 0.4.3
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/sushi_fabric/sushiApp.rb +19 -6
- data/lib/sushi_fabric/version.rb +1 -1
- metadata +19 -13
- checksums.yaml +0 -7
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
|
-
# Version = '
|
3
|
+
# Version = '20150716-161756'
|
4
4
|
|
5
5
|
require 'csv'
|
6
6
|
require 'fileutils'
|
@@ -185,6 +185,7 @@ class SushiApp
|
|
185
185
|
attr_accessor :next_dataset_name
|
186
186
|
attr_accessor :dataset_name
|
187
187
|
attr_accessor :next_dataset_comment
|
188
|
+
attr_accessor :workflow_manager
|
188
189
|
def initialize
|
189
190
|
@gstore_dir = GSTORE_DIR
|
190
191
|
@project = nil
|
@@ -197,7 +198,7 @@ class SushiApp
|
|
197
198
|
@params['process_mode'] = 'SAMPLE'
|
198
199
|
@job_ids = []
|
199
200
|
@required_columns = []
|
200
|
-
|
201
|
+
#@workflow_manager = workflow_manager_instance||DRbObject.new_with_uri(WORKFLOW_MANAGER)
|
201
202
|
end
|
202
203
|
def set_input_dataset
|
203
204
|
if @dataset_tsv_file
|
@@ -384,13 +385,16 @@ rm -rf #{@scratch_dir} || exit 1
|
|
384
385
|
gsub_options << "-n #{@params['node']}" unless @params['node'].to_s.empty?
|
385
386
|
gsub_options << "-r #{@params['ram']}" unless @params['ram'].to_s.empty?
|
386
387
|
gsub_options << "-s #{@params['scratch']}" unless @params['scratch'].to_s.empty?
|
387
|
-
gsub_options << "-u #{@user}" if @user
|
388
388
|
command = "wfm_monitoring --server #{WORKFLOW_MANAGER} --project #{@project.gsub(/p/,'')} --logdir #{@gstore_script_dir} #{job_script} #{gsub_options.join(' ')}"
|
389
|
+
puts "submit: #{command}"
|
390
|
+
|
391
|
+
project_number = @project.gsub(/p/, '')
|
392
|
+
@workflow_manager||=DRbObject.new_with_uri(WORKFLOW_MANAGER)
|
393
|
+
script_content = File.read(job_script)
|
394
|
+
@workflow_manager.start_monitoring(job_script, @user, 0, script_content, project_number, gsub_options.join(' '), @gstore_script_dir)
|
389
395
|
end
|
390
396
|
def submit(job_script)
|
391
|
-
|
392
|
-
puts "submit: #{command}"
|
393
|
-
job_id = `#{command}`
|
397
|
+
job_id = submit_command(job_script)
|
394
398
|
job_id = job_id.to_i
|
395
399
|
unless job_id.to_i > 1
|
396
400
|
raise 'failed in job submitting'
|
@@ -440,6 +444,7 @@ rm -rf #{@scratch_dir} || exit 1
|
|
440
444
|
file_path
|
441
445
|
end
|
442
446
|
def copy_commands(org_dir, dest_parent_dir, now=nil)
|
447
|
+
@workflow_manager||=DRbObject.new_with_uri(WORKFLOW_MANAGER)
|
443
448
|
@workflow_manager.copy_commands(org_dir, dest_parent_dir, now)
|
444
449
|
end
|
445
450
|
def copy_inputdataset_parameter_jobscripts
|
@@ -466,6 +471,14 @@ rm -rf #{@scratch_dir} || exit 1
|
|
466
471
|
command = "rm -rf #{@scratch_result_dir}"
|
467
472
|
`#{command}`
|
468
473
|
end
|
474
|
+
def cluster_nodes
|
475
|
+
@workflow_manager||=DRbObject.new_with_uri(WORKFLOW_MANAGER)
|
476
|
+
@workflow_manager.cluster_nodes
|
477
|
+
end
|
478
|
+
def default_node
|
479
|
+
@workflow_manager||=DRbObject.new_with_uri(WORKFLOW_MANAGER)
|
480
|
+
@workflow_manager.default_node
|
481
|
+
end
|
469
482
|
|
470
483
|
def make_job_script
|
471
484
|
@out = open(@job_script, 'w')
|
data/lib/sushi_fabric/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sushi_fabric
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3
|
4
|
+
version: 0.4.3
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Functional Genomics Center Zurich
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2015-
|
12
|
+
date: 2015-07-16 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '1.3'
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.3'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '0'
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: '0'
|
41
46
|
description: This library provides us with the methods to submit a job cooperating
|
@@ -47,17 +52,17 @@ executables:
|
|
47
52
|
extensions: []
|
48
53
|
extra_rdoc_files: []
|
49
54
|
files:
|
50
|
-
-
|
55
|
+
- .bzrignore
|
51
56
|
- Gemfile
|
52
57
|
- LICENSE.txt
|
53
58
|
- README.md
|
54
59
|
- Rakefile
|
55
60
|
- bin/sushi_fabric
|
56
61
|
- config/environments/development.rb
|
57
|
-
- lib/sushi_fabric.rb
|
58
62
|
- lib/sushi_fabric/optparse_ex.rb
|
59
63
|
- lib/sushi_fabric/sushiApp.rb
|
60
64
|
- lib/sushi_fabric/version.rb
|
65
|
+
- lib/sushi_fabric.rb
|
61
66
|
- sample/WordCountApp.rb
|
62
67
|
- sample/sample_dataset.tsv
|
63
68
|
- sample/sample_parameterset.tsv
|
@@ -65,25 +70,26 @@ files:
|
|
65
70
|
homepage: ''
|
66
71
|
licenses:
|
67
72
|
- MIT
|
68
|
-
metadata: {}
|
69
73
|
post_install_message:
|
70
74
|
rdoc_options: []
|
71
75
|
require_paths:
|
72
76
|
- lib
|
73
77
|
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
74
79
|
requirements:
|
75
|
-
- -
|
80
|
+
- - ! '>='
|
76
81
|
- !ruby/object:Gem::Version
|
77
82
|
version: '0'
|
78
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
|
+
none: false
|
79
85
|
requirements:
|
80
|
-
- -
|
86
|
+
- - ! '>='
|
81
87
|
- !ruby/object:Gem::Version
|
82
88
|
version: '0'
|
83
89
|
requirements: []
|
84
90
|
rubyforge_project:
|
85
|
-
rubygems_version:
|
91
|
+
rubygems_version: 1.8.23.2
|
86
92
|
signing_key:
|
87
|
-
specification_version:
|
93
|
+
specification_version: 3
|
88
94
|
summary: workflow manager client.
|
89
95
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 48669658a0c5f3b680bc3aa8b444902e285b67ae
|
4
|
-
data.tar.gz: 20e0b60dba4ccb53b8859eb35026f2394b2639b9
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: f9e45953157f9306d4fdcece49aae97902a034e76f461422763273844f3540fab70ed6042968a64fbb610223f04c62a5e81eaa20fe157ee78e5d38a835b1cb53
|
7
|
-
data.tar.gz: 014e463dbcc6d7b6580f619cb309c45fa9b6ece3e3b6f971b0972fde54607b415a9a6c16835b019bd6595c8a43b58fd8cf27cbf2492ef1bcdaa1e1e3ea440eb5
|