diff options
Diffstat (limited to 'lib/import.rb')
-rw-r--r-- | lib/import.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/import.rb b/lib/import.rb index 831efcb..cdf96e3 100644 --- a/lib/import.rb +++ b/lib/import.rb @@ -2,12 +2,20 @@ module OpenTox class Import + # Import datasets from the data folder, create and validate models + # @return [Array<OpenTox::Model::Validation>] Validated models def self.public_data - # TODO clear database? + models = [] Dir[File.join(File.dirname(__FILE__),"..","data/*csv")].each do |f| $logger.debug f - Model::Validation.from_csv_file f + m = Model::Validation.from_csv_file f + $logger.debug "#{f} ID: #{m.id.to_s}" + m.crossvalidations.each do |cv| + $logger.debug cv.statistics + end + models << m end + models end end end |