<commit_before># coding: utf-8 

module CartoDB
  module Import
    module Util
      def temporary_filename(prefix="")
        tf = Tempfile.new(prefix)
        tempname = tf.path 
        tf.close! 
        return tempname
      end
    
      # datatype that is passed around
      def to_import_hash
        {
          :import_from_file => @import_from_file,
          :db_configuration => @db_configuration,
          :db_connection    => @db_connection,
          :append_to_table  => @append_to_table,
          :force_name       => @force_name,
          :suggested_name   => @suggested_name,
          :ext              => @ext,
          :path             => @path,
          :python_bin_path  => @python_bin_path,
          :psql_bin_path    => @psql_bin_path,
          :entries          => @entries,
          :runlog           => @runlog,
          :import_type      => @import_type
          :data_import_id   => @data_import_id
        }
      end  
          
      # updates instance variables with return values from decompressors, preprocessors and loaders<commit_msg>working with mostly complete state_machine for import<commit_after># coding: utf-8 

module CartoDB
  module Import
    module Util
      def temporary_filename(prefix="")
        tf = Tempfile.new(prefix)
        tempname = tf.path 
        tf.close! 
        return tempname
      end
    
      # datatype that is passed around
      def to_import_hash
        {
          :import_from_file => @import_from_file,
          :db_configuration => @db_configuration,
          :db_connection    => @db_connection,
          :append_to_table  => @append_to_table,
          :force_name       => @force_name,
          :suggested_name   => @suggested_name,
          :ext              => @ext,
          :path             => @path,
          :python_bin_path  => @python_bin_path,
          :psql_bin_path    => @psql_bin_path,
          :entries          => @entries,
          :runlog           => @runlog,
          :import_type      => @import_type,
          :data_import_id   => @data_import_id
        }
      end  
          
      # updates instance variables with return values from decompressors, preprocessors and loaders
{'fraction_non_alphanumeric': 0.08337088778729157, 'fraction_numerical': 0.0009013068949977468, 'mean_word_length': 1.6974483596597814, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 31, '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': '5146169', 'n_tokens_mistral': 640, 'n_tokens_neox': 629, 'n_words': 137}