mirror of
https://github.com/edcommonwealth/Dashboard.git
synced 2026-03-07 21:38:14 -08:00
chore: get cleaner running
This commit is contained in:
parent
4874c2c88c
commit
da99e220c1
5 changed files with 105 additions and 67 deletions
|
|
@ -1,3 +1,3 @@
|
|||
module Dashboard
|
||||
VERSION = "0.1.10"
|
||||
VERSION = "0.1.11"
|
||||
end
|
||||
|
|
|
|||
36
lib/tasks/clean.rake
Normal file
36
lib/tasks/clean.rake
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
namespace :dashboard do
|
||||
namespace :clean do
|
||||
# These tasks must be run in their respective project so the correct schools are in the database
|
||||
desc "clean ecp data"
|
||||
task ecp: :environment do
|
||||
input_filepath = Rails.root.join("tmp", "data", "ecp_data", "raw")
|
||||
output_filepath = Rails.root.join("tmp", "data", "ecp_data", "clean")
|
||||
log_filepath = Rails.root.join("tmp", "data", "ecp_data", "removed")
|
||||
puts "running cleaner"
|
||||
Cleaner.new(input_filepath:, output_filepath:, log_filepath:).clean
|
||||
end
|
||||
|
||||
desc "clean prepped data"
|
||||
task prepped: :environment do
|
||||
input_filepath = Rails.root.join("tmp", "data", "ecp_data", "prepped")
|
||||
output_filepath = Rails.root.join("tmp", "data", "ecp_data", "prepped", "clean")
|
||||
log_filepath = Rails.root.join("tmp", "data", "ecp_data", "prepped", "removed")
|
||||
Cleaner.new(input_filepath:, output_filepath:, log_filepath:).clean
|
||||
end
|
||||
desc "clean mciea data"
|
||||
task mciea: :environment do
|
||||
input_filepath = Rails.root.join("tmp", "data", "mciea_data", "raw")
|
||||
output_filepath = Rails.root.join("tmp", "data", "mciea_data", "clean")
|
||||
log_filepath = Rails.root.join("tmp", "data", "mciea_data", "removed")
|
||||
Cleaner.new(input_filepath:, output_filepath:, log_filepath:).clean
|
||||
end
|
||||
|
||||
desc "clean rpp data"
|
||||
task rpp: :environment do
|
||||
input_filepath = Rails.root.join("tmp", "data", "rpp_data", "raw")
|
||||
output_filepath = Rails.root.join("tmp", "data", "rpp_data", "clean")
|
||||
log_filepath = Rails.root.join("tmp", "data", "rpp_data", "removed")
|
||||
Cleaner.new(input_filepath:, output_filepath:, log_filepath:).clean
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue