easy_ml 0.2.0.pre.rc20 → 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: 06b638a3c3ae41b11f0c3e00c7234d72b4c9c894516477904cd624c5b7424d7a
4
- data.tar.gz: a3cf8f09f78239281bc18600c42dcb7796a9853d3e584329597c9330c6d56769
3
+ metadata.gz: 385baa11d22ec55a9c9289d728bd4364b0d1b8499f158601effccd2339654626
4
+ data.tar.gz: 95fcc5235d6d179a0c55aad21e9488631b854be9ff0986e4bb4bc503745f1498
5
5
  SHA512:
6
- metadata.gz: 80cae9ce9830c1500e25ef78a48a7a0265a585c258e0165aa9156bbebedc608e15252a39b0338373c4cb47cc30998b3e3a85ca922fb70be1494b4f5b72661bef
7
- data.tar.gz: a21481353f7b9cea048fa503bb60d04eced87bb107c6a282cc69645ec5ec93cfd682f7dd506f0f7d8add7870a2bfef6aa8df5b3779111ffae57d977f2d50fb20
6
+ metadata.gz: 54643fa38a5f7a9eb4b9229d10687a331d3c2841a4ed08f8fece86a43daa0bd0c7ad4eeb442592479cfe60c175e73970a8bbd76232f475d5e79cfea7e323817b
7
+ data.tar.gz: 8ea4be5cebf9c849fbc17b4e0a78d8e8b831b916ca6d9107ce4474b7e865529de4d7f560cb5e4d5cdbfad6733cd9dd1fe19605277409ca31004f8790ff5b263e
@@ -93,12 +93,22 @@ module EasyML
93
93
  end
94
94
 
95
95
  def set_root_dir
96
- write_attribute(:root_dir, root_dir)
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
- bump_version
101
- EasyML::Engine.root_dir.join("datasets").join(underscored_name).join(version).to_s
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
- default_root_dir
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
- EasyML::Engine.root_dir.join("datasources").join(folder)
162
+ File.join("datasources", folder)
160
163
  end
161
164
 
162
165
  def set_root_dir
@@ -484,11 +484,21 @@ module EasyML
484
484
  end
485
485
 
486
486
  def set_root_dir
487
- write_attribute(:root_dir, root_dir)
487
+ write_attribute(:root_dir, default_root_dir)
488
488
  end
489
489
 
490
490
  def root_dir
491
- EasyML::Engine.root_dir.join("models").join(underscored_name).to_s
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)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EasyML
4
- VERSION = "0.2.0-rc20"
4
+ VERSION = "0.2.0-rc22"
5
5
 
6
6
  module Version
7
7
  end
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.rc20
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-08 00:00:00.000000000 Z
11
+ date: 2025-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord