Skip to content

Commit a0d5e12

Browse files
committed
format: Remove debug statements
1 parent a4f7468 commit a0d5e12

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

drishti/handlers/handle_darshan.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -752,12 +752,10 @@ def handler():
752752
display_thresholds(console)
753753
display_footer(console, insights_start_time, insights_end_time)
754754

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

758-
print(f"DEBUG: outfile_name: {input_filename}")
759-
760759
export_html(console, out_dir, input_filename)
761760
export_svg(console, out_dir, input_filename)
762-
763761
export_csv(out_dir, input_filename, job['job']['jobid'])

drishti/includes/module.py

+5-14
Original file line numberDiff line numberDiff line change
@@ -1823,15 +1823,12 @@ def display_footer(console, insights_start_time, insights_end_time):
18231823
)
18241824
)
18251825

1826-
def export_html(console, export_dir, filename):
1827-
'''
1828-
'''
18291826

1827+
def export_html(console, export_dir, filename):
18301828
if not args.export_html:
1831-
print("DEBUG: export_html() - return")
18321829
return
18331830

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

18371834
console.save_html(
@@ -1840,14 +1837,12 @@ def export_html(console, export_dir, filename):
18401837
clear=False
18411838
)
18421839

1843-
print("DEBUG: END export_html()")
1844-
18451840

18461841
def export_svg(console, export_dir, filename):
18471842
if not args.export_svg:
18481843
return
18491844

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

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

1909-
# ensure dir exists
1910-
os.makedirs(export_dir, exist_ok=True)
1904+
1905+
os.makedirs(export_dir, exist_ok=True) # Ensure export directory exists
19111906
filepath = os.path.join(export_dir, f"{filename}.csv")
19121907

1913-
print(f"DEBUG: export_dir: {export_dir}")
1914-
print(f"DEBUG: filename: {filename}")
1915-
print(f"DEBUG: filepath: {filepath}")
1916-
19171908
with open(filepath, 'w') as f:
19181909
w = csv.writer(f)
19191910
w.writerow(detected_issues.keys())

drishti/includes/parser.py

-4
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,3 @@
126126
)
127127

128128
args = parser.parse_args()
129-
130-
print(f"DEBUG: log_path: {args.log_path}")
131-
print(f"DEBUG: export_path: {args.export_dir}")
132-
print(f"DEBUG: export_csv: {args.export_csv}")

0 commit comments

Comments
 (0)