sushi_fabric 0.9.6 → 0.9.7

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
- SHA1:
3
- metadata.gz: 326d811109da5893c3ac6ea35f946f18849e1bb4
4
- data.tar.gz: adce9f2299a8b16217cfd715f82ad0f894f3b0d9
2
+ SHA256:
3
+ metadata.gz: 8ca5afb9de9e23912a2d514c547ff22d2edaf0a6c440e3663a0ac3fce59933f9
4
+ data.tar.gz: 7a906efa08a1bd3ee1b33dd02ff9a4350f241042626120278b720b3b3294d013
5
5
  SHA512:
6
- metadata.gz: 9369616e25ddabc40f335f5490bb925591cb52f642e6326cccfbe2205bc807be81983e1f530993ae0256488f3903fc3b3c47e09a2a6f0d261e93e475f712921e
7
- data.tar.gz: fedae1c8626fb161831a5e2989c9aeab0cccf54459d09996339f1005322908a4a368326804fec7cee52639fd43272f71d3703de4180640ad3aebe52514ea04a8
6
+ metadata.gz: 482274611996c4e8c2d483088d1bcd8966d6136f849f7b77782d5ac0834556a56682fc2049f8c70da3aa48131bfa71ae13322a8e001252d4744d76787d9c2a23
7
+ data.tar.gz: 561434d611bc97fe9e30a035db0f3e3b71cbec89dc767f2531e2bf1b03905030364cf1bd833a0c432cad0d184a87a6552ae90430fe03c47f272611799d35cdea
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
- # Version = '20200409-110502'
3
+ # Version = '20200703-164839'
4
4
 
5
5
  require 'csv'
6
6
  require 'fileutils'
@@ -759,28 +759,14 @@ rm -rf #{@scratch_dir} || exit 1
759
759
  if mock
760
760
  make_dummy_files
761
761
  end
762
- copy_inputdataset_parameter_jobscripts
763
762
 
764
- # job submittion
765
- gstore_job_script_paths = []
766
- @job_scripts.each_with_index do |job_script, i|
767
- if job_id = submit(job_script, mock)
768
- @job_ids << job_id
769
- print "Submit job #{File.basename(job_script)} job_id=#{job_id}"
770
- gstore_job_script_paths << File.join(@gstore_script_dir, File.basename(job_script))
771
- end
772
- end
773
-
774
- puts
775
- print 'job scripts: '
776
- p @job_scripts
777
763
  print 'result dataset: '
778
764
  p @result_dataset
779
765
 
780
766
  # copy application data to gstore
781
767
  @next_dataset_tsv_path = save_next_dataset_as_tsv
782
768
 
783
- if !@job_ids.empty? and @dataset_sushi_id and dataset = DataSet.find_by_id(@dataset_sushi_id.to_i)
769
+ if @dataset_sushi_id and dataset = DataSet.find_by_id(@dataset_sushi_id.to_i)
784
770
  data_set_arr = []
785
771
  headers = []
786
772
  rows = []
@@ -805,20 +791,46 @@ rm -rf #{@scratch_dir} || exit 1
805
791
  unless @off_bfabric_registration
806
792
  if next_dataset = DataSet.find_by_id(@next_dataset_id)
807
793
  next_dataset.register_bfabric(bfabric_application_number: @next_dataset_bfabric_application_number)
794
+ if next_dataset.workunit_id
795
+ @job_scripts.each do |job_script|
796
+ open(job_script, "a") do |out|
797
+ out.puts "module load Dev/Python"
798
+ out.puts "WORKUNIT_ID=#{next_dataset.workunit_id}"
799
+ out.puts "update_resource_size -w $WORKUNIT_ID"
800
+ end
801
+ end
802
+ end
808
803
  end
809
804
  end
805
+ end
806
+ end
807
+ copy_inputdataset_parameter_jobscripts
808
+
809
+ # job submittion
810
+ gstore_job_script_paths = []
811
+ @job_scripts.each_with_index do |job_script, i|
812
+ if job_id = submit(job_script, mock)
813
+ @job_ids << job_id
814
+ print "Submit job #{File.basename(job_script)} job_id=#{job_id}"
815
+ gstore_job_script_paths << File.join(@gstore_script_dir, File.basename(job_script))
816
+ end
817
+ end
818
+
819
+ puts
820
+ print 'job scripts: '
821
+ p @job_scripts
810
822
 
811
- # save job and dataset relation in Sushi DB
812
- job_ids.each_with_index do |job_id, i|
813
- new_job = Job.new
814
- new_job.submit_job_id = job_id.to_i
815
- new_job.script_path = gstore_job_script_paths[i]
816
- new_job.next_dataset_id = @next_dataset_id
817
- new_job.save
818
- new_job.data_set.jobs << new_job
819
- new_job.data_set.save
820
- end
821
823
 
824
+ unless @job_ids.empty? or NO_ROR
825
+ # save job and dataset relation in Sushi DB
826
+ job_ids.each_with_index do |job_id, i|
827
+ new_job = Job.new
828
+ new_job.submit_job_id = job_id.to_i
829
+ new_job.script_path = gstore_job_script_paths[i]
830
+ new_job.next_dataset_id = @next_dataset_id
831
+ new_job.save
832
+ new_job.data_set.jobs << new_job
833
+ new_job.data_set.save
822
834
  end
823
835
  end
824
836
  copy_nextdataset
@@ -1,3 +1,3 @@
1
1
  module SushiFabric
2
- VERSION = "0.9.6"
2
+ VERSION = "0.9.7"
3
3
  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: 0.9.6
4
+ version: 0.9.7
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: 2020-04-09 00:00:00.000000000 Z
11
+ date: 2020-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
- rubyforge_project:
88
- rubygems_version: 2.6.14
87
+ rubygems_version: 3.0.3
89
88
  signing_key:
90
89
  specification_version: 4
91
90
  summary: workflow manager client.