mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-17 09:46:25 -07:00
chore: make sure CSV and File objects are properly namespaced
This commit is contained in:
parent
a99ed183a1
commit
ed1310f93c
34 changed files with 327 additions and 27 deletions
|
|
@ -26,7 +26,7 @@ module Dashboard
|
|||
def student_count(filepath:, dese_id:, year:)
|
||||
@students ||= {}
|
||||
if @students.count == 0
|
||||
CSV.parse(File.read(filepath), headers: true).map do |row|
|
||||
::CSV.parse(::File.read(filepath), headers: true).map do |row|
|
||||
academic_year = row["Academic Year"]
|
||||
school_id = row["DESE ID"].to_i
|
||||
total = row["Total"].gsub(",", "").to_i
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ module Dashboard
|
|||
class Loader
|
||||
def self.load_data(filepath:)
|
||||
admin_data_values = []
|
||||
CSV.parse(File.read(filepath), headers: true) do |row|
|
||||
::CSV.parse(::File.read(filepath), headers: true) do |row|
|
||||
score = likert_score(row:)
|
||||
next unless valid_likert_score(likert_score: score)
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ module Dashboard
|
|||
@teachers ||= {}
|
||||
@years_with_data ||= Set.new
|
||||
if @teachers.count == 0
|
||||
CSV.parse(File.read(filepath), headers: true).map do |row|
|
||||
::CSV.parse(::File.read(filepath), headers: true).map do |row|
|
||||
academic_year = row["Academic Year"]
|
||||
@years_with_data << academic_year
|
||||
school_id = row["DESE ID"].to_i
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue