<commit_before>$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'sidekiq/ffmpeg'

require 'tapp'

$spec_dir = File.dirname(File.expand_path(__FILE__))

RSpec.configure do |config|
  config.order = :random

  config.before(:each) do
    Sidekiq::Worker.clear_all
  end

  # config.before(:suite) do
    # puts "Starting redis for testing at localhost:9736..."
    # `redis-server #{$spec_dir}/redis-test.conf`
    # Sidekiq.configure_server do |sidekiq_config|
      # sidekiq_config.redis = { url: "redis://localhost:9736", namespace: "sidekiq-ffmpeg" }
    # end
    # Sidekiq.configure_client do |sidekiq_config|
      # sidekiq_config.redis = { url: "redis://localhost:9736", namespace: "sidekiq-ffmpeg" }
    # end
  # end

  # config.after(:suite) do
    # processes = `ps -A -o pid,command | grep [r]edis-test`.split($/)
    # pids = processes.map { |process| process.split(" ")[0] }
    # puts "Killing test redis server..."
    # pids.each { |pid| Process.kill("TERM", pid.to_i) }
    # system("rm -f #{$dir}/dump.rdb #{$dir}/dump-cluster.rdb")
  # end
end

def sample_dir
  File.expand_path("../samples", __FILE__)
end<commit_msg>Delete commentize code from spec_helper<commit_after>$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'sidekiq/ffmpeg'

require 'tapp'

$spec_dir = File.dirname(File.expand_path(__FILE__))

RSpec.configure do |config|
  config.order = :random

  config.before(:each) do
    Sidekiq::Worker.clear_all
  end
end

def sample_dir
  File.expand_path("../samples", __FILE__)
end
{'fraction_non_alphanumeric': 0.15901745313510018, 'fraction_numerical': 0.008403361344537815, 'mean_word_length': 3.852664576802508, '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': '6231794', 'n_tokens_mistral': 575, 'n_tokens_neox': 559, 'n_words': 109}