Skip to content

Commit

Permalink
Merge pull request #990 from NREL/integrity_checks_caching
Browse files Browse the repository at this point in the history
Integrity checks caching
  • Loading branch information
shorowit committed Sep 26, 2022
2 parents 6820973 + ad74300 commit 0a1b17c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/integrity_checks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ def integrity_check(project_dir_name, housing_characteristics_dir = 'housing_cha
deps = []
unprocessed_parameters.each do |p|
tsvpath = File.join(project_dir_name, housing_characteristics_dir, "#{p}.tsv")
tsvfile = TsvFile.new(tsvpath, nil)
tsvfile = tsvfiles[p]
if tsvfile.nil?
tsvfile = TsvFile.new(tsvpath, nil)
tsvfiles[p] = tsvfile
end
tsvfile.dependency_cols.keys.each do |d|
next if deps.include?(d)

Expand Down Expand Up @@ -68,8 +72,11 @@ def integrity_check(project_dir_name, housing_characteristics_dir = 'housing_cha

tsvpath = File.join(project_dir_name, housing_characteristics_dir, "#{parameter_name}.tsv")
check_file_exists(tsvpath, nil)
tsvfile = TsvFile.new(tsvpath, nil)
tsvfiles[parameter_name] = tsvfile
tsvfile = tsvfiles[parameter_name]
if tsvfile.nil?
tsvfile = TsvFile.new(tsvpath, nil)
tsvfiles[parameter_name] = tsvfile
end

# Dependencies not yet processed? Skip until a subsequent pass
skip = false
Expand Down

0 comments on commit 0a1b17c

Please sign in to comment.