Skip to content

Commit

Permalink
[IMP] cleans up code and removes all unused or unimportant files
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraschauer committed Aug 30, 2024
1 parent b56718c commit 39b190b
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 636 deletions.
8 changes: 3 additions & 5 deletions prospector/evaluation/analyse.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def analyse_prospector_reports(filename: str, selected_cves: str):
# Keep track of the CVEs where there is no report file
reports_not_found = []

#### Data to insert into table
# Data to insert into table
if BATCH in ["regular", "old_code"]:
results = {
"high": [],
Expand Down Expand Up @@ -620,7 +620,7 @@ def generate_checkmarks_table(input_dataset: str, selected_cves):

rule_checks = {rule: "" for rule in all_rules}
for r in matched_rules:
rule_checks[r] = "\checkmark"
rule_checks[r] = "\checkmark" # noqa: W605

row.extend([rule_checks[r] for r in all_rules])
row.extend([str(overall_exectime), str(llm_exectime)])
Expand Down Expand Up @@ -785,9 +785,7 @@ def generate_sankey_diagram(file1: str, file2: str, file3: str):
height=800,
)

output_file = (
ANALYSIS_RESULTS_PATH + f"sankey-{file1}-{file2}-{file3}.png"
)
output_file = ANALYSIS_RESULTS_PATH + f"sankey-{file1}-{file2}-{file3}.png"
# Save as PNG
write_image(fig, output_file)
print(f"Sankey diagram saved to {output_file}")
10 changes: 0 additions & 10 deletions prospector/evaluation/analyse_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@ def analyse_statistics(filename: str): # noqa: C901
avg_cc_time = sum(cc_times) / len(cc_times)
avg_total_cc_time = sum(total_cc_times) / len(total_cc_times)

# How many commits was the commit classification rule applied to?
for itm in dataset:
filepath = PROSPECTOR_REPORTS_PATH_HOST + filename + f"/{itm[0]}.json"
try:
cc_num_commits = _get_cc_num_commits(filepath)
break

except FileNotFoundError:
continue

execution_data = {
"timestamp": datetime.now().strftime("%H:%M:%S"),
"total_files_found": len(repo_times),
Expand Down
30 changes: 0 additions & 30 deletions prospector/evaluation/cloning_repos.py

This file was deleted.

266 changes: 0 additions & 266 deletions prospector/evaluation/compare.py

This file was deleted.

Loading

0 comments on commit 39b190b

Please sign in to comment.