<commit_before># == Schema Information
#
# Table name: feed_versions
#
#  id                     :integer          not null, primary key
#  feed_id                :integer
#  feed_type              :string
#  file                   :string
#  earliest_calendar_date :date
#  latest_calendar_date   :date
#  sha1                   :string
#  md5                    :string
#  tags                   :hstore
#  fetched_at             :datetime
#  imported_at            :datetime
#  created_at             :datetime
#  updated_at             :datetime
#  import_level           :integer          default(0)
#  url                    :string
#  file_raw               :string
#  sha1_raw               :string
#  md5_raw                :string
#
# Indexes
#
#  index_feed_versions_on_feed_type_and_feed_id  (feed_type,feed_id)
#

FactoryGirl.define do
  factory :feed_version do
    sha1 { SecureRandom.hex(32) }
    feed

    factory :feed_version_caltrain do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/f-9q9-caltrain.zip')) }
      association :feed, factory: :feed_caltrain
    end

    factory :feed_version_bart do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/f-9q9-bart.zip')) }
      association :feed, factory: :feed_bart
    end

    factory :feed_version_vta_1930705 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/vta-trip-1930705-gtfs.zip')) }
      association :feed, factory: :feed_vta
    end

    factory :feed_version_vta_1930691 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/vta-trip-1930691-gtfs.zip')) }
      association :feed, factory: :feed_vta
    end

    factory :feed_version_vta_1965654 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/vta-trip-1965654-gtfs.zip')) }
      association :feed, factory: :feed_vta
    end

    factory :feed_version_sfmta_6731593 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/sfmta-trip-6731593.zip')) }
      association :feed, factory: :feed_sfmta
    end

    factory :feed_version_sfmta_6720619 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/sfmta-trip-6720619.zip')) }
      association :feed, factory: :feed_sfmta
    end

    factory :feed_version_nycdotsiferry do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/siferry-gtfs.zip')) }
      association :feed, factory: :feed_nycdotsiferry
    end

    factory :feed_version_mtanyctbusstatenisland_trip_YU_S6_Weekday_030000_MISC_112 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/mtanyctbusstatenisland-trip-YU_S6-Weekday-030000_MISC_112.zip')) }
      association :feed, factory: :feed_mtanyctbusstatenisland
    end

    factory :feed_version_rome do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/rome-trip-754_4655513.zip')) }
      association :feed, factory: :feed_rome
    end

    factory :feed_version_example do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/example.zip')) }
      association :feed, factory: :feed_example
    end

    factory :feed_version_example_issues do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/example-issues.zip')) }
      association :feed, factory: :feed_example
    end

    factory :feed_version_example_update_add do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/example-update-add.zip')) }
    end

    factory :feed_version_example_update_delete do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/example-update-delete.zip')) }
    end

    factory :feed_version_example_trips_special_stop_times do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/example-trips-special-stop-times.zip')) }
      association :feed, factory: :feed_example
    end
  end
end
<commit_msg>FeedVersion Factory include earliest / latest_calendar_date<commit_after># == Schema Information
#
# Table name: feed_versions
#
#  id                     :integer          not null, primary key
#  feed_id                :integer
#  feed_type              :string
#  file                   :string
#  earliest_calendar_date :date
#  latest_calendar_date   :date
#  sha1                   :string
#  md5                    :string
#  tags                   :hstore
#  fetched_at             :datetime
#  imported_at            :datetime
#  created_at             :datetime
#  updated_at             :datetime
#  import_level           :integer          default(0)
#  url                    :string
#  file_raw               :string
#  sha1_raw               :string
#  md5_raw                :string
#
# Indexes
#
#  index_feed_versions_on_feed_type_and_feed_id  (feed_type,feed_id)
#

FactoryGirl.define do
  factory :feed_version do
    sha1 { SecureRandom.hex(32) }
    earliest_calendar_date '2016-01-01'
    latest_calendar_date '2017-01-01'
    feed

    factory :feed_version_caltrain do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/f-9q9-caltrain.zip')) }
      association :feed, factory: :feed_caltrain
    end

    factory :feed_version_bart do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/f-9q9-bart.zip')) }
      association :feed, factory: :feed_bart
    end

    factory :feed_version_vta_1930705 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/vta-trip-1930705-gtfs.zip')) }
      association :feed, factory: :feed_vta
    end

    factory :feed_version_vta_1930691 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/vta-trip-1930691-gtfs.zip')) }
      association :feed, factory: :feed_vta
    end

    factory :feed_version_vta_1965654 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/vta-trip-1965654-gtfs.zip')) }
      association :feed, factory: :feed_vta
    end

    factory :feed_version_sfmta_6731593 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/sfmta-trip-6731593.zip')) }
      association :feed, factory: :feed_sfmta
    end

    factory :feed_version_sfmta_6720619 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/sfmta-trip-6720619.zip')) }
      association :feed, factory: :feed_sfmta
    end

    factory :feed_version_nycdotsiferry do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/siferry-gtfs.zip')) }
      association :feed, factory: :feed_nycdotsiferry
    end

    factory :feed_version_mtanyctbusstatenisland_trip_YU_S6_Weekday_030000_MISC_112 do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/mtanyctbusstatenisland-trip-YU_S6-Weekday-030000_MISC_112.zip')) }
      association :feed, factory: :feed_mtanyctbusstatenisland
    end

    factory :feed_version_rome do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/rome-trip-754_4655513.zip')) }
      association :feed, factory: :feed_rome
    end

    factory :feed_version_example do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/example.zip')) }
      association :feed, factory: :feed_example
    end

    factory :feed_version_example_issues do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/example-issues.zip')) }
      association :feed, factory: :feed_example
    end

    factory :feed_version_example_update_add do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/example-update-add.zip')) }
    end

    factory :feed_version_example_update_delete do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/example-update-delete.zip')) }
    end

    factory :feed_version_example_trips_special_stop_times do
      file { File.open(Rails.root.join('spec/support/example_gtfs_archives/example-trips-special-stop-times.zip')) }
      association :feed, factory: :feed_example
    end
  end
end

{'fraction_non_alphanumeric': 0.09766691486721271, 'fraction_numerical': 0.029784065524944156, 'mean_word_length': 2.99553792761527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2218671', 'n_tokens_mistral': 2869, 'n_tokens_neox': 2687, 'n_words': 412}