Skip to content

Commit

Permalink
feat: sort failed table by time
Browse files Browse the repository at this point in the history
  • Loading branch information
BoYanZh committed Oct 4, 2024
1 parent f3f45f8 commit 3b40174
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions joint_teapot/utils/joj3.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import bisect
import csv
import enum
import json
import os
from datetime import datetime
Expand Down Expand Up @@ -145,7 +144,7 @@ def update_failed_table_from_score_file(


def write_failed_table_into_file(data: List[List[str]], table_file_path: str) -> None:
data = sorted(data, key=lambda x: x[1])
data.sort(key=lambda x: datetime.strptime(x[0], "%Y-%m-%d %H:%M"), reverse=True)
text = "|date|repository|failure|\n"
text += "|----|----|----|\n"
for row in data:
Expand Down

0 comments on commit 3b40174

Please sign in to comment.