<commit_before>require 'earth/fuel'
class NationalTransitDatabaseRecord < ActiveRecord::Base
  self.primary_key = "name"
  self.table_name = :ntd_records
  
  belongs_to :ntd_company, :foreign_key => 'company_id', :class_name => 'NationalTransitDatabaseCompany'
  
  def self.rail_records
    where(:mode_code => NationalTransitDatabaseMode.rail_modes)
  end
  
  col :name
  col :company_id
  col :mode_code
  col :service_type
  col :vehicle_distance, :type => :float
  col :vehicle_distance_units
  col :vehicle_time, :type => :float
  col :vehicle_time_units
  col :passenger_distance, :type => :float
  col :passenger_distance_units
  col :passengers, :type => :float
  col :electricity, :type => :float
  col :electricity_units
  col :diesel, :type => :float
  col :diesel_units
  col :gasoline, :type => :float
  col :gasoline_units
  col :lpg, :type => :float
  col :lpg_units
  col :lng, :type => :float
  col :lng_units
  col :cng, :type => :float
  col :cng_units
  col :kerosene, :type => :float
  col :kerosene_units
  col :biodiesel, :type => :float
  col :biodiesel_units
  col :other_fuel, :type => :float
  col :other_fuel_units
  col :other_fuel_description

  warn_if_nulls_except(
    :electricity,
    :electricity_units,
    :diesel,
    :diesel_units,
    :lpg,
    :lpg_units,
    :lng,
    :lng_units,
    :cng,
    :cng_units,
    :kerosene,<commit_msg>Fix NationalTransitDatabaseRecord table warnings<commit_after>require 'earth/fuel'
class NationalTransitDatabaseRecord < ActiveRecord::Base
  self.primary_key = "name"
  self.table_name = :ntd_records
  
  belongs_to :ntd_company, :foreign_key => 'company_id', :class_name => 'NationalTransitDatabaseCompany'
  
  def self.rail_records
    where(:mode_code => NationalTransitDatabaseMode.rail_modes)
  end
  
  col :name
  col :company_id
  col :mode_code
  col :service_type
  col :vehicle_distance, :type => :float
  col :vehicle_distance_units
  col :vehicle_time, :type => :float
  col :vehicle_time_units
  col :passenger_distance, :type => :float
  col :passenger_distance_units
  col :passengers, :type => :float
  col :electricity, :type => :float
  col :electricity_units
  col :diesel, :type => :float
  col :diesel_units
  col :gasoline, :type => :float
  col :gasoline_units
  col :lpg, :type => :float
  col :lpg_units
  col :lng, :type => :float
  col :lng_units
  col :cng, :type => :float
  col :cng_units
  col :kerosene, :type => :float
  col :kerosene_units
  col :biodiesel, :type => :float
  col :biodiesel_units
  col :other_fuel, :type => :float
  col :other_fuel_units
  col :other_fuel_description

  warn_if_nulls_except(
    :passenger_distance,
    :passenger_distance_units,
    :electricity,
    :electricity_units,
    :diesel,
    :diesel_units,
    :gasoline,
    :gasoline_units,
    :lpg,
    :lpg_units,
    :lng,
    :lng_units,
    :cng,
    :cng_units,
    :kerosene,
{'fraction_non_alphanumeric': 0.1095320623916811, 'fraction_numerical': 0.0, 'mean_word_length': 4.098939929328622, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7653720', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1059, 'n_words': 242}