cnvrg 1.11.2 → 1.11.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70906f4870c9aa2b3457673212893d09e6b5f22e15a5dc4c3b0cc2115e74d8d9
4
- data.tar.gz: ff9de0565cf2c81102c68a21154af1f97d843e65d51fc8eb69f3a490b64bb9a3
3
+ metadata.gz: 5b5e5904880441ee1b4610eb69e2d3d5c74e0e58f4f7d1dbd0e1547de0c47e9c
4
+ data.tar.gz: 37b7b8c6f82b00ca93ccc8a323c84653e2c83757008c57c04d5a98c32bcad2de
5
5
  SHA512:
6
- metadata.gz: d839249d813d8004c9d00553f81273e890d7beb3bfab4bb65b64453f459bd6e4c366c59b35cee2773716e2c26f6f5b30223937837e088fe964e98a60b242c6e3
7
- data.tar.gz: f7cac4b24a2f7fc275e28dd03b2fad4b7374dd52c648dd84f36652d6e7bd61f24e834aa89b1f826ac39e7680aa7cbfc6ca1564bc3611fdfe53dfd650368d7319
6
+ metadata.gz: 8a5d6540f9da9ab77321435d5f4ece63010faf6d0ce05a76ce938236eaa6cd4c1853aa004f732313d69b644b66df50da505b9c55a4fc165a6e353f7e48c414c9
7
+ data.tar.gz: 4f9f90f9f465db06e62a2f25fe84161b0a0994afb68d9d7ff4604959f3627bdbea20eead733fa50942e5a93191d445b010f7b152211c9948b746e69e8c4e839f
@@ -896,10 +896,12 @@ module Cnvrg
896
896
  return
897
897
  end
898
898
 
899
+
899
900
  if only_tree
900
- success = Dataset.clone_tree(commit: commit, dataset_home: dataset_home)
901
- return if success
901
+ Dataset.clone_tree(commit: commit, dataset_home: dataset_home)
902
+ return
902
903
  end
904
+
903
905
  commit = response["result"]["commit"]
904
906
  files_count = response["result"]["file_count"]
905
907
  files = @files.get_clone_chunk(commit: commit)
@@ -911,6 +913,7 @@ module Cnvrg
911
913
  :total => files_count,
912
914
  :autofinish => true)
913
915
 
916
+ Dataset.clone_tree(commit: commit, dataset_home: dataset_home, progressbar: progressbar)
914
917
 
915
918
  while files['keys'].length > 0
916
919
  Cnvrg::Logger.log_info("download multiple files, #{downloaded_files.size} files downloaded")
@@ -1905,7 +1908,7 @@ module Cnvrg
1905
1908
  log_message("Remove dir in order to clone #{project_name}", Thor::Shell::Color::RED)
1906
1909
  exit(1)
1907
1910
  end
1908
-
1911
+
1909
1912
  end
1910
1913
  clone_resp = Project.clone_dir(slug, owner, project_name,git)
1911
1914
  project_home = Dir.pwd + "/" + project_name
@@ -471,22 +471,32 @@ module Cnvrg
471
471
  response.to_json
472
472
  end
473
473
 
474
- def self.clone_tree(commit: 'latest', dataset_home: nil)
474
+ def self.clone_tree(commit: 'latest', dataset_home: nil, progressbar: nil)
475
475
  @dataset = Cnvrg::Dataset.new(dataset_home)
476
476
  @files = Cnvrg::Datafiles.new(@dataset.owner, @dataset.slug, dataset: @dataset)
477
477
  trees = @files.get_trees(commit: commit)
478
478
  return false if trees.nil?
479
- pb = ProgressBar.create(:title => "Download Progress",
480
- :progress_mark => '=',
481
- :format => "%b>>%i| %p%% %t",
482
- :starting_at => 0,
483
- :total => trees.size,
484
- :autofinish => true)
479
+
480
+ if progressbar
481
+ pb = progressbar
482
+ pb.total += trees.size
483
+ else
484
+ pb = ProgressBar.create(
485
+ :title => "Download Progress",
486
+ :progress_mark => '=',
487
+ :format => "%b>>%i| %p%% %t",
488
+ :starting_at => 0,
489
+ :total => trees.size,
490
+ :autofinish => true
491
+ )
492
+ end
493
+
485
494
  trees.each do |tree|
486
495
  pb.progress += 1
487
496
  @files.download_dir(dataset_home, tree)
488
497
  end
489
- pb.finish
498
+
499
+ pb.finish unless progressbar
490
500
  @dataset.write_success
491
501
  true
492
502
  end
@@ -3,7 +3,7 @@ module Cnvrg
3
3
 
4
4
  extend self
5
5
  def parallel_threads
6
- 5
6
+ 15
7
7
  end
8
8
 
9
9
  def self.parallel_options
@@ -1,3 +1,3 @@
1
1
  module Cnvrg
2
- VERSION = '1.11.2'
2
+ VERSION = '1.11.3'
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.11.2
4
+ version: 1.11.3
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-11-06 00:00:00.000000000 Z
13
+ date: 2020-11-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler