Skip to content

Commit 6f21d74

Browse files
committed
fix: move xlrd to base dependencies for adhoc_pr support
xlrd is tiny (~100KB) and needed for legacy XLS files. No reason to keep it optional. Pandas remains in [ircc] extras. Skip pandas tests when pandas not installed.
1 parent ea33ba0 commit 6f21d74

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ dependencies = [
3131
"InquirerPy>=0.3.4",
3232
"aiosqlite>=0.22.0",
3333
"openpyxl>=3.1.5",
34+
"xlrd>=2.0.2",
3435
]
3536

3637
[project.urls]
@@ -43,7 +44,6 @@ mcp-canada = "mcp_canada.server:main"
4344
[project.optional-dependencies]
4445
ircc = [
4546
"pandas>=3.0.2",
46-
"xlrd>=2.0.2",
4747
]
4848

4949
[dependency-groups]

src/mcp_canada/shared/__tests__/test_parsers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ def test_none_returns_none(self) -> None:
125125
# ---------------------------------------------------------------------------
126126

127127

128+
_has_pandas = True
129+
try:
130+
import pandas # noqa: F401
131+
except ImportError:
132+
_has_pandas = False
133+
134+
135+
@pytest.mark.skipif(not _has_pandas, reason="pandas not installed")
128136
class TestParseXlsxPandasPath:
129137
def test_uses_pandas_when_importable(self) -> None:
130138
"""_parse_xlsx() calls pandas.read_excel when pandas is available."""

uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)