Skip to content

Commit 07dfc92

Browse files
fix(ci): add tabulate to core dependencies
Windows Python 3.10 CI runs failed 4 tests in TestReportGeneration and test_report_contains_new_sections with: ImportError: Missing optional dependency 'tabulate'. pandas ``.to_markdown()`` dispatches to ``tabulate`` which pandas lists as optional. Our ``sp.causal(...).report(fmt='markdown'|'html')`` path uses ``.to_markdown()`` internally, so the dependency has to be declared core on the StatsPAI side — otherwise a user who does r = sp.causal(...).report('markdown') hits an ImportError at runtime on systems that happen not to pull tabulate in transitively (Windows being the canonical case). Adds ``tabulate>=0.9.0`` to ``[project].dependencies`` in ``pyproject.toml``. Published sdist and wheel already shipped, so this ships in v1.0.2 via the next PyPI release. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 9e4a8f2 commit 07dfc92

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ dependencies = [
4949
"openpyxl>=3.0.0",
5050
"xlsxwriter>=3.0.0",
5151
"python-docx>=1.0.0",
52+
# Required by ``sp.causal(...).report(fmt='markdown'|'html')`` because
53+
# pandas ``.to_markdown()`` dispatches to ``tabulate``. Ship it as a
54+
# core dep so published artifacts work on Linux/macOS/Windows without
55+
# users having to discover the optional-dep pitfall at runtime.
56+
"tabulate>=0.9.0",
5257
]
5358

5459
[project.optional-dependencies]

0 commit comments

Comments
 (0)