<commit_before>require "sequel"

module Communard
  class Context

    attr_reader :configuration

    def initialize(configuration)
      @configuration = configuration
    end

    def connect(opts = options)
      connection = ::Sequel.connect(opts)
      connection.loggers = [logger]
      connection
    end

    def generate_migration(name: nil)
      fail ArgumentError, "Name is required" if name.to_s == ""
      require "fileutils"<commit_msg>Set sql_log_level to :debug, and log warn duration to 1 second<commit_after>require "sequel"

module Communard
  class Context

    attr_reader :configuration

    def initialize(configuration)
      @configuration = configuration
    end

    def connect(opts = options)
      connection = ::Sequel.connect(opts)
      connection.loggers = [logger]
      connection.sql_log_level = :debug
      connection.log_warn_duration = 1
      connection
    end

    def generate_migration(name: nil)
      fail ArgumentError, "Name is required" if name.to_s == ""
      require "fileutils"
{'fraction_non_alphanumeric': 0.07625482625482626, 'fraction_numerical': 0.0019305019305019305, 'mean_word_length': 3.1646586345381524, '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': '5736775', 'n_tokens_mistral': 290, 'n_tokens_neox': 279, 'n_words': 81}