<commit_before>require 'coveralls'
Coveralls.wear_merged!('rails')

require 'pry'

# Require support classes in spec/support and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each do |helper|
  require helper
end

# Require and include helper modules
# in feature/support/helpers and its subdirectories.
Dir[Rails.root.join("features/support/helpers/**/*.rb")].each do |helper|
  require helper
  # Only include _helper.rb methods
  if /_helper.rb/ === helper
    helper_name = "FindingaidsFeatures::#{helper.camelize.demodulize.split('.').first}"
    Cucumber::Rails::World.send(:include, helper_name.constantize)
  end
end<commit_msg>Individually tag indexed EAD fixtures to limit overhead<commit_after>require 'coveralls'
Coveralls.wear_merged!('rails')

require 'pry'

# Require support classes in spec/support and its subdirectories.
Dir[Rails.root.join("spec/support/**/*.rb")].each do |helper|
  require helper
end

# Require and include helper modules
# in feature/support/helpers and its subdirectories.
Dir[Rails.root.join("features/support/helpers/**/*.rb")].each do |helper|
  require helper
  # Only include _helper.rb methods
  if /_helper.rb/ === helper
    helper_name = "FindingaidsFeatures::#{helper.camelize.demodulize.split('.').first}"
    Cucumber::Rails::World.send(:include, helper_name.constantize)
  end
end

Before do
  EadIndexer::Indexer.delete_all
  @indexer = EadIndexer::Indexer.new
end

# Index fixtures where tagged
Before('@bloch') do
  @indexer.index('spec/fixtures/fales/bloch.xml')
end
Before('@berol') do
  @indexer.index('spec/fixtures/fales/berol.xml')
end
Before('@bytsura') do
  @indexer.index('spec/fixtures/fales/bytsura.xml')
end
Before('@heti') do
  @indexer.index('spec/fixtures/fales/heti.xml')
end
Before('@bickceem') do
  @indexer.index('spec/fixtures/fales/bickceem.xml')
end
Before('@bartlett') do
  @indexer.index('spec/fixtures/fales/bartlett.xml')
end
Before('@oconor') do
  @indexer.index('spec/fixtures/fales/oconor.xml')
end
Before('@washsquarephoto') do
  @indexer.index('spec/fixtures/fales/washsquarephoto.xml')
end
Before('@kopit_revised') do
  @indexer.index('spec/fixtures/fales/kopit_revised.xml')
end
Before('@photos_107') do
  @indexer.index('spec/fixtures/tamwag/PHOTOS.107-ead.xml')
end
Before('@photos_114') do
  @indexer.index('spec/fixtures/tamwag/photos_114.xml')
end
Before('@OH_002') do
  @indexer.index('spec/fixtures/tamwag/OH.002-ead.xml')
end
{'fraction_non_alphanumeric': 0.1552642359688652, 'fraction_numerical': 0.007374027038099139, 'mean_word_length': 5.529411764705882, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, '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': '1855098', 'n_tokens_mistral': 909, 'n_tokens_neox': 877, 'n_words': 158}