cnvrg 1.6.27 → 1.6.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cnvrg/cli.rb +12 -29
  3. data/lib/cnvrg/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cd284862886ec5b09fd54d38793623e428fec3dbfac5fc6c46667c2e820a302
4
- data.tar.gz: 7f3cce766ef0935b737ce0e95dcce47bf827bc4ab45579887fa51b9ec4a02b55
3
+ metadata.gz: d7dee30d3b567e7e1ab181aed63426524d6f04459fe365ce5d60cc4c7671ed03
4
+ data.tar.gz: f8fcb9901d5bc06471500246a63f3ff28d5593fe6564f8cf0930d6d41342ed16
5
5
  SHA512:
6
- metadata.gz: 32562f3442ed727ab26ee6de3af75df36bd56d6c1515d653e697936c03624efa03d741610b7e960b67a7179b3f961b7d07efb71af0e3201ff15b08939aca3719
7
- data.tar.gz: 8fbaad6c29f0f7e0ae504912505f36be91825263c3cb72b2ad73df5cc7944115e605eaf3e6711b526c1cbdf9d52572c488728d62a2ce86c5ee40aa9e1a5e99b3
6
+ metadata.gz: 935d27a9023559e57694c726515846175bcd892a1906fdf058983268ba2e2b81ecc41bf8b31a689b01302cdc8afaef8dd6d5130d686857d6cfe30e4fdec3f45a
7
+ data.tar.gz: 9ebd4da0e91c62e64712453eab68c5fe7914dfc6ec5ad26aae9f6fbbf6f1cdfce8d187f7d8f8a1c0aa5f1955c6842ae317da9fca2238d20c8410c3d6c31158a3
data/lib/cnvrg/cli.rb CHANGED
@@ -1986,31 +1986,7 @@ module Cnvrg
1986
1986
  files_to_upload, upload_errors = invoke :upload_data_files,[commit, files_list: files_list],:new_branch=>new_branch, :verbose =>verbose, :force =>force, :sync =>sync, :chunk_size => chunk_size
1987
1987
 
1988
1988
  upload_size = files_to_upload + upload_errors.try(:size) rescue 0
1989
-
1990
- if files_to_upload <= 0
1991
- check = Helpers.checkmark
1992
- log_message("#{check} Data sync finished", Thor::Shell::Color::GREEN)
1993
- if total_deleted > 0
1994
- log_message("#{total_deleted} files deleted successfully.", Thor::Shell::Color::GREEN)
1995
- end
1996
-
1997
- if total_downloaded > 0
1998
- log_message("#{total_downloaded} files downloaded successfully.", Thor::Shell::Color::GREEN)
1999
- end
2000
-
2001
- if upload_errors.try(:size) > 0
2002
- log_message("#{upload_errors.try(:size)}/#{upload_size} files didn't upload:", Thor::Shell::Color::RED)
2003
- upload_errors.each do |file_hash|
2004
- log_message("#{file_hash[:absolute_path]}", Thor::Shell::Color::RED)
2005
- end
2006
- end
2007
-
2008
- if upload_errors.blank? and total_downloaded == 0 and total_deleted == 0
2009
- Cnvrg::CLI.log_message("You are up to date", Thor::Shell::Color::GREEN)
2010
- end
2011
- return
2012
- end
2013
- invoke :end_commit_data,[commit, success: true, uploaded_files: files_to_upload], :new_branch=>new_branch, :force =>force
1989
+ invoke :end_commit_data,[commit, success: true, uploaded_files: files_to_upload, sync: sync], :new_branch=>new_branch, :force =>force
2014
1990
  if tags
2015
1991
  log_message('Uploading Tags', Thor::Shell::Color::BLUE)
2016
1992
  dataset_dir = is_cnvrg_dir(Dir.pwd)
@@ -2035,8 +2011,10 @@ module Cnvrg
2035
2011
  if total_downloaded > 0
2036
2012
  log_message("#{total_downloaded} files downloaded successfully.", Thor::Shell::Color::GREEN)
2037
2013
  end
2014
+ if upload_size > 0
2015
+ log_message("#{files_to_upload}/#{upload_size} files uploaded successfully.", Thor::Shell::Color::GREEN)
2016
+ end
2038
2017
 
2039
- log_message("#{files_to_upload}/#{upload_size} files uploaded successfully.", Thor::Shell::Color::GREEN)
2040
2018
  if upload_errors.try(:size) > 0
2041
2019
  log_message("#{upload_errors.try(:size)}/#{upload_size} files didn't upload:", Thor::Shell::Color::RED)
2042
2020
  upload_errors.each do |file_hash|
@@ -2100,7 +2078,7 @@ module Cnvrg
2100
2078
  method_option :new_branch, :type => :boolean, :aliases => ["-nb"], :desc => "create new branch of commits"
2101
2079
  method_option :force, :type => :boolean, :aliases => ["-f","--force"], :default => false
2102
2080
 
2103
- def end_commit_data(commit, success: true, uploaded_files: 0)
2081
+ def end_commit_data(commit, success: true, uploaded_files: 0, sync: false)
2104
2082
  begin
2105
2083
  verify_logged_in(true)
2106
2084
  log_start(__method__, args, options)
@@ -2115,7 +2093,12 @@ module Cnvrg
2115
2093
  @dataset.revert_next_commit #removes the next commit
2116
2094
  log_message("#{check} Dataset is up to date", Thor::Shell::Color::GREEN)
2117
2095
  else
2118
- log_message("#{check} Data sync finished", Thor::Shell::Color::GREEN)
2096
+ if sync
2097
+ message = "#{check} Data sync finished"
2098
+ else
2099
+ message = "#{check} Data upload finished"
2100
+ end
2101
+ log_message(message, Thor::Shell::Color::GREEN)
2119
2102
  @dataset.remove_next_commit #takes the next commit and put it as current commit
2120
2103
  @dataset.set_partial_commit(nil)
2121
2104
  @dataset.backup_idx
@@ -2911,7 +2894,7 @@ module Cnvrg
2911
2894
  method_option :job_type, :type => :string, :aliases => ["-jt", "--job_type"], :default => nil
2912
2895
  method_option :files, :type => :string, :aliases => ["--files"], :default => nil
2913
2896
  method_option :output_dir, :type => :string, :aliases => ["--output_dir"], :default => nil
2914
- def sync(direct = true)
2897
+ def sync(direct = true)
2915
2898
  verify_logged_in(true) if direct
2916
2899
  @project = Project.new(get_project_home)
2917
2900
  log_start(__method__, args, options)
data/lib/cnvrg/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cnvrg
2
- VERSION = '1.6.27'
2
+ VERSION = '1.6.31'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cnvrg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.27
4
+ version: 1.6.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yochay Ettun
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-02-24 00:00:00.000000000 Z
13
+ date: 2020-04-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler