cagnut_core 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/cagnut +0 -0
- data/exe/stat +0 -0
- data/lib/cagnut/cli/new_project.rb +17 -0
- data/lib/cagnut/job_manage.rb +5 -6
- data/lib/cagnut/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45208b3f586da65477c5b699d8626bce76ecc66d
|
4
|
+
data.tar.gz: cfc256daa53bc7daaa98031c49296c0164772857
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9c058af090d0e6d622524c239d81f8cb3b2ff3739a7aa52ab58e0c92d0924761a1d72ab1d0ee72a65d1b79adda86882775ebd01655f5abc2627feb4c336526c
|
7
|
+
data.tar.gz: 2f1001b6c10b2089d159c8686ce63cb3e705a6cbc9edb0dc4560681847572f84ba6915bcbb5840d5475f701eda546a9bfbbbd66b03fa2a2164ef650347d508f9
|
data/exe/cagnut
CHANGED
File without changes
|
data/exe/stat
CHANGED
File without changes
|
@@ -25,6 +25,7 @@ module Cagnut
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def new_project name, options
|
28
|
+
check_pipeline options[:pipelines]
|
28
29
|
empty_directory name
|
29
30
|
copy_file 'Gemfile', "#{name}/Gemfile"
|
30
31
|
inside name, verbose: true do
|
@@ -37,6 +38,11 @@ module Cagnut
|
|
37
38
|
load_bundle_env name
|
38
39
|
after_new_project name
|
39
40
|
generate_pipeline_tools_config name, options[:pipelines], options[:cluster]
|
41
|
+
append_pipeline_dependency_gems_to_gemfile name, options[:pipelines]
|
42
|
+
end
|
43
|
+
|
44
|
+
def check_pipeline pipelines
|
45
|
+
abort('Please select at least one pipeline.') if pipelines.blank?
|
40
46
|
end
|
41
47
|
|
42
48
|
def add_queue_setting name, pipeline
|
@@ -55,6 +61,17 @@ module Cagnut
|
|
55
61
|
end
|
56
62
|
end
|
57
63
|
|
64
|
+
def append_pipeline_dependency_gems_to_gemfile folder, pipelines
|
65
|
+
return if pipelines.blank?
|
66
|
+
inside folder, verbose: true do
|
67
|
+
pipelines.each do |pipeline_name|
|
68
|
+
gems = send "#{pipeline_name}_pipeline_dependency_gems"
|
69
|
+
gems.each { |gem_name| append_to_file 'Gemfile', "gem #{gem_name}\n" }
|
70
|
+
end
|
71
|
+
bundle 'update'
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
58
75
|
def generate_pipeline_tools_config name, pipelines, cluster=nil
|
59
76
|
return if pipelines.blank?
|
60
77
|
pipelines.each do |pipeline_name|
|
data/lib/cagnut/job_manage.rb
CHANGED
@@ -23,12 +23,11 @@ module Cagnut
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def full_command job_script, job_name, opts
|
26
|
-
super if defined?(super)
|
27
|
-
|
28
|
-
command = local job_script
|
26
|
+
return super if defined?(super) && !run_local?
|
27
|
+
local job_script
|
29
28
|
end
|
30
29
|
|
31
|
-
def
|
30
|
+
def run_local?
|
32
31
|
cluster.blank? || cluster['system'] == 'Local'
|
33
32
|
end
|
34
33
|
|
@@ -50,13 +49,13 @@ module Cagnut
|
|
50
49
|
end
|
51
50
|
|
52
51
|
def run_local
|
53
|
-
return unless
|
52
|
+
return unless run_local?
|
54
53
|
%(& echo $! >> #{jobs_dir}/submit_job_#{sample_name}.ids
|
55
54
|
wait $!)
|
56
55
|
end
|
57
56
|
|
58
57
|
def wait_local
|
59
|
-
return unless
|
58
|
+
return unless run_local?
|
60
59
|
'wait $!'
|
61
60
|
end
|
62
61
|
end
|
data/lib/cagnut/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cagnut_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shi-Gang Wang
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-11-
|
12
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|