NREL / buildstockbatch

Other
21 stars 14 forks source link

Skip post-processing of upgrade directories that fail to list #417

Closed lathanh closed 10 months ago

lathanh commented 10 months ago

Background

Problem

Trying to list an "empty" upgrade directory during post-processing (which can happen if the upgrade was invalid) fails with an exception for Google Cloud Storage.

Fix

Treat a failure to list an upgrade directory during post-processing the same as when the directory is empty (i.e., skip it).

Alternatives considered

  1. Create a fake directory: This causes the directory listing to also include the fake directory itself, causing a different error (trying to read the directory as if it's a parquet file), and thus a change to also list only parquet files in the directory (i.e., requires a hack to handle the hack).

Checklist

Not all may apply

github-actions[bot] commented 10 months ago

File Coverage
All files 85% :white_check_mark:
base.py 90% :white_check_mark:
eagle.py 77% :white_check_mark:
exc.py 57% :white_check_mark:
local.py 70% :white_check_mark:
postprocessing.py 84% :white_check_mark:
utils.py 91% :white_check_mark:
cloud/docker_base.py 0% :x:
sampler/base.py 79% :white_check_mark:
sampler/downselect.py 33% :white_check_mark:
sampler/precomputed.py 93% :white_check_mark:
sampler/residential_quota.py 61% :white_check_mark:
test/test_docker.py 33% :white_check_mark:
test/test_validation.py 97% :white_check_mark:
workflow_generator/base.py 90% :white_check_mark:
workflow_generator/commercial.py 53% :white_check_mark:
workflow_generator/residential_hpxml.py 86% :white_check_mark:

Minimum allowed coverage is 33%

Generated by :monkey: cobertura-action against 15036e1c8d0d43e42f042cd60a82c23f0af717e2

lathanh commented 10 months ago

Like in the other PR, I added the checklist from our PR template (which should be working right again). It helps me to make sure we've sorted all things that can come up. If something doesn't apply to this PR, just ~cross it out~ and check the box.

Done! Let me know if there's anything else.