<commit_before>require 'v1/standard_dataset'
require 'v1/repository'

namespace :v1 do

  # NOTE: Any task that makes calls to Tire, must pass the :environment symbol in the task()
  # call so the Tire initializer gets called.

  desc "Tests river by posting test doc to CouchDB and verifying it in ElasticSearch"
  task :test_river => :environment do
    V1::StandardDataset.test_river
  end

  desc "Re-creates ElasticSearch index, schema, river"
  task :recreate_search_index => :environment do
    V1::StandardDataset.recreate_index!
  end

  desc "Re-creates ElasticSearch index, schema, river and re-populates index with test dataset"
  task :recreate_search_env => :environment do
    V1::StandardDataset.recreate_env!
  end

  desc "Creates new ElasticSearch river on 'items'"
  task :recreate_river do
    V1::StandardDataset.recreate_river!
  end

  desc "Deletes CouchDB River on 'items'"
  task :delete_river do
    V1::StandardDataset.delete_river!
  end

  desc "Gets ElasticSearch river status"
  task :river_status do
    puts V1::StandardDataset.river_status
  end

  desc "Gets ElasticSearch search cluster status"
  task :search_status do
    puts V1::StandardDataset.service_status
  end<commit_msg>Update rake task names<commit_after>require 'v1/standard_dataset'
require 'v1/repository'

namespace :v1 do

  # NOTE: Any task that makes calls to Tire, must pass the :environment symbol in the task()
  # call so the Tire initializer gets called.

  desc "Tests river by posting test doc to CouchDB and verifying it in ElasticSearch"
  task :test_river => :environment do
    V1::StandardDataset.test_river
  end

  desc "Re-creates ElasticSearch index, schema, river"
  task :recreate_search_index => :environment do
    V1::StandardDataset.recreate_index!
  end

  desc "Re-creates ElasticSearch index, schema, river and re-populates index with test dataset"
  task :recreate_search_env => :environment do
    V1::StandardDataset.recreate_env!
  end

  desc "Creates new ElasticSearch river"
  task :recreate_river do
    V1::StandardDataset.recreate_river!
  end

  desc "Deletes ElasticSearch river"
  task :delete_river do
    V1::StandardDataset.delete_river!
  end

  desc "Gets ElasticSearch river status"
  task :river_status do
    puts V1::StandardDataset.river_status
  end

  desc "Gets ElasticSearch search cluster status"
  task :search_status do
    puts V1::StandardDataset.service_status
  end
{'fraction_non_alphanumeric': 0.067461949814891, 'fraction_numerical': 0.008227067050596462, 'mean_word_length': 4.380530973451328, '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': '2103788', 'n_tokens_mistral': 753, 'n_tokens_neox': 750, 'n_words': 250}