Skip to content

Commit

Permalink
Merge pull request #10744 from NREL/HandleRegressionIssueOnGHA
Browse files Browse the repository at this point in the history
Some pre-release operations
  • Loading branch information
Myoldmopar authored Sep 16, 2024
2 parents fc72883 + d11ea45 commit 48aa15b
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 39 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/release_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,10 @@ jobs:
# fail-fast: Default is true, switch to false to allow one platform to fail and still run others
fail-fast: false
matrix:
name: [20, 22, 24]
include:
- name: 20
os: ubuntu-20.04
test_key: ubuntu2004
- name: 22
os: ubuntu-22.04
- os: ubuntu-22.04
test_key: ubuntu2204
- name: 24
os: ubuntu-24.04
- os: ubuntu-24.04
test_key: ubuntu2404

steps:
Expand Down
16 changes: 16 additions & 0 deletions release/Deprecation.in.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ <h3>Geometry Transformation</h3>
this capability are now considered potentially deprecated.
</p>

<h3>EP-Launch (Classic)</h3>
<p>
The EP-Launch tool that has been packaged with EnergyPlus for decades is tabbed for potential removal in a
future release. A new Python-based cross-platform version of EP-Launch has been developed, tested, and
released, but not included in the EnergyPlus installation, thus limiting adoption. With 24.2, we are packaging
that new tool with EnergyPlus installations, and will await feedback from users. Based on this, the classic
EP-Launch tool will be placed on the deprecation path.
</p>

<h2>Level 2 Deprecation Status</h2>

<h3>32-bit Windows Builds</h3>
Expand Down Expand Up @@ -171,6 +180,13 @@ <h3>Outdated Mac Builds</h3>
Mac 10.15 builds will not be provided after the release of 23.2.
</p>

<h3>EP-Compare</h3>
<p>
The EP-Compare utility has been removed from the EnergyPlus install package. The program had issues which
had not been reported, hinting that it was not being used. The code and binaries have been archived at
<a href="https://github.com/JasonGlazer/ep-compare">https://github.com/JasonGlazer/ep-compare</a>.
</p>

<hr>

<footer>
Expand Down
9 changes: 8 additions & 1 deletion scripts/dev/build_regression_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

from sys import argv
from os import path
from sys import argv, exit

summary_input_md_file = argv[1]
summary_output_js_file = argv[2]
Expand All @@ -63,6 +64,12 @@
github_run_id = argv[5]
artifact_url = argv[6]

if not path.exists(summary_input_md_file):
print("Regression script shows failure exit code, but could not find summary file.")
print("This generally indicates that the regression script had an unhandled failure.")
print("Check the 'Run Regressions' GitHub Action step above for more helpful information")
exit(1)

with open(summary_input_md_file) as md:
md_contents = md.read()

Expand Down
89 changes: 59 additions & 30 deletions scripts/dev/gha_regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class RegressionManager:
def __init__(self):
self.root_index_files_no_diff = []
self.root_index_files_diffs = []
self.root_index_files_failed = []
self.diffs_by_idf = defaultdict(list)
self.diffs_by_type = defaultdict(list)
self.summary_results = {}
Expand Down Expand Up @@ -243,6 +244,11 @@ def bundle_root_index_html(self, header_info: list[str]) -> str:
diff_content = ""
for d in self.root_index_files_diffs:
diff_content += f"""<a href="{d}/index.html" class="list-group-item list-group-item-action">{d}</a>\n"""
num_failed = len(self.root_index_files_failed)
nfs = 's' if num_failed == 0 or num_failed > 1 else ''
failed_content = ""
for nf in self.root_index_files_failed:
failed_content += f"""<li class="list-group-item">{nf}</li>\n"""

# set up diff type listing
diff_type_keys = sorted(self.diffs_by_type.keys())
Expand Down Expand Up @@ -370,6 +376,24 @@ def bundle_root_index_html(self, header_info: list[str]) -> str:
</div>
</div>
<div class="panel-group">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#failed">{num_failed} File{nfs} Failed During Regression Processing</a>
</h4>
</div>
<div id="failed" class="panel-collapse collapse">
<div class="panel-body">
<ul class="list-group">
{failed_content}
</ul>
</div>
</div>
</div>
</div>
<hr>
<h2>Summary by Diff Type</h1>
Expand Down Expand Up @@ -446,37 +470,42 @@ def check_all_regressions(self, base_testfiles: Path, mod_testfiles: Path, bundl
modified = mod_testfiles / baseline.name
if not modified.exists():
continue # TODO: Should we warn that it is missing?
entry, diffs = self.single_file_regressions(baseline, modified)
if diffs:
self.root_index_files_diffs.append(baseline.name)
try:
entry, diffs = self.single_file_regressions(baseline, modified)
if diffs:
self.root_index_files_diffs.append(baseline.name)
any_diffs = True
potential_diff_files = baseline.glob("*.*.*") # TODO: Could try to get this from the regression tool
target_dir_for_this_file_diffs = bundle_root / baseline.name
if potential_diff_files:
if target_dir_for_this_file_diffs.exists():
rmtree(target_dir_for_this_file_diffs)
target_dir_for_this_file_diffs.mkdir()
index_contents_this_file = ""
for potential_diff_file in potential_diff_files:
copy(potential_diff_file, target_dir_for_this_file_diffs)
diff_file_with_html = target_dir_for_this_file_diffs / (potential_diff_file.name + '.html')
if potential_diff_file.name.endswith('.htm'):
# already a html file, just upload the raw contents but renamed as ...htm.html
copy(potential_diff_file, diff_file_with_html)
else:
# it's not an HTML file, wrap it inside an HTML wrapper in a temp file and send it
contents = potential_diff_file.read_text()
wrapped_contents = self.single_diff_html(contents)
diff_file_with_html.write_text(wrapped_contents)
index_contents_this_file += self.regression_row_in_single_test_case_html(potential_diff_file.name)
index_file = target_dir_for_this_file_diffs / 'index.html'
index_this_file = self.single_test_case_html(index_contents_this_file)
index_file.write_text(index_this_file)
else:
self.root_index_files_no_diff.append(baseline.name)
so_far = ' Diffs! ' if any_diffs else 'No diffs'
if entry_num % 40 == 0:
print(f"On file #{entry_num}/{len(entries)} ({baseline.name}), Diff status so far: {so_far}")
except Exception as e:
any_diffs = True
potential_diff_files = baseline.glob("*.*.*") # TODO: Could try to get this from the regression tool
target_dir_for_this_file_diffs = bundle_root / baseline.name
if potential_diff_files:
if target_dir_for_this_file_diffs.exists():
rmtree(target_dir_for_this_file_diffs)
target_dir_for_this_file_diffs.mkdir()
index_contents_this_file = ""
for potential_diff_file in potential_diff_files:
copy(potential_diff_file, target_dir_for_this_file_diffs)
diff_file_with_html = target_dir_for_this_file_diffs / (potential_diff_file.name + '.html')
if potential_diff_file.name.endswith('.htm'):
# already a html file, just upload the raw contents but renamed as ...htm.html
copy(potential_diff_file, diff_file_with_html)
else:
# it's not an HTML file, wrap it inside an HTML wrapper in a temp file and send it
contents = potential_diff_file.read_text()
wrapped_contents = self.single_diff_html(contents)
diff_file_with_html.write_text(wrapped_contents)
index_contents_this_file += self.regression_row_in_single_test_case_html(potential_diff_file.name)
index_file = target_dir_for_this_file_diffs / 'index.html'
index_this_file = self.single_test_case_html(index_contents_this_file)
index_file.write_text(index_this_file)
else:
self.root_index_files_no_diff.append(baseline.name)
so_far = ' Diffs! ' if any_diffs else 'No diffs'
if entry_num % 40 == 0:
print(f"On file #{entry_num}/{len(entries)} ({baseline.name}), Diff status so far: {so_far}")
print(f"Regression run *failed* trying to process file: {baseline.name}; reason: {e}")
self.root_index_files_failed.append(baseline.name)
meta_data = [
f"Regression time stamp in UTC: {datetime.now(UTC)}",
f"Regression time stamp in Central Time: {datetime.now(ZoneInfo('America/Chicago'))}",
Expand Down

0 comments on commit 48aa15b

Please sign in to comment.