<commit_before><commit_msg>task to fix old end_dates in items<commit_after>desc "Set end_date of items"
task :done_date => :environment do
  Version.find_each do |v|
    if v.modifications.include? 'lane_id'
      if v.versioned_id > 0
        item = Item.find(v.versioned_id)
        puts item.id.to_s + item.title
        item.end_date = v.created_at.to_date
        item.save
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08866995073891626, 'fraction_numerical': 0.0024630541871921183, 'mean_word_length': 2.7, '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': '779458', 'n_tokens_mistral': 143, 'n_tokens_neox': 142, 'n_words': 36}