Add automated data cleaning. Modify SurveyItemValues class to use regex

instead of hard coded values.  Produce a clean csv and a csv with all
the removed values and columns with reason for removal. Add script for
running cleaning for each project
This commit is contained in:
rebuilt 2023-05-02 20:08:34 -07:00
parent 5cf5a5f383
commit 4509c157fa
20 changed files with 1148 additions and 154 deletions

View file

@ -40,7 +40,7 @@ RSpec.describe SurveyItem, type: :model do
let(:early_education_survey_item1) { create(:early_education_survey_item, scale:) }
context 'when no responses exist' do
it 'it returns back a regular survey' do
expect(SurveyItem.survey_type_for_grade(school, academic_year, 0)).to eq :regular
expect(SurveyItem.survey_type_for_grade(school, academic_year, 0)).to eq :standard
end
end
@ -60,7 +60,7 @@ RSpec.describe SurveyItem, type: :model do
create(:survey_item_response, school:, academic_year:, grade: 0)
end
it 'reports the survey type as regular' do
expect(SurveyItem.survey_type_for_grade(school, academic_year, 0)).to eq :regular
expect(SurveyItem.survey_type_for_grade(school, academic_year, 0)).to eq :standard
end
end
end