sushi_fabric 0.3.5 → 0.3.6
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/bin/sushi_fabric +5 -1
- data/lib/sushi_fabric/sushiApp.rb +9 -3
- data/lib/sushi_fabric/version.rb +1 -1
- metadata +2 -2
data/bin/sushi_fabric
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
|
-
# Version = '
|
3
|
+
# Version = '20150327-011934'
|
4
4
|
|
5
5
|
require 'sushi_fabric'
|
6
6
|
|
@@ -13,6 +13,7 @@ Usage:
|
|
13
13
|
o.on(:class_name, '-c class_name', '--class', "SushiApp class name (\e[31mrequired\e[0m)")
|
14
14
|
o.on(:dataset_id, '-i dataset_id', '--dataset_id', Integer, 'DataSet ID in Sushi DB')
|
15
15
|
o.on(:dataset_tsv, '-d dataset_tsv', '--dataset', String, 'DataSet file (.tsv) (This option is prior to dataset_id option)')
|
16
|
+
o.on(:dataset_name, '-s dataset_name', '--dataset_name', String, 'DataSet name in Sushi (This will be used with --dataset option, default: tsv file base name)')
|
16
17
|
o.on(:parameterset_tsv, '-m parameterset_tsv', '--parameterset', String, 'Parameterset file (.tsv)')
|
17
18
|
o.on(:run_mode, '-r', '--run', 'Real run mode. without this option, it runs with test run mode which checks only DataSet and Parameters and no submittion')
|
18
19
|
o.on(:project, '1001', '-p project', '--project', String, 'Project Number (default: 1001)')
|
@@ -63,6 +64,9 @@ usecase.user = opt.user
|
|
63
64
|
usecase.dataset_sushi_id = opt.dataset_id
|
64
65
|
usecase.dataset_tsv_file = opt.dataset_tsv
|
65
66
|
usecase.parameterset_tsv_file = opt.parameterset_tsv
|
67
|
+
if opt.dataset_name
|
68
|
+
usecase.dataset_name = opt.dataset_name
|
69
|
+
end
|
66
70
|
if opt.next_dataset_name
|
67
71
|
usecase.next_dataset_name = opt.next_dataset_name
|
68
72
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
|
-
# Version = '
|
3
|
+
# Version = '20150327-011855'
|
4
4
|
|
5
5
|
require 'csv'
|
6
6
|
require 'fileutils'
|
@@ -178,6 +178,7 @@ class SushiApp
|
|
178
178
|
attr_accessor :project
|
179
179
|
attr_accessor :user
|
180
180
|
attr_accessor :next_dataset_name
|
181
|
+
attr_accessor :dataset_name
|
181
182
|
attr_accessor :next_dataset_comment
|
182
183
|
def initialize
|
183
184
|
@gstore_dir = GSTORE_DIR
|
@@ -203,11 +204,16 @@ class SushiApp
|
|
203
204
|
@dataset << row.to_hash
|
204
205
|
end
|
205
206
|
|
206
|
-
# save in sushi db
|
207
|
+
# save in sushi db unless it is saved in sushi db
|
207
208
|
data_set_arr = []
|
208
209
|
headers = []
|
209
210
|
rows = []
|
210
|
-
|
211
|
+
dataset_name = if @dataset_name
|
212
|
+
@dataset_name
|
213
|
+
else
|
214
|
+
File.basename(@dataset_tsv_file).gsub(/.tsv/, '')
|
215
|
+
end
|
216
|
+
data_set_arr = {'DataSetName'=>dataset_name, 'ProjectNumber'=>@project.gsub(/p/,'')}
|
211
217
|
csv = CSV.readlines(@dataset_tsv_file, :col_sep=>"\t")
|
212
218
|
csv.each do |row|
|
213
219
|
if headers.empty?
|
data/lib/sushi_fabric/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.3.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|