cnvrg 0.3.0 → 0.3.1
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 +4 -4
- data/lib/cnvrg/cli.rb +18 -12
- data/lib/cnvrg/dataset.rb +4 -2
- data/lib/cnvrg/project.rb +5 -4
- data/lib/cnvrg/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35ef0e50784c1333f4fa375ec78a0c968d883363
|
4
|
+
data.tar.gz: b2079022aca9ff172af33f81c1b3ee66c388bd4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dbe6889b455e7a302e6909dfb99e69b963260ed3baa4b7c78df0b7ab436ca8fe8134771f256965010c4e2c0807e6f81f8268d7c01ff0d0bcc69879e3993808b
|
7
|
+
data.tar.gz: d624f15e9347cdd1020c9a20db0e07161c0029047dfa0859c513e415bf4654a4b79ea80f0b32915be96e5d0d454c60020b8314e1a1deaa2137a7d2fae4b6a359
|
data/lib/cnvrg/cli.rb
CHANGED
@@ -831,6 +831,8 @@ module Cnvrg
|
|
831
831
|
if !download_res
|
832
832
|
exit(1)
|
833
833
|
end
|
834
|
+
Dataset.verify_cnvrgignore_exist(dataset_name,false)
|
835
|
+
|
834
836
|
|
835
837
|
|
836
838
|
check = Helpers.checkmark
|
@@ -1286,7 +1288,11 @@ module Cnvrg
|
|
1286
1288
|
compression_path = get_compression_path
|
1287
1289
|
tar_path = "#{compression_path}#{@dataset.slug}_#{commit_sha1}.tar.gz"
|
1288
1290
|
tar_files_path = "#{home_dir}/.cnvrg/tmp/#{@dataset.slug}_#{commit_sha1}.txt"
|
1289
|
-
|
1291
|
+
files_to_upload = result["added"] + result["updated_on_local"]
|
1292
|
+
if File.exist? (@dataset.local_path+"/.cnvrgignore")
|
1293
|
+
files_to_upload << ".cnvrgignore"
|
1294
|
+
end
|
1295
|
+
tar_files = (files_to_upload).join("\n")
|
1290
1296
|
File.open(tar_files_path, 'w') { |f| f.write tar_files }
|
1291
1297
|
ignore_files_path = nil
|
1292
1298
|
if !ignore_list.nil?
|
@@ -5258,17 +5264,17 @@ module Cnvrg
|
|
5258
5264
|
exit(1)
|
5259
5265
|
end
|
5260
5266
|
|
5261
|
-
if !Helpers.internet_connection?
|
5262
|
-
|
5263
|
-
|
5264
|
-
|
5265
|
-
|
5266
|
-
|
5267
|
-
|
5268
|
-
|
5269
|
-
|
5270
|
-
|
5271
|
-
end
|
5267
|
+
# if !Helpers.internet_connection?
|
5268
|
+
# wait_offline = agree "Seems like you're offline, wait until your'e back online?", Thor::Shell::Color::YELLOW
|
5269
|
+
# if wait_offline
|
5270
|
+
# say "Waiting until your'e online..", Thor::Shell::Color::BLUE
|
5271
|
+
# while !Cnvrg::Helpers.internet_connection?
|
5272
|
+
# end
|
5273
|
+
# else
|
5274
|
+
# say "you seem to be offline, please check your internet connection", Thor::Shell::Color::RED
|
5275
|
+
# exit(0)
|
5276
|
+
# end
|
5277
|
+
# end
|
5272
5278
|
|
5273
5279
|
config = YAML.load_file(File.expand_path('~')+"/.cnvrg/config.yml")
|
5274
5280
|
version_date = config.to_h[:version_last_check]
|
data/lib/cnvrg/dataset.rb
CHANGED
@@ -4,6 +4,8 @@ module Cnvrg
|
|
4
4
|
attr_reader :slug, :owner, :title, :local_path, :working_dir
|
5
5
|
|
6
6
|
RemoteURL ||= "https://cnvrg.io"
|
7
|
+
IDXParallelThreads ||= 15
|
8
|
+
|
7
9
|
|
8
10
|
def initialize(project_home)
|
9
11
|
begin
|
@@ -178,7 +180,7 @@ module Cnvrg
|
|
178
180
|
url = Cnvrg::Helpers.remote_url
|
179
181
|
"#{url}/#{self.owner}/datasets/#{self.slug}"
|
180
182
|
end
|
181
|
-
def generate_idx(list_ignore)
|
183
|
+
def generate_idx(list_ignore=nil)
|
182
184
|
if File.exists? "#{self.local_path}/.cnvrg/idx.yml"
|
183
185
|
old_idx = YAML.load_file("#{self.local_path}/.cnvrg/idx.yml")
|
184
186
|
else
|
@@ -192,7 +194,7 @@ module Cnvrg
|
|
192
194
|
list_ignore = self.get_ignore_list()
|
193
195
|
end
|
194
196
|
|
195
|
-
list
|
197
|
+
Parallel.map(list, in_threads: IDXParallelThreads) do |e|
|
196
198
|
label = e.gsub(self.local_path + "/", "")
|
197
199
|
if File.directory? e
|
198
200
|
if list_ignore.include? label
|
data/lib/cnvrg/project.rb
CHANGED
@@ -4,6 +4,8 @@ module Cnvrg
|
|
4
4
|
attr_reader :slug, :owner, :title, :local_path, :working_dir
|
5
5
|
|
6
6
|
RemoteURL ||= "https://cnvrg.io"
|
7
|
+
IDXParallelThreads ||= 15
|
8
|
+
|
7
9
|
|
8
10
|
def initialize(project_home)
|
9
11
|
begin
|
@@ -235,9 +237,8 @@ module Cnvrg
|
|
235
237
|
return true
|
236
238
|
end
|
237
239
|
def self.verify_cnvrgignore_exist(project_name,remote)
|
238
|
-
|
239
|
-
|
240
|
-
else
|
240
|
+
path = ".cnvrgignore"
|
241
|
+
if !File.exist? path
|
241
242
|
path = "#{project_name}/.cnvrgignore"
|
242
243
|
end
|
243
244
|
ignore_exits = File.exist? path
|
@@ -321,7 +322,7 @@ module Cnvrg
|
|
321
322
|
tree_idx = Hash.new(0)
|
322
323
|
list = Dir.glob("#{self.local_path}/**/*", File::FNM_DOTMATCH).reject { |x| (x =~ /\/\.{1,2}$/) or (x =~ /^#{self.local_path}\/\.cnvrg\/*/) or (x =~/^#{self.local_path}\/\.cnvrgignore.conflict*/) and not (x =~/^#{self.local_path}\/\.cnvrgignore/) }
|
323
324
|
list_ignore = self.get_ignore_list()
|
324
|
-
list
|
325
|
+
Parallel.map(list, in_threads: IDXParallelThreads) do |e|
|
325
326
|
label = e.gsub(self.local_path + "/", "")
|
326
327
|
ignore_label = label.gsub("/","//")
|
327
328
|
if list_ignore.include? ignore_label
|
data/lib/cnvrg/version.rb
CHANGED