<commit_before># This file contains all the record creation needed to seed the database with its default values.


# Load Flinders University
flinders = Institution.where({
            :id => 1,
            :code => 'flinders'
          }).first_or_create!

flinders.name = 'Flinders University'
flinders.nickname = 'Flinders'
flinders.country = 'Australia'
flinders.state = 'SA'

flinders.save


# Load Adelaide University
adelaide = Institution.where({
               :id => 2,
               :code => 'adelaide'
           }).first_or_create!

adelaide.name = 'Adelaide University'
adelaide.nickname = 'Adelaide'
adelaide.country = 'Australia'
adelaide.state = 'SA'

adelaide.save

# Load Uni SA
uni_sa = Institution.where({
               :id => 3,
               :code => 'uni_sa'
           }).first_or_create!

uni_sa.name = 'University of South Australia'
uni_sa.nickname = 'UniSA'
uni_sa.country = 'Australia'
uni_sa.state = 'SA'

uni_sa.save

InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "HY1", :name => "Half Year 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "HY2", :name => "Half Year 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "NS", :name => "Non Semester").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "NS1", :name => "Non Semester 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "NS2", :name => "Non Semester 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "S1", :name => "Semester 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "S2", :name => "Semester 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "TH1", :name => "Thesis 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "TH2", :name => "Thesis 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "HY1", :name => "Half Year 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "HY2", :name => "Half Year 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "NS", :name => "Non Semester").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "NS1", :name => "Non Semester 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "NS2", :name => "Non Semester 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "S1", :name => "Semester 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "S2", :name => "Semester 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "TH1", :name => "Thesis 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "TH2", :name => "Thesis 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "SU", :name => "Summer School").first_or_create

InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "S1", :name => "Semester 1").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "S2", :name => "Semester 2").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Term1", :name => "Term 1").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Term2", :name => "Term 2").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Term3", :name => "Term 3").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Term4", :name => "Term 4").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Tri1", :name => "Trimester 1").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Tri2", :name => "Trimester 2").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Wi", :name => "Winter School").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Su", :name => "Summer School").first_or_create

InstitutionSemester.where(:institution => uni_sa, :year => 2014, :code => "SP4", :name => "Study Period 4").first_or_create
InstitutionSemester.where(:institution => uni_sa, :year => 2014, :code => "SP5", :name => "Study Period 5").first_or_create
InstitutionSemester.where(:institution => uni_sa, :year => 2014, :code => "SP6", :name => "Study Period 6").first_or_create<commit_msg>Fix missing UniSA study periods from seed data<commit_after># This file contains all the record creation needed to seed the database with its default values.


# Load Flinders University
flinders = Institution.where({
            :id => 1,
            :code => 'flinders'
          }).first_or_create!

flinders.name = 'Flinders University'
flinders.nickname = 'Flinders'
flinders.country = 'Australia'
flinders.state = 'SA'

flinders.save


# Load Adelaide University
adelaide = Institution.where({
               :id => 2,
               :code => 'adelaide'
           }).first_or_create!

adelaide.name = 'Adelaide University'
adelaide.nickname = 'Adelaide'
adelaide.country = 'Australia'
adelaide.state = 'SA'

adelaide.save

# Load Uni SA
uni_sa = Institution.where({
               :id => 3,
               :code => 'uni_sa'
           }).first_or_create!

uni_sa.name = 'University of South Australia'
uni_sa.nickname = 'UniSA'
uni_sa.country = 'Australia'
uni_sa.state = 'SA'

uni_sa.save

InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "HY1", :name => "Half Year 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "HY2", :name => "Half Year 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "NS", :name => "Non Semester").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "NS1", :name => "Non Semester 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "NS2", :name => "Non Semester 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "S1", :name => "Semester 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "S2", :name => "Semester 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "TH1", :name => "Thesis 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "TH2", :name => "Thesis 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "HY1", :name => "Half Year 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "HY2", :name => "Half Year 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "NS", :name => "Non Semester").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "NS1", :name => "Non Semester 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "NS2", :name => "Non Semester 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "S1", :name => "Semester 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "S2", :name => "Semester 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "TH1", :name => "Thesis 1").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2013, :code => "TH2", :name => "Thesis 2").first_or_create
InstitutionSemester.where(:institution => flinders, :year => 2014, :code => "SU", :name => "Summer School").first_or_create

InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "S1", :name => "Semester 1").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "S2", :name => "Semester 2").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Term1", :name => "Term 1").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Term2", :name => "Term 2").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Term3", :name => "Term 3").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Term4", :name => "Term 4").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Tri1", :name => "Trimester 1").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Tri2", :name => "Trimester 2").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Wi", :name => "Winter School").first_or_create
InstitutionSemester.where(:institution => adelaide, :year => 2014, :code => "Su", :name => "Summer School").first_or_create

InstitutionSemester.where(:institution => uni_sa, :year => 2014, :code => "SP1", :name => "Study Period 1").first_or_create
InstitutionSemester.where(:institution => uni_sa, :year => 2014, :code => "SP2", :name => "Study Period 2").first_or_create
InstitutionSemester.where(:institution => uni_sa, :year => 2014, :code => "SP3", :name => "Study Period 3").first_or_create
InstitutionSemester.where(:institution => uni_sa, :year => 2014, :code => "SP4", :name => "Study Period 4").first_or_create
InstitutionSemester.where(:institution => uni_sa, :year => 2014, :code => "SP5", :name => "Study Period 5").first_or_create
InstitutionSemester.where(:institution => uni_sa, :year => 2014, :code => "SP6", :name => "Study Period 6").first_or_create
{'fraction_non_alphanumeric': 0.1730372408371819, 'fraction_numerical': 0.038125184238970225, 'mean_word_length': 5.583441138421733, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 283, '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': '5139165', 'n_tokens_mistral': 3699, 'n_tokens_neox': 3268, 'n_words': 792}