Skip to content

Commit

Permalink
format: Remove debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-tau committed Jun 7, 2024
1 parent a4f7468 commit a0d5e12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
4 changes: 1 addition & 3 deletions drishti/handlers/handle_darshan.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,12 +752,10 @@ def handler():
display_thresholds(console)
display_footer(console, insights_start_time, insights_end_time)

# Export to HTML, SVG, and CSV
input_filename = os.path.basename(args.log_path).replace('.darshan', '')
out_dir = args.export_dir if args.export_dir != "" else os.getcwd()

print(f"DEBUG: outfile_name: {input_filename}")

export_html(console, out_dir, input_filename)
export_svg(console, out_dir, input_filename)

export_csv(out_dir, input_filename, job['job']['jobid'])
19 changes: 5 additions & 14 deletions drishti/includes/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -1823,15 +1823,12 @@ def display_footer(console, insights_start_time, insights_end_time):
)
)

def export_html(console, export_dir, filename):
'''
'''

def export_html(console, export_dir, filename):
if not args.export_html:
print("DEBUG: export_html() - return")
return

os.makedirs(export_dir, exist_ok=True)
os.makedirs(export_dir, exist_ok=True) # Ensure export directory exists
filepath = os.path.join(export_dir, f"{filename}.html")

console.save_html(
Expand All @@ -1840,14 +1837,12 @@ def export_html(console, export_dir, filename):
clear=False
)

print("DEBUG: END export_html()")


def export_svg(console, export_dir, filename):
if not args.export_svg:
return

os.makedirs(export_dir, exist_ok=True)
os.makedirs(export_dir, exist_ok=True) # Ensure export directory exists
filepath = os.path.join(export_dir, f"{filename}.svg")

console.save_svg(
Expand Down Expand Up @@ -1906,14 +1901,10 @@ def export_csv(export_dir, filename, jobid=None):
for report in csv_report:
detected_issues[report] = True

# ensure dir exists
os.makedirs(export_dir, exist_ok=True)

os.makedirs(export_dir, exist_ok=True) # Ensure export directory exists
filepath = os.path.join(export_dir, f"{filename}.csv")

print(f"DEBUG: export_dir: {export_dir}")
print(f"DEBUG: filename: {filename}")
print(f"DEBUG: filepath: {filepath}")

with open(filepath, 'w') as f:
w = csv.writer(f)
w.writerow(detected_issues.keys())
Expand Down
4 changes: 0 additions & 4 deletions drishti/includes/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,3 @@
)

args = parser.parse_args()

print(f"DEBUG: log_path: {args.log_path}")
print(f"DEBUG: export_path: {args.export_dir}")
print(f"DEBUG: export_csv: {args.export_csv}")

0 comments on commit a0d5e12

Please sign in to comment.