easy_ml 0.2.0.pre.rc21 → 0.2.0.pre.rc22
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 385baa11d22ec55a9c9289d728bd4364b0d1b8499f158601effccd2339654626
|
4
|
+
data.tar.gz: 95fcc5235d6d179a0c55aad21e9488631b854be9ff0986e4bb4bc503745f1498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54643fa38a5f7a9eb4b9229d10687a331d3c2841a4ed08f8fece86a43daa0bd0c7ad4eeb442592479cfe60c175e73970a8bbd76232f475d5e79cfea7e323817b
|
7
|
+
data.tar.gz: 8ea4be5cebf9c849fbc17b4e0a78d8e8b831b916ca6d9107ce4474b7e865529de4d7f560cb5e4d5cdbfad6733cd9dd1fe19605277409ca31004f8790ff5b263e
|
@@ -72,9 +72,9 @@ module EasyML
|
|
72
72
|
# Start sync in background to avoid blocking
|
73
73
|
datasource.refresh_async
|
74
74
|
|
75
|
-
redirect_to easy_ml_datasources_path
|
75
|
+
redirect_to easy_ml_datasources_path, notice: "Datasource is syncing..."
|
76
76
|
rescue ActiveRecord::RecordNotFound
|
77
|
-
redirect_to easy_ml_datasources_path
|
77
|
+
redirect_to easy_ml_datasources_path, error: "Datasource not found..."
|
78
78
|
end
|
79
79
|
|
80
80
|
private
|
@@ -93,12 +93,22 @@ module EasyML
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def set_root_dir
|
96
|
-
|
96
|
+
bump_version
|
97
|
+
write_attribute(:root_dir, default_root_dir)
|
98
|
+
end
|
99
|
+
|
100
|
+
def default_root_dir
|
101
|
+
File.join("datasets", underscored_name, version).to_s
|
97
102
|
end
|
98
103
|
|
99
104
|
def root_dir
|
100
|
-
|
101
|
-
|
105
|
+
persisted = read_attribute(:root_dir)
|
106
|
+
|
107
|
+
if persisted.present? && !persisted.blank?
|
108
|
+
EasyML::Engine.root_dir.join(persisted).to_s
|
109
|
+
else
|
110
|
+
default_root_dir
|
111
|
+
end
|
102
112
|
end
|
103
113
|
|
104
114
|
def destructively_cleanup!
|
@@ -89,9 +89,12 @@ module EasyML
|
|
89
89
|
|
90
90
|
def root_dir
|
91
91
|
persisted = read_attribute(:root_dir)
|
92
|
-
return persisted if persisted.present? && !persisted.to_s.blank?
|
93
92
|
|
94
|
-
|
93
|
+
if persisted.present? && !persisted.blank?
|
94
|
+
EasyML::Engine.root_dir.join(persisted).to_s
|
95
|
+
else
|
96
|
+
default_root_dir
|
97
|
+
end
|
95
98
|
end
|
96
99
|
|
97
100
|
def refresh_async
|
@@ -156,7 +159,7 @@ module EasyML
|
|
156
159
|
|
157
160
|
def default_root_dir
|
158
161
|
folder = name.gsub(/\s{2,}/, " ").split(" ").join("_").downcase
|
159
|
-
|
162
|
+
File.join("datasources", folder)
|
160
163
|
end
|
161
164
|
|
162
165
|
def set_root_dir
|
data/app/models/easy_ml/model.rb
CHANGED
@@ -484,11 +484,21 @@ module EasyML
|
|
484
484
|
end
|
485
485
|
|
486
486
|
def set_root_dir
|
487
|
-
write_attribute(:root_dir,
|
487
|
+
write_attribute(:root_dir, default_root_dir)
|
488
488
|
end
|
489
489
|
|
490
490
|
def root_dir
|
491
|
-
|
491
|
+
persisted = read_attribute(:root_dir)
|
492
|
+
|
493
|
+
if persisted.present? && !persisted.blank?
|
494
|
+
EasyML::Engine.root_dir.join(persisted).to_s
|
495
|
+
else
|
496
|
+
default_root_dir
|
497
|
+
end
|
498
|
+
end
|
499
|
+
|
500
|
+
def default_root_dir
|
501
|
+
File.join("models", underscored_name).to_s
|
492
502
|
end
|
493
503
|
|
494
504
|
def load_model(force: false)
|
data/lib/easy_ml/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_ml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.pre.
|
4
|
+
version: 0.2.0.pre.rc22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Shollenberger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|