From aee441b32539e2b4b49429888c64e08748064ba1 Mon Sep 17 00:00:00 2001 From: Clawtex Date: Tue, 5 May 2026 22:54:22 +0800 Subject: [PATCH] ci: add openpyxl + register pytest markers in pytest.ini Two CI failures left after PR #34: 1. ModuleNotFoundError: No module named 'openpyxl' The new DataLoader.load_excel() + pandas.to_excel() in tests need openpyxl which was never declared. Added to both setup.py install_requires and requirements.txt. 2. Failed: 'integration' not found in markers configuration option pyproject.toml registers slow/integration/unit markers correctly but pytest.ini takes precedence and didn't list them. Added the same markers block to pytest.ini. Co-Authored-By: Claude Opus 4.7 (1M context) --- pytest.ini | 4 ++++ requirements.txt | 3 +++ setup.py | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/pytest.ini b/pytest.ini index e7ec383..988ed91 100644 --- a/pytest.ini +++ b/pytest.ini @@ -9,3 +9,7 @@ addopts = --cov=src/data_analysis_chatbots --cov-report=html --cov-report=term-missing +markers = + slow: marks tests as slow (deselect with '-m "not slow"') + integration: marks tests as integration tests + unit: marks tests as unit tests diff --git a/requirements.txt b/requirements.txt index 9d9db1d..9f7de88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,6 +24,9 @@ jupyter>=1.0.0,<2.0 ipykernel>=6.25.0,<7.0 ipywidgets>=8.1.0,<9.0 +# Excel IO (DataLoader.load_excel + pandas.to_excel rely on this) +openpyxl>=3.1.0,<4.0 + # Configuration Management pyyaml>=6.0.0,<7.0 python-dotenv>=1.0.0,<2.0 diff --git a/setup.py b/setup.py index df6c0f7..58ad14e 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,10 @@ "plotly>=5.14.0,<6.0", "streamlit>=1.28.0,<2.0", "nltk>=3.8.0,<4.0", + # Required by DataLoader.load_excel + pandas.to_excel; without it + # CI fails with "ModuleNotFoundError: No module named 'openpyxl'" + # at the Excel-IO test sites. + "openpyxl>=3.1.0,<4.0", "pyyaml>=6.0.0,<7.0", "python-dotenv>=1.0.0,<2.0", "loguru>=0.7.0,<1.0",