Skip to content

Commit

Permalink
fixes in validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanbez committed Apr 12, 2024
1 parent 63237ae commit b98fdd4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
11 changes: 1 addition & 10 deletions explorer/dxt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,9 +1033,6 @@ def generate_spatiality_plot(self, file, report, log_type):

self.generated_files[file_id].append(output_file)

else:
self.logger.warning("no data to generate spatiality plots")

else:
self.logger.error(
"failed to generate the spatiality plots (error %s)",
Expand Down Expand Up @@ -1084,9 +1081,6 @@ def generate_phase_plot(self, file, report, log_type):

self.generated_files[file_id].append(output_file)

else:
self.logger.warning("no data to generate I/O phase plots")

else:
self.logger.error(
"failed to generate I/O phase plots (error %s)",
Expand Down Expand Up @@ -1131,16 +1125,13 @@ def generate_ost_usage_operation_plot(self, file, report, log_type):
if os.path.exists(output_file):
self.logger.info("SUCCESS: {}".format(output_file))
else:
self.logger.warning("no data to generate interactive plots")
self.logger.warning("no data to generate interactive OST usage operation plots")

if self.args.browser:
webbrowser.open("file://{}".format(output_file), new=2)

self.generated_files[file_id].append(output_file)

else:
self.logger.warning("no data to generate interactive OST usage operation plots")

else:
self.logger.error(
"failed to generate interactive OST usage operation plots (error %s)",
Expand Down
18 changes: 9 additions & 9 deletions explorer/plots/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,8 @@ def determine_legend(fig, column):
sOutput, sError = s.communicate()

if s is None or s.returncode == 0:
drishti_output = open(file + ".drishti", "w")
drishti_output.write(sOutput.decode())
drishti_output = open(file + ".drishti", "w")
drishti_output.write(sOutput.decode())

output_doc = BeautifulSoup()
output_doc.append(output_doc.new_tag("body"))
Expand All @@ -918,15 +918,15 @@ def determine_legend(fig, column):
with open(options["output"], "r") as html_file:
output_doc.body.extend(BeautifulSoup(html_file.read(), "html.parser").body)

with open(file + ".darshan.html", "r") as html_file:
output_doc.head.extend(BeautifulSoup(html_file.read(), "html.parser").head)
with open(file + ".darshan.html", "r") as html_file:
output_doc.head.extend(BeautifulSoup(html_file.read(), "html.parser").head)

with open(file + ".darshan.html", "r") as html_file:
output_doc.body.extend(BeautifulSoup(html_file.read(), "html.parser").body)
with open(file + ".darshan.html", "r") as html_file:
output_doc.body.extend(BeautifulSoup(html_file.read(), "html.parser").body)

output_doc.style.append(BeautifulSoup("pre { padding-left: 60px;}", "html.parser"))
output_doc.style.append(BeautifulSoup("pre { padding-left: 60px;}", "html.parser"))

with open(options["output"], "w") as output_file:
output_file.write(str(output_doc))
with open(options["output"], "w") as output_file:
output_file.write(str(output_doc))
else:
sys.exit(os.EX_SOFTWARE)

0 comments on commit b98fdd4

Please sign in to comment.