mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
It's possible for admin data likert score values to be above 5. If that happens, we
cap the likert score at 5. This was happening already at the scraper level but it's also now being done by the admin data loader for safety. Also make sure to just update admin data instead of deleting and reloading all values each load. Add tests to confirm this behavior
This commit is contained in:
parent
abe7a8804c
commit
30285efd69
4 changed files with 190 additions and 2 deletions
|
|
@ -152,12 +152,12 @@ namespace :data do
|
|||
|
||||
desc 'load admin_data'
|
||||
task load_admin_data: :environment do
|
||||
AdminDataValue.delete_all
|
||||
original_count = AdminDataValue.count
|
||||
Dir.glob(Rails.root.join('data', 'admin_data', 'dese', '*.csv')).each do |filepath|
|
||||
puts "=====================> Loading data from csv at path: #{filepath}"
|
||||
Dese::Loader.load_data filepath:
|
||||
end
|
||||
puts "=====================> Completed loading #{AdminDataValue.count} survey responses"
|
||||
puts "=====================> Completed loading #{AdminDataValue.count - original_count} admin data values"
|
||||
end
|
||||
|
||||
desc 'load students'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue