<commit_before>require 'chef/exceptions'
require 'ruby-progressbar'
require 'supermarket/community_site'
require 'supermarket/import'

namespace :supermarket do
  desc 'Migrate data from the old community site to Supermarket'
  multitask :migrate => ['supermarket:import:all', 'supermarket:cull:all']

  namespace :import do
    #
    # Convenience method for import task boilerplate. In particular, each
    # import operation is wrapped in an ActiveRecord transaction. If the import<commit_msg>supermarket:migrate can run in parallel<commit_after>require 'chef/exceptions'
require 'ruby-progressbar'
require 'supermarket/community_site'
require 'supermarket/import'

namespace :supermarket do
  imports = [:users, :categories, :cookbooks, :deprecated_cookbooks,
             :cookbook_following, :supported_platforms, :cookbook_dependencies,
             :cookbook_collaboration].map {  |i| "import:#{i}" }
  cullings = [:users, :cookbooks, :cookbook_following, :cookbook_collaboration].
    map { |c| "cull:#{c}" }

  multitask :migrate => imports + cullings

  namespace :import do
    #
    # Convenience method for import task boilerplate. In particular, each
    # import operation is wrapped in an ActiveRecord transaction. If the import
{'fraction_non_alphanumeric': 0.09397590361445783, 'fraction_numerical': 0.0, 'mean_word_length': 4.9052132701421804, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5195816', 'n_tokens_mistral': 369, 'n_tokens_neox': 359, 'n_words': 108}