refactor: 重新梳理 DEPENDENCIES 版本和 python 版本
- default.python 全部改为 None(使用默认 python) - 所有依赖都指定版本号(截止 2026-03-17 最新版) - 为 unstructured[...]、domscribe 等未指定版本的依赖添加版本 - 更新 markdownify、pypandoc-binary、tabulate、trafilatura、html2text、chardet、xlrd 等依赖版本 - html 的 selenium 降级到 4.25.0 解决 urllib3 冲突 - 为 pdf/docx/xlsx/pptx/html/xls/ppt 添加 Darwin-x86_64 配置(python 3.12 + docling 2.40.0 + docling-parse 4.0.0 + numpy<2) - 更新测试期望 python_ver 为 None
This commit is contained in:
@@ -68,7 +68,7 @@ class TestGetDependencies:
|
||||
def test_get_default_dependencies(self):
|
||||
"""测试获取默认依赖配置。"""
|
||||
python_ver, deps = get_dependencies(DocxReader, "Unknown-Platform")
|
||||
assert python_ver == "3.12"
|
||||
assert python_ver is None
|
||||
assert len(deps) > 0
|
||||
# 检查是否有 docling 相关依赖(可能带版本号)
|
||||
assert any(dep.startswith("docling") for dep in deps)
|
||||
@@ -76,14 +76,14 @@ class TestGetDependencies:
|
||||
def test_get_pdf_dependencies(self):
|
||||
"""测试获取 PDF 依赖。"""
|
||||
python_ver, deps = get_dependencies(PdfReader, "Darwin-arm64")
|
||||
assert python_ver == "3.12"
|
||||
assert python_ver is None
|
||||
# 检查是否有 docling 相关依赖(可能带版本号)
|
||||
assert any(dep.startswith("docling") for dep in deps)
|
||||
|
||||
def test_get_html_dependencies(self):
|
||||
"""测试获取 HTML 依赖。"""
|
||||
python_ver, deps = get_dependencies(HtmlReader, "Linux-x86_64")
|
||||
assert python_ver == "3.12"
|
||||
assert python_ver is None
|
||||
# 检查是否有 trafilatura 相关依赖(可能带版本号)
|
||||
assert any(dep.startswith("trafilatura") for dep in deps)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user