sushi_fabric 1.0.6 → 1.1.0

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: cfe59c9648980949d93b531a0bd3346d46b7dc21c9feea0a81deb7a30c13fc9e
4
- data.tar.gz: f29b974e1bbc6d6d47895ec6ff8a4789623542ff176ab53455b23308a838db2d
3
+ metadata.gz: 4e8c7afdc3db914867cb23a1274fe257e8d16f60904c867e84ada16b3faeec5b
4
+ data.tar.gz: 9e0db5e3421c31767b1c089652831dee04fd536e557969ad17519dbd1f681d0a
5
5
  SHA512:
6
- metadata.gz: 7325be618b4e21089db068e04b99fa48d2e40452ee9e3646aec7600ba59e7a30de6d0e56faacd1bd75a13d442677c5c735dfda367041e03e5e71804a5fcc4a4a
7
- data.tar.gz: ce5e49baed8af919d9803b3dfbfbcb7e6c47c789c4b06224db46e53fbf4c7277cf7cf412dafe212ec6688399651a160af07d9e62a196f092b005fda7b39d482a
6
+ metadata.gz: ff6aa500c3ce2f3bdf1a33d3829b1aed9031c949fc894f69d23b9cbb7e47b4fbdb5c4477d3cb916e139c944521eeae0b619e7f1cc1df1991054d1b94cf7dd528
7
+ data.tar.gz: a491d23bef554e292253aa28f08677b940bf8f2fd6a6d798a7423a1a62fba439bb378321ceb99464fd68a044f6031a3e25c578387406951a1c2f5b18e797196f
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
- # Version = '20210205-155336'
3
+ # Version = '20210730-151826'
4
4
 
5
5
  require 'csv'
6
6
  require 'fileutils'
@@ -412,12 +412,11 @@ class SushiApp
412
412
  else
413
413
  @scratch_result_dir + '_temp$$'
414
414
  end
415
- hold_jid_option = if @dataset_sushi_id and parent_data_set = DataSet.find_by_id(@dataset_sushi_id.to_i) and !parent_data_set.jobs.empty?
416
- parent_data_set_job_ids = parent_data_set.jobs.map{|job| job.submit_job_id}.join(":")
417
- "#SBATCH --dependency=afterany:#{parent_data_set_job_ids}"
418
- else
419
- ''
420
- end
415
+ hold_jid_option = if @dataset_sushi_id and parent_data_set = DataSet.find_by_id(@dataset_sushi_id.to_i) and !parent_data_set.jobs.empty? and parent_data_set_job_ids = parent_data_set.jobs.map{|job| job.submit_job_id} and !parent_data_set_job_ids.join.empty?
416
+ "#SBATCH --dependency=afterany:#{parent_data_set_job_ids.join(":")}"
417
+ else
418
+ ''
419
+ end
421
420
  module_src_command = if @module_source and @modules and !@modules.empty?
422
421
  "source #{@module_source}"
423
422
  else
@@ -433,7 +432,8 @@ class SushiApp
433
432
  @logger.error("# Error in checking modules ")
434
433
  @logger.error("# Please check if all modules are correctly installed, searched #{@modules.join(",")} but only detected #{modules_with_version.join(",")}")
435
434
  @logger.error("#"*100)
436
- "exit # Please check if all modules are correctly installed, searched #{@modules.join(",")} but only detected #{modules_with_version.join(",")}"
435
+ # "exit # Please check if all modules are correctly installed, searched #{@modules.join(",")} but only detected #{modules_with_version.join(",")}"
436
+ ""
437
437
  end
438
438
  else
439
439
  ""
@@ -468,12 +468,27 @@ conda activate sushi
468
468
  EOS
469
469
  end
470
470
 
471
+ src_files = []
472
+ dest_dirs = []
473
+ greq = (copy_commands("AAA", "BBB").join =~ /g-req/)
471
474
  if @output_files
472
475
  @output_files.map{|header| next_dataset[header]}.each do |file|
473
- # in actual case, to save under /srv/gstore/
474
476
  src_file = File.basename(file)
475
477
  dest_dir = File.dirname(File.join(@gstore_dir, file))
478
+ src_files << src_file
479
+ dest_dirs << dest_dir
480
+ end
481
+ if dest_dirs.uniq.length == 1 and greq
482
+ src_file = src_files.join(" ")
483
+ dest_dir = dest_dirs.first
476
484
  @out.print copy_commands(src_file, dest_dir).join("\n"), "\n"
485
+ else
486
+ @output_files.map{|header| next_dataset[header]}.each do |file|
487
+ # in actual case, to save under /srv/gstore/
488
+ src_file = File.basename(file)
489
+ dest_dir = File.dirname(File.join(@gstore_dir, file))
490
+ @out.print copy_commands(src_file, dest_dir).join("\n"), "\n"
491
+ end
477
492
  end
478
493
  end
479
494
  @out.print <<-EOF
@@ -508,8 +523,8 @@ rm -rf #{@scratch_dir} || exit 1
508
523
  script_content = File.read(job_script)
509
524
  job_id = 0
510
525
  begin
511
- job_id = @workflow_manager.start_monitoring(job_script, @user, 0, script_content, project_number, gsub_options.join(' '), @gstore_script_dir)
512
- #job_id = @workflow_manager.start_monitoring2(job_script, script_content, @user, project_number, gsub_options.join(' '), @gstore_script_dir)
526
+ #job_id = @workflow_manager.start_monitoring(job_script, @user, 0, script_content, project_number, gsub_options.join(' '), @gstore_script_dir)
527
+ job_id = @workflow_manager.start_monitoring3(job_script, script_content, @user, project_number, gsub_options.join(' '), @gstore_script_dir)
513
528
  rescue => e
514
529
  time = Time.now.strftime("[%Y.%m.%d %H:%M:%S]")
515
530
  @logger.error("*"*50)
@@ -1,3 +1,3 @@
1
1
  module SushiFabric
2
- VERSION = "1.0.6"
2
+ VERSION = "1.1.0"
3
3
  end
data/sushi_fabric.gemspec CHANGED
@@ -19,6 +19,6 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "bundler", "~> 2.2.10"
23
23
  spec.add_development_dependency "rake"
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sushi_fabric
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Functional Genomics Center Zurich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-05 00:00:00.000000000 Z
11
+ date: 2021-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: 2.2.10
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: 2.2.10
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
- rubygems_version: 3.0.3
87
+ rubygems_version: 3.0.3.1
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: workflow manager client.