<commit_before>module Remi
  module DataSource
    module DataStub
      def stub_row_array
        @fields.values.map do |attrib|
          stub_values[attrib[:type]].call
        end
      end

      def empty_stub_df
        self.df = Daru::DataFrame.new([], order: @fields.keys)
      end

      def stub_df
        empty_stub_df
        self.df.add_row(stub_row_array)
      end

      def stub_values
        @stub_values ||= Hash.new(->() { Faker::Hipster.word }).merge({
          string:   ->() { Faker::Hipster.word },
          number:   ->() { Faker::Number.decimal(4,4) },
          float:    ->() { Faker::Number.decimal(2,2) },
          integer:  ->() { Faker::Number.number(4) },
          date:     ->() { Faker::Date.backward(3650) },
          datetime: ->() { Faker::Time.backward(3650) },<commit_msg>FIX - Time objects were being treated as arrays when passed to parse_date<commit_after>module Remi
  module DataSource
    module DataStub
      def stub_row_array
        @fields.values.map do |attrib|
          stub_values[attrib[:type]].call
        end
      end

      def empty_stub_df
        self.df = Daru::DataFrame.new([], order: @fields.keys)
      end

      def stub_df
        empty_stub_df
        self.df.add_row(stub_row_array)
      end

      def stub_values
        @stub_values ||= Hash.new(->() { Faker::Hipster.word }).merge({
          string:   ->() { Faker::Hipster.word },
          number:   ->() { Faker::Number.decimal(4,4) },
          float:    ->() { Faker::Number.decimal(2,2) },
          integer:  ->() { Faker::Number.number(4) },
          date:     ->() { Faker::Date.backward(3650) },
          datetime: ->() { Faker::Time.backward(3650).to_datetime },
{'fraction_non_alphanumeric': 0.15034965034965034, 'fraction_numerical': 0.015151515151515152, 'mean_word_length': 2.1048824593128392, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '4870105', 'n_tokens_mistral': 580, 'n_tokens_neox': 577, 'n_words': 99}