<commit_before>teacher = User.new
["red", "orange", "yellow", "green"].each do |color|
  clazz = Portal::Clazz.create(:name => color, :class_word => color)
end<commit_msg>built db/seeds for 1 teacher, 4 classes, and 50 students for each class<commit_after>site_district = Portal::District.find_or_create_by_name(APP_CONFIG[:site_district])
site_district.description = "This is a virtual district used as a default for Schools, Teachers, Classes and Students that don't belong to any other districts."
site_district.save!
site_school = Portal::School.find_or_create_by_name_and_district_id(APP_CONFIG[:site_school], site_district.id)
site_school.description = "This is a virtual school used as a default for Teachers, Classes and Students that don't belong to any other schools."
site_school.save!
# Make a User
teacher_user = User.create!(:login => 'teacher',
  :first_name => 'Valerie', :last_name => 'Frizzle',
  :email => '<EMAIL>',
  :password => "password", :password_confirmation => "password"){|u| u.skip_notifications = true}
# Give the teacher a role of 'member'
teacher_user.add_role('member')
teacher_user.save!
# Make a Portal::Teacher with the user's id
teacher = Portal::Teacher.create!(:user_id => teacher_user.id)
site_school.portal_teachers << teacher
# Make Portal::Clazzes with the teacher's id
["red", "green", "blue", "yellow"].each do |color|
  clazz = Portal::Clazz.create!(:name => color, :teacher_id => teacher.id, :class_word => color)
  # Make 50 users
  (1..50).each do |num|
    u = User.create!(:login => "#{color}#{num}",
    :first_name             => "#{color}#{num}",
    :email                  => <EMAIL>",
    :password               => <PASSWORD>}",
    :password_confirmation  => "#{<PASSWORD>}#{num}"){|u| u.skip_notifications = true}
    # Make a student with the user's id
    student = Portal::Student.create!(:user_id => u.id)
    # Append the class to the student's classes
    student.clazzes << clazz
    student.save!
    site_school.add_member student
  end
end
{'fraction_non_alphanumeric': 0.1427860696517413, 'fraction_numerical': 0.004477611940298508, 'mean_word_length': 4.664788732394366, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 25, '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': '1293371', 'n_tokens_mistral': 660, 'n_tokens_neox': 631, 'n_words': 178}