easy_ml 0.2.0.pre.rc16 → 0.2.0.pre.rc18

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: 5f3d19fc3f953f9fd5b484a9ff911bf7fa91a1d461b61b764e1fb560b2fbed05
4
- data.tar.gz: 48a4c22264e0985b0b453937864584b91d0ecbf579ba642ad2e57c400e75e4e9
3
+ metadata.gz: 5756619381485dd3d8610ec98f4e8ec059631294ccc66ff0cd28644dbf421140
4
+ data.tar.gz: 8d7cbb411f2c73c3ef0fa7bdf3cd1c5d57095c427a0b12438a170e8bd8aa73e5
5
5
  SHA512:
6
- metadata.gz: 22e87cb5e4aaee1ff589e79480f4f916b845e392e0978a01c2a094ace1f4141070d7c1f7e819e5020a45b71a830e3b5b8b49ff04e9857e6b23ddbbefef53b782
7
- data.tar.gz: a8fa4a5e78f2ea622404840058978c2fbd438275358fb897d27b2c71b76861d73f2adb9576336fa85fa08ba8e51085080819d8d9a66bc05f88a5e4f94b1d9bbd
6
+ metadata.gz: 1c2e32c59da8de236e38ed08d5742ac813cfd9c568cbf77b1cd9d90c76248dc7e2a8af5747fd0b2b87aeeee1e015af5ea24ca02662d26e3a8e3b5d6d732c5c8b
7
+ data.tar.gz: cd817219954f021b66b14471e396517546c1f757d3122b8328d2ff41e8ef2af343dc0df7411f69c2ffcc0b6d3de23f53806e8f5a0df5437d2b303ee0a381af58
data/Rakefile ADDED
@@ -0,0 +1,84 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sprockets/railtie"
4
+ require "bundler/gem_tasks"
5
+ require "rspec/core/rake_task"
6
+ require "resque/tasks"
7
+
8
+ RSpec::Core::RakeTask.new(:spec)
9
+
10
+ require "rubocop/rake_task"
11
+
12
+ RuboCop::RakeTask.new
13
+
14
+ task default: %i[spec rubocop]
15
+
16
+ Bundler.require(:default)
17
+
18
+ # Load your gem's code
19
+ require_relative "lib/easy_ml"
20
+
21
+ # Load the annotate tasks
22
+ require "annotate/annotate_models"
23
+
24
+ task :environment do
25
+ require "combustion"
26
+ require "sprockets"
27
+ Combustion.path = "spec/internal"
28
+ Combustion.initialize! :active_record do |config|
29
+ config.assets = ActiveSupport::OrderedOptions.new # Stub to avoid errors
30
+ config.assets.enabled = false # Set false since assets are handled by Vite
31
+ end
32
+ EasyML::Engine.eager_load!
33
+ end
34
+
35
+ namespace :easy_ml do
36
+ task annotate_models: :environment do
37
+ model_dir = File.expand_path("app/models", EasyML::Engine.root)
38
+ $LOAD_PATH.unshift(model_dir) unless $LOAD_PATH.include?(model_dir)
39
+
40
+ AnnotateModels.do_annotations(
41
+ is_rake: true,
42
+ model_dir: [EasyML::Engine.root.join("app/models/easy_ml").to_s],
43
+ root_dir: [EasyML::Engine.root.join("app/models/easy_ml").to_s],
44
+ include_modules: true, # Include modules/namespaces in the annotation
45
+ )
46
+ end
47
+
48
+ task :create_test_migrations do
49
+ require "combustion"
50
+ require "rails/generators"
51
+ require_relative "lib/easy_ml/railtie/generators/migration/migration_generator"
52
+
53
+ db_files = Dir.glob(EasyML::Engine.root.join("spec/internal/db/migrate/**/*"))
54
+
55
+ FileUtils.rm(db_files)
56
+ Rails::Generators.invoke("easy_ml:migration", [], { destination_root: EasyML::Engine.root.join("spec/internal") })
57
+ end
58
+ end
59
+
60
+ task :environment do
61
+ # Force the application to load (Rails or standalone app setup)
62
+ require File.expand_path("config/environment", __dir__)
63
+ end
64
+
65
+ # Ensure resque:work depends on :environment
66
+ namespace :resque do
67
+ desc "Start a Resque worker"
68
+ task :easy_ml => [:preload, :setup] do
69
+ require "resque"
70
+
71
+ begin
72
+ worker = Resque::Worker.new
73
+ rescue Resque::NoQueueError
74
+ abort "set QUEUE env var, e.g. $ QUEUE=critical,high rake resque:work"
75
+ end
76
+
77
+ worker.prepare
78
+ worker.log "Starting worker #{worker}"
79
+ worker.work(ENV["INTERVAL"] || 5) # interval, will block
80
+ end
81
+ end
82
+
83
+ task "resque:work" => :environment
84
+ task "resque:workers" => :environment
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EasyML
4
- VERSION = "0.2.0-rc16"
4
+ VERSION = "0.2.0-rc18"
5
5
 
6
6
  module Version
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_ml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre.rc16
4
+ version: 0.2.0.pre.rc18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Shollenberger
@@ -437,6 +437,7 @@ executables: []
437
437
  extensions: []
438
438
  extra_rdoc_files: []
439
439
  files:
440
+ - Rakefile
440
441
  - app/.vite/manifest-assets.json
441
442
  - app/.vite/manifest.json
442
443
  - app/controllers/easy_ml/application_controller.rb
@@ -587,6 +588,7 @@ files:
587
588
  - bin/rspec
588
589
  - bin/setup
589
590
  - bin/vite
591
+ - config/initializers/inflections.rb
590
592
  - config/initializers/resque.rb
591
593
  - config/resque-pool.yml
592
594
  - config/routes.rb
@@ -624,7 +626,6 @@ files:
624
626
  - lib/easy_ml/engine.rb
625
627
  - lib/easy_ml/feature_store.rb
626
628
  - lib/easy_ml/features.rb
627
- - lib/easy_ml/initializers/inflections.rb
628
629
  - lib/easy_ml/logging.rb
629
630
  - lib/easy_ml/predict.rb
630
631
  - lib/easy_ml/railtie/generators/migration/migration_generator.rb