<commit_before>require File.dirname(__FILE__) + '/../../../../../catissue/migration/helpers/test_case'
require File.dirname(__FILE__) + '/../../helpers/test_case'
require File.dirname(__FILE__) + '/seed'

module Galena
  module Tissue
    module MigrationTestCase
      include CaTissue::MigrationTestCase, TestCase
    
      def setup
        super(FIXTURES)
      end
      
      def create_migrator(fixture, opts={})
        # The fixture config directory.
        dir = File.join(CONF_DIR, fixture.to_s)
        # The required field heading => caTissue mapping file.
        opts[:mapping] ||= File.expand_path('fields.yaml', dir)
        # The optional caTissue property => default value file.
        dfile = File.expand_path('defaults.yaml', dir)
        opts[:defaults] ||= dfile if File.exists?(dfile)
        # The optional input value => caTissue value file.
        ffile = File.expand_path('values.yaml', dir)
        opts[:filters] ||= ffile if File.exists?(ffile)
        # The optional shims.
        sfile = File.expand_path("#{fixture}.rb", SHIMS_DIR)
        opts[:shims] ||= sfile if File.exists?(sfile)
        super
      end
      
      private
      
      # The migration input data directory.
      FIXTURES = File.join(Galena::ROOT_DIR, 'data')
      
      # The config directory.
      CONF_DIR = File.join(Galena::ROOT_DIR, 'conf', 'migration')
      
      # The shims directory.
      SHIMS_DIR = File.join(Galena::ROOT_DIR, 'lib', 'galena')
    end
  end
end<commit_msg>Push conf migration directory up.<commit_after>require File.dirname(__FILE__) + '/../../../../../catissue/migration/helpers/test_case'
require File.dirname(__FILE__) + '/../../helpers/test_case'
require File.dirname(__FILE__) + '/seed'

module Galena
  module Tissue
    module MigrationTestCase
      include CaTissue::MigrationTestCase, TestCase
    
      def setup
        super(FIXTURES)
      end
      
      def create_migrator(fixture, opts={})
        # The fixture config directory.
        dir = File.join(CONF_DIR, fixture.to_s)
        # The required field heading => caTissue mapping file.
        opts[:mapping] ||= File.expand_path('fields.yaml', dir)
        # The optional caTissue property => default value file.
        dfile = File.expand_path('defaults.yaml', dir)
        opts[:defaults] ||= dfile if File.exists?(dfile)
        # The optional input value => caTissue value file.
        ffile = File.expand_path('values.yaml', dir)
        opts[:filters] ||= ffile if File.exists?(ffile)
        # The optional shims.
        sfile = File.expand_path("#{fixture}.rb", SHIMS_DIR)
        opts[:shims] ||= sfile if File.exists?(sfile)
        super
      end
      
      private
      
      # The migration input data directory.
      FIXTURES = File.join(Galena::ROOT_DIR, 'data')
      
      # The config directory.
      CONF_DIR = File.join(Galena::ROOT_DIR, 'conf')
      
      # The shims directory.
      SHIMS_DIR = File.join(Galena::ROOT_DIR, 'lib', 'galena')
    end
  end
end
{'fraction_non_alphanumeric': 0.12586949320967208, 'fraction_numerical': 0.0, 'mean_word_length': 2.475258918296893, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1462134', 'n_tokens_mistral': 911, 'n_tokens_neox': 908, 'n_words': 218}