Skip to content

Commit

Permalink
Merge pull request #7 from theodoreniu/dev
Browse files Browse the repository at this point in the history
Improved pypi versions
  • Loading branch information
theodoreniu authored Feb 18, 2025
2 parents 37dec44 + 4eb6f3b commit 13edab7
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
4 changes: 2 additions & 2 deletions libs/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

load_dotenv()

app_version = "1.0.0"
graphrag_version = "1.1.2"
app_version = "1.2.0"
graphrag_version = "1.2.0"

app_started_at = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
app_name = "graphrag"
Expand Down
23 changes: 15 additions & 8 deletions libs/render_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,46 @@
from io import BytesIO


def render_excel_file(uploaded_file):
def render_excel_file(uploaded_file):
wb = load_workbook(uploaded_file)

header_fill = PatternFill(start_color="00B050", end_color="00B050", fill_type="solid")
header_fill = PatternFill(
start_color="00B050", end_color="00B050", fill_type="solid"
)
even_fill = PatternFill(start_color="D9D9D9", end_color="D9D9D9", fill_type="solid")
odd_fill = PatternFill(start_color="E2EFDA", end_color="E2EFDA", fill_type="solid")
alignment = Alignment(wrap_text=True)
header_alignment = Alignment(wrap_text=False)
thin_side = Side(border_style="thin", color="000000")
border = Border(left=thin_side, right=thin_side, top=thin_side, bottom=thin_side)

dv = DataValidation(type="list", formula1='"是,否,勉强通过"', allow_blank=True)
options = '"是,否,勉强通过"'

for sheet in wb.worksheets:
max_row = sheet.max_row
max_col = sheet.max_column

headers = ["是否通过", "不通过原因", "通过但仍需改进"]
headers = ["是否通过", "不通过原因", "通过但需改进"]

for i, header_text in enumerate(headers, start=max_col + 1):
sheet.cell(row=1, column=i, value=header_text)

max_col = sheet.max_column

for col in range(1, max_col + 1):
sheet.column_dimensions[get_column_letter(col)].width = 25

pass_col_letter = get_column_letter(max_col - 2)

dv.add(f"{pass_col_letter}2:{pass_col_letter}{max_row}")
dv = DataValidation(type="list", formula1=options, allow_blank=True)
dv_range = f"{pass_col_letter}2:{pass_col_letter}{max_row}"
dv.add(dv_range)
sheet.add_data_validation(dv)

for r, row in enumerate(sheet.iter_rows(min_row=1, max_row=max_row, min_col=1, max_col=max_col), start=1):
for r, row in enumerate(
sheet.iter_rows(min_row=1, max_row=max_row, min_col=1, max_col=max_col),
start=1,
):
for cell in row:
cell.border = border
if r == 1:
Expand Down
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
graphrag==1.1.2
openai==1.59.6
langchain-community==0.3.14
graphrag==1.2.0
openai==1.63.2
langchain-community==0.3.17
pdfplumber==0.11.5
streamlit==1.41.1
streamlit==1.42.1
theodoretools==0.0.11
python-dotenv~=1.0.1
pyodbc==5.2.0
streamlit-chat==0.1.1
psycopg2-binary==2.9.10
future==1.0.0
openpyxl==3.1.5
pymupdf==1.25.1
pymupdf==1.25.3
PyPDF2==3.0.1
xlrd==2.0.1
fastapi==0.115.6
fastapi==0.115.8
uvicorn==0.34.0
fastapi[standard]==0.115.6
pydantic~=2.10.5
fastapi[standard]==0.115.8
pydantic~=2.10.6
requests~=2.32.3
httpx==0.28.1
streamlit-authenticator==0.4.1
azure-ai-documentintelligence==1.0.0b4
azure-ai-formrecognizer==3.3.3
streamlit-ace==0.1.1
pytest==8.3.4
xlsxwriter==3.2.0
xlsxwriter==3.2.2
Binary file modified template/test_set.xlsx
Binary file not shown.

0 comments on commit 13edab7

Please sign in to comment.