Sha256: 54d3a49f81ef245b70c59ef6b279818d9bab88f3b4b1063f04a87184f1b4c8a2

Contents?: true

Size: 1012 Bytes

Versions: 27

Compression:

Stored size: 1012 Bytes

Contents

# == Schema Information
#
# Table name: easy_ml_settings
#
#  id            :bigint           not null, primary key
#  configuration :json
#  created_at    :datetime         not null
#  updated_at    :datetime         not null
#
require_relative "concerns/configurable"

module EasyML
  class Settings < ActiveRecord::Base
    self.table_name = "easy_ml_settings"
    include EasyML::Concerns::Configurable

    add_configuration_attributes :storage,
      :s3_access_key_id, :s3_secret_access_key,
      :s3_bucket, :s3_region, :s3_prefix, :timezone,
      :wandb_api_key

    validates :storage, inclusion: { in: %w[file s3] }, if: -> { storage.present? }

    TIMEZONES = [
      { value: "America/New_York", label: "Eastern Time" },
      { value: "America/Chicago", label: "Central Time" },
      { value: "America/Denver", label: "Mountain Time" },
      { value: "America/Los_Angeles", label: "Pacific Time" },
    ]

    def self.constants
      {
        TIMEZONES: TIMEZONES,
      }
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
easy_ml-0.2.0.pre.rc27 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc26 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc25 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc24 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc23 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc22 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc21 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc20 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc19 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc18 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc17 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc16 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc15 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc14 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc13 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc12 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc11 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc10 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc9 app/models/easy_ml/settings.rb
easy_ml-0.2.0.pre.rc8 app/models/easy_ml/settings.rb