Skip to content

Commit

Permalink
fix: add missing dependency usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dy0gu committed Nov 10, 2024
1 parent b04d86c commit 7e4f6d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ jobs:
file-description: ${{ env.NAME }} app, created by ${{ env.AUTHOR }}.
output-dir: build
enable-plugins: pyside6
include-module: openpyxl

- name: Mutate artifact
run: mv build/main.app build/${{ env.NAME }}.app
Expand Down Expand Up @@ -119,7 +118,6 @@ jobs:
enable-plugins: pyside6
clang: true
static-libpython: yes
include-module: openpyxl

- name: Mutate artifact
run: mv build/main.dist build/${{ env.NAME }}
Expand Down Expand Up @@ -168,7 +166,6 @@ jobs:
file-description: ${{ env.NAME }} app, created by ${{ env.AUTHOR }}.
output-dir: build
enable-plugins: pyside6
include-module: openpyxl

- name: Mutate artifact
run: mv build/main.dist build/${{ env.NAME }}
Expand Down
7 changes: 7 additions & 0 deletions src/services/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from email.message import EmailMessage
from math import isnan

import openpyxl
import pandas as pd
import html2text
from PySide6.QtCore import QThread, Signal
Expand Down Expand Up @@ -54,8 +55,14 @@ def readBody(self) -> Template:

def readTable(self) -> tuple[list[Dict[str, str]], list[str]]:
if self.tablePath.endswith(".csv"):
self.output(
f"Using pandas {pd.__version__} to read {self.tablePath}"
)
table = pd.read_csv(self.tablePath, index_col=False)
elif self.tablePath.endswith(".xlsx"):
self.output(
f"Using openpyxl {openpyxl.__version__} to read {self.tablePath}"
)
table = pd.read_excel(self.tablePath, index_col=False)
else:
raise ValueError("Unsupported file extension")
Expand Down

0 comments on commit 7e4f6d5

Please sign in to comment.