Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

Integrate DocVortex and preserve MinerU product contracts

myhlolib31d3be7dea7
diff --git a/CLAUDE.md b/CLAUDE.md
index 2c4d5c06..3e1a84af 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -148,52 +148,52 @@ class MinerUParser(DocumentParser):
...
```
-## DocGale 与 MinerU 的文档架构
+## DocVortex 与 MinerU 的文档架构
### 1. 唯一实现归属
-`docgale` 独立拥有原生文档解析、PDF 基础访问与分类、公共文档类型、确定性后处理、素材、九种渲染格式和导出实现,不得反向依赖 MinerU。
+`docvortex` 独立拥有原生文档解析、PDF 基础访问与分类、公共文档类型、确定性后处理、素材、九种渲染格式和导出实现,不得反向依赖 MinerU。
-MinerU 保留 OCR/VLM/Hybrid 推理、模型生命周期、LLM 增强、tier 策略、CLI/API/Gradio/Doclib。通过 DocGale 公开接口复用能力,不导入其私有实现。
+MinerU 保留 OCR/VLM/Hybrid 推理、模型生命周期、LLM 增强、tier 策略、CLI/API/Gradio/Doclib。通过 DocVortex 公开接口复用能力,不导入其私有实现。
### 2. 路由
`backend/analyze.py:doc_analyze()` 仍是 MinerU 的统一分析门面。只有 `parse_mode="auto"` 调用共享 `PDFDocument.classify()`。
-- Flash + txt:使用 DocGale 的原生 PDF 模型。
-- Flash + auto:txt 分类走 DocGale;ocr 分类走 MinerU 现有 Flash OCR。
+- Flash + txt:使用 DocVortex 的原生 PDF 模型。
+- Flash + auto:txt 分类走 DocVortex;ocr 分类走 MinerU 现有 Flash OCR。
- Flash + ocr:直接走现有 Flash OCR。
-- 其他 tier:保持已有推理流程,共享 DocGale 的基础 PDF、类型、后处理和渲染能力。
+- 其他 tier:保持已有推理流程,共享 DocVortex 的基础 PDF、类型、后处理和渲染能力。
原生解析不自行追加分类或 OCR 回退。非 PDF 原生格式仍只支持整本解析,PDF 页范围继续采用 `1-5`、`r1`、`all`。
### 3. 协议与类型
-`mineru.types` 重新导出 `docgale.schema` 的文档类型,并保留 MinerU 产品档位类型。
+`mineru.types` 重新导出 `docvortex.schema` 的文档类型,并保留 MinerU 产品档位类型。
-DocGale 的 ModelJson/MiddleJson 原生 JSON 使用独立 schema 标识和版本 1.0,持有 `producer` 与 `extensions`。MinerU 的 `effort`、`parse_mode`、`mineru_version` 位于 `extensions["mineru"]`,由 `mineru.integrations.docgale.build_metadata()` 校验。
+DocVortex 的 ModelJson/MiddleJson 原生 JSON 使用独立 schema 标识和版本 1.0,持有 `producer` 与 `extensions`。MinerU 的 `effort`、`parse_mode`、`mineru_version` 位于 `extensions["mineru"]`,由 `mineru.integrations.docvortex.build_metadata()` 校验。
-MinerU 的 ParseResult、CLI、HTTP API 和 Doclib 继续通过 `docgale.compat.mineru` 读写原有 schema 2.0 封装,并保留已有旧结果读取边界。不要为旧底层构造参数增加动态兼容别名。
+MinerU 的 ParseResult、CLI、HTTP API 和 Doclib 继续通过 `docvortex.compat.mineru` 读写原有 schema 2.0 封装,并保留已有旧结果读取边界。不要为旧底层构造参数增加动态兼容别名。
ModelJson 仍保存 raw pages 与 page_index_map;MiddleJson 仍保存有序 PageInfo 数组。PageInfo 只有 page_idx 与 blocks。Block/InlineSpan 的现有语义、几何和父子约束保持不变;自然语言 InlineSpan 不携带字体或几何信息。
### 4. 后处理与渲染
-DocGale 的确定性后处理独立构造有效 MiddleJson。`mineru.backend.postprocess.document` 在其后显式执行 MinerU 的可选 LLM 增强。
+DocVortex 的确定性后处理独立构造有效 MiddleJson。`mineru.backend.postprocess.document` 在其后显式执行 MinerU 的可选 LLM 增强。
-`mineru.render` 是稳定兼容门面,底层 renderer、RenderPlan、选项类型与错误类型均来自 DocGale。公式定界符等宿主配置显式传入,不让 DocGale 读取 MinerU 配置。
+`mineru.render` 是稳定兼容门面,底层 renderer、RenderPlan、选项类型与错误类型均来自 DocVortex。公式定界符等宿主配置显式传入,不让 DocVortex 读取 MinerU 配置。
九种输出为 Markdown、HTML、LaTeX、DOCX、EPUB、PDF、Structured Content、Content List V1/V2。LaTeX/EPUB/PDF/Content List 的低层能力不自动扩展所有产品入口。PDF 输出继续采用语义重排版。
-文件写出属于 `docgale.export`;语义类型不再提供文件导出方法。结果包保存中间协议和物化素材,渲染不依赖已关闭的 PDFium 对象或源文件,也不修改原始语义树。
+文件写出属于 `docvortex.export`;语义类型不再提供文件导出方法。结果包保存中间协议和物化素材,渲染不依赖已关闭的 PDFium 对象或源文件,也不修改原始语义树。
### 5. PDF 与依赖方向
-PDF 字符、片段、行和矩形类型由 DocGale 维护;项目不再依赖 pdftext,也没有其 0.6/0.7 运行时分支。pypdfium2 最低版本为 5.10.1,不设置固定上限。
+PDF 字符、片段、行和矩形类型由 DocVortex 维护;项目不再依赖 pdftext,也没有其 0.6/0.7 运行时分支。pypdfium2 最低版本为 5.10.1,DocVortex 约束为 `<6`,MinerU 安装时共同遵守该范围。
-访问同一 PDFium 运行时必须使用 DocGale 的共享锁及资源管理。跨进程传递字节和物化数据,不传递裸句柄。
+访问同一 PDFium 运行时必须使用 DocVortex 的共享锁及资源管理。跨进程传递字节和物化数据,不传递裸句柄。
-- DocGale:schema/foundation → document/content → analyzers/postprocess/render/export → api/result。
-- MinerU:共享 DocGale 能力 → model/backend → parser/kit/doclib/cli。
+- DocVortex:schema/foundation → document/content → analyzers/postprocess/render/export → api/result。
+- MinerU:共享 DocVortex 能力 → model/backend → parser/kit/doclib/cli。
- `model/runtime` 继续负责 MinerU 设备、显存、ONNX 与本地模型生命周期;`model/registry.py`、`model/download.py` 保持产品模型管理职责。
- 已迁移的 Flash、通用后处理、renderer 私有目录及共享 leaf utilities 不在 MinerU 中保留第二份实现。
diff --git a/docs/docvortex-upgrade-validation.md b/docs/docvortex-upgrade-validation.md
new file mode 100644
index 00000000..23954dd1
--- /dev/null
+++ b/docs/docvortex-upgrade-validation.md
@@ -0,0 +1,35 @@
+# DocVortex 接入与标点规则验证
+
+独立引擎已更名为 DocVortex,MinerU 依赖为 `docvortex>=0.1.0,<1.0.0`。
+导入及集成模块同步迁移,公开文档类型继续由引擎唯一维护。MinerU 的 schema 2.0、
+产品元数据、已有旧结果适配、OCR/VLM/Hybrid 路由与 UI 名称保持不变。
+
+PDF 自然语言及表格可见文本新增 `:./\-_%+=@#&*` 的半角转换。
+中文标点、公式、代码、URL 目标、HTML 属性、原始字符和几何保持原有边界。
+通用 `full_to_half_exclude_marks()` 仍只转换英数。
+
+本地完整回归结果为 **3954 passed、4 skipped、4 deselected**。四项排除保持此前基线:
+
+- `test_doclib_app_startup.py::test_basic_extra_includes_preflight_runtime_dependencies`
+- `test_doclib_app_startup.py::test_standard_is_the_highest_model_runtime_extra`
+- `test_legacy_schema_adapter.py::test_doclib_compaction_rejects_unknown_legacy_schema`
+- `test_mfr_latex_utils.py::test_pp_formulanet_fix_latex_uses_shared_mathring_repair`
+
+DocVortex [三平台 CI](https://github.com/myhloli/docvortex/actions/runs/34045249479)
+通过 Python 3.10–3.14、PDFium 5.10.1/5.13.0 及 Pydantic 最低版本验证。
+Linux/macOS 为 418 项通过;Windows 为 417 项通过、1 项 POSIX 检查跳过。
+既有少线表诊断仍单独失败,不计入本次修复。独立 Python 3.14 wheel 环境中
+107 项协议、格式、标点与完整流程检查通过,且没有 DocGale、MinerU 或 pdftext。
+
+中文论文3/4分别新增 57/239 个符号转换,三平台文档结构、表格属性、原始几何和
+全部 78 张源页/Layout PNG 与修改前一致。更名阶段的两份重排版 PDF 共 12 页,
+Poppler 渲染像素与更名前一致。HTML、EPUB、MathJax、Mermaid、代码高亮及素材加载
+已进行浏览器检查,PDF 页面截图已审阅。
+
+仅 DocVortex 原生 JSON/结果包可由新包直接读取;旧 DocGale 原生协议明确拒绝,
+旧 DocGale/MinerU HTML 按普通网页解析。MinerU 自身已有缓存和支持的历史 JSON
+仍由宿主适配器读取,但不会自动重新清洗文字。需要当前 PDF 文本结果时重启服务并
+使用现有 `--force` 重新解析。
+
+仓库为 `myhloli/docvortex`,保留原仓库历史与 Release。0.1.0 wheel/sdist 更新到
+发行草稿,本次不发布到 PyPI;Trusted Publisher 设置见引擎升级说明。
diff --git a/docs/en/usage/quick_usage.md b/docs/en/usage/quick_usage.md
index 8d596ef4..5c2d3fa8 100644
--- a/docs/en/usage/quick_usage.md
+++ b/docs/en/usage/quick_usage.md
@@ -34,7 +34,7 @@ If you need to adjust parsing options through custom parameters, you can also ch
>[!TIP]
>Access `http://127.0.0.1:8000/docs` for the OpenAPI documentation. The supported service surface is `/v1/*`, including health, capability discovery, uploads, files, parse jobs, and usage.
>
- >Native document parsing example: [DocGale Python example](https://github.com/myhloli/docgale/blob/main/demo/demo.py)
+ >Native document parsing example: [DocVortex Python example](https://github.com/myhloli/docvortex/blob/main/demo/demo.py)
- Start Gradio WebUI visual frontend:
```bash
diff --git a/docs/next/architecture.md b/docs/next/architecture.md
index dd3fec91..8e8b2a1d 100644
--- a/docs/next/architecture.md
+++ b/docs/next/architecture.md
@@ -6,24 +6,24 @@
非目标: API 字段级定义;CLI 参数完整手册
来源: 由根目录旧技术设计底稿迁移整理而来,当前 `mineru/doclib` 代码已核对
-## DocGale 引擎边界
+## DocVortex 引擎边界
-通用文档引擎已抽为独立依赖 `docgale`。MinerU 保留应用、推理和任务管理,原生解析、PDF 分类与基础访问、文档类型、确定性后处理、素材和 renderer 由 DocGale 唯一维护。
+通用文档引擎已抽为独立依赖 `docvortex`。MinerU 保留应用、推理和任务管理,原生解析、PDF 分类与基础访问、文档类型、确定性后处理、素材和 renderer 由 DocVortex 唯一维护。
```text
-MinerU Flash TXT ──→ DocGale 原生分析 ──→ ModelJson
+MinerU Flash TXT ──→ DocVortex 原生分析 ──→ ModelJson
MinerU OCR/VLM/Hybrid ─────────────────→ ModelJson
↓
- DocGale 确定性后处理
+ DocVortex 确定性后处理
↓
MinerU 可选 LLM 增强
↓
- DocGale Render
+ DocVortex Render
```
-PDF 只有 `auto` 模式调用共享 classify;显式 `txt` 不分类,显式 `ocr` 保留已有推理路线。原生分析只由 Flash 分支调用。DocGale 不反向依赖 MinerU。
+PDF 只有 `auto` 模式调用共享 classify;显式 `txt` 不分类,显式 `ocr` 保留已有推理路线。原生分析只由 Flash 分支调用。DocVortex 不反向依赖 MinerU。
-DocGale 内存对象和 JSON 使用中性 producer/extensions;MinerU 对外继续输出 schema 2.0,由兼容 codec 恢复产品元数据。所有持久化边界应使用 ParseResult 或明确的 MinerU codec,而不是直接写出 DocGale 对象的原生封装。
+DocVortex 内存对象和 JSON 使用中性 producer/extensions;MinerU 对外继续输出 schema 2.0,由兼容 codec 恢复产品元数据。所有持久化边界应使用 ParseResult 或明确的 MinerU codec,而不是直接写出 DocVortex 对象的原生封装。
## 1. 系统上下文
diff --git a/docs/next/cli/mineru-e2e-test-cases.md b/docs/next/cli/mineru-e2e-test-cases.md
index 31cd339b..91e1dcdf 100644
--- a/docs/next/cli/mineru-e2e-test-cases.md
+++ b/docs/next/cli/mineru-e2e-test-cases.md
@@ -180,7 +180,7 @@ export MINERU_E2E_FIXTURE_DIR="$MINERU_HOME/fixtures"
rm -rf "$MINERU_E2E_FIXTURE_DIR"
mkdir -p "$MINERU_E2E_FIXTURE_DIR/watch-dir" "$MINERU_E2E_FIXTURE_DIR/empty-dir" "$MINERU_E2E_FIXTURE_DIR/output-dir" "$MINERU_HOME/removable-watch"
-# Office 真实样例已归 DocGale;手工测试前将该仓库克隆到 $HOME/docgale。
+# Office 真实样例已归 DocVortex;手工测试前将该仓库克隆到 $HOME/docvortex。
PDF_SOURCE="$HOME/MinerU-Repo/demo/pdfs/demo1.pdf"
cp "$PDF_SOURCE" "$MINERU_E2E_FIXTURE_DIR/sample.pdf"
@@ -190,13 +190,13 @@ cp "$MINERU_E2E_FIXTURE_DIR/sample.pdf" "$MINERU_E2E_FIXTURE_DIR/watch-dir/watch
cp "$MINERU_E2E_FIXTURE_DIR/sample.pdf" "$MINERU_E2E_FIXTURE_DIR/sample doc.pdf"
cp "$MINERU_E2E_FIXTURE_DIR/sample.pdf" "$MINERU_E2E_FIXTURE_DIR/中文样例.pdf"
-cp "$HOME/docgale/demo/office_docs/docx_01.docx" "$MINERU_E2E_FIXTURE_DIR/sample.docx"
-cp "$HOME/docgale/demo/office_docs/pptx_01.pptx" "$MINERU_E2E_FIXTURE_DIR/sample.pptx"
-cp "$HOME/docgale/demo/office_docs/xlsx_01.xlsx" "$MINERU_E2E_FIXTURE_DIR/sample.xlsx"
-cp "$HOME/docgale/demo/office_docs/docx_01.doc" "$MINERU_E2E_FIXTURE_DIR/sample.doc"
-cp "$HOME/docgale/demo/office_docs/pptx_01.ppt" "$MINERU_E2E_FIXTURE_DIR/sample.ppt"
-cp "$HOME/docgale/demo/office_docs/xlsx_01.xls" "$MINERU_E2E_FIXTURE_DIR/sample.xls"
-cp "$HOME/docgale/demo/office_docs/rtf_01.rtf" "$MINERU_E2E_FIXTURE_DIR/sample.rtf"
+cp "$HOME/docvortex/demo/office_docs/docx_01.docx" "$MINERU_E2E_FIXTURE_DIR/sample.docx"
+cp "$HOME/docvortex/demo/office_docs/pptx_01.pptx" "$MINERU_E2E_FIXTURE_DIR/sample.pptx"
+cp "$HOME/docvortex/demo/office_docs/xlsx_01.xlsx" "$MINERU_E2E_FIXTURE_DIR/sample.xlsx"
+cp "$HOME/docvortex/demo/office_docs/docx_01.doc" "$MINERU_E2E_FIXTURE_DIR/sample.doc"
+cp "$HOME/docvortex/demo/office_docs/pptx_01.ppt" "$MINERU_E2E_FIXTURE_DIR/sample.ppt"
+cp "$HOME/docvortex/demo/office_docs/xlsx_01.xls" "$MINERU_E2E_FIXTURE_DIR/sample.xls"
+cp "$HOME/docvortex/demo/office_docs/rtf_01.rtf" "$MINERU_E2E_FIXTURE_DIR/sample.rtf"
# OFD/ODT/ODS/ODP 来自 OFDRW(Apache 2.0)与 Apache ODF Toolkit(Apache 2.0)公开测试资源
curl -sL -o "$MINERU_E2E_FIXTURE_DIR/sample.ofd" "https://raw.githubusercontent.com/ofdrw/ofdrw/7459e35082170061efa6b399a6518dbc219f08ac/ofdrw-converter/src/test/resources/helloworld.ofd"
diff --git a/docs/next/decisions/0031-html-native-semantic-parsing.md b/docs/next/decisions/0031-html-native-semantic-parsing.md
index 36b943b0..7c165777 100644
--- a/docs/next/decisions/0031-html-native-semantic-parsing.md
+++ b/docs/next/decisions/0031-html-native-semantic-parsing.md
@@ -15,10 +15,10 @@
- HTML 规范后缀统一为 `html`,使用 `flash/txt`、整本文档、单逻辑页、无 bbox 的 ModelJson/MiddleJson 2.0 路径。
- 只解析静态源码,不执行 JavaScript、不启动浏览器、不生成布局坐标。
- 默认固定使用保守 `auto` 正文选择:高置信候选进入正文投影,其余情况回退完整 body;首版不公开模式参数。
-- 共享 DocGale renderer 输出版本化 `data-docgale-html-version="1"` 机器契约。只有当前 renderer 能生成的 canonical
+- 共享 DocVortex renderer 输出版本化 `data-docvortex-html-version="1"` 机器契约。只有当前 renderer 能生成的 canonical
marker 树进入精确路径,parser 跳过 `auto` 裁剪并按 `data-block-type` 恢复顶层 block、visual child、列表/目录叶子及关键元数据。
-- `data-block-type` 使用原始下划线形式的 `BlockType` 值,是新版 DocGale HTML 的唯一机器类型来源;
- `docgale-caption`、`docgale-footnote` 和 `docgale-figure--*` 等 class 只负责样式。
+- `data-block-type` 使用原始下划线形式的 `BlockType` 值,是新版 DocVortex HTML 的唯一机器类型来源;
+ `docvortex-caption`、`docvortex-footnote` 和 `docvortex-figure--*` 等 class 只负责样式。
- 精确解码先把固定 DOM grammar 解析为无资源副作用的 typed plan,再加载图片并一次性物化 raw blocks。未知版本或
非 canonical v1 均丢弃整条精确路径,从干净 DOM 进入通用解析;人工编辑后的机器 HTML 不承诺保留原 block 类型和元数据。
- Image/Chart body 的 renderer-owned 图片恢复为唯一主图片载荷;rich-content carrier 内的安全 HTML(包括嵌套图片)
@@ -27,7 +27,7 @@
不承诺按旧 class suffix 精确恢复 Chart、Index 或 annotation 类型。
- EPUB XHTML 与 standalone HTML 共用静态 markup projector,继续输出既有标题、正文、列表、表格、图片、代码、
公式和页面脚注 block,不增加 HTML 专属 block。
-- 新版公式 carrier 保存 `data-formula-display` 与 `data-docgale-latex`。网页公式按固定来源优先级收敛为裸 LaTeX:
+- 新版公式 carrier 保存 `data-formula-display` 与 `data-docvortex-latex`。网页公式按固定来源优先级收敛为裸 LaTeX:
行间写入 `EquationBlock.content`,行内写入 `EquationInlineSpan`,不保留 `$...$`、`\(...\)` 或 `\[...\]` 外层定界符。
无法安全转换的 MathML 与暂不支持的 AsciiMath 保留可见文本,不冒充 LaTeX。
- 有序列表只保留连续阿拉伯编号和单一列表级起始值。
@@ -47,7 +47,7 @@
## 影响
- `.html/.htm` 可通过 SDK、API Server、mineru-kit 和 Doclib 本地 Flash 路径生成统一多格式输出。
-- 新版 DocGale HTML 可按类型级往返;FULL 中页面辅助类型可恢复,但 HTML 输入仍固定投影为一个逻辑页,
+- 新版 DocVortex HTML 可按类型级往返;FULL 中页面辅助类型可恢复,但 HTML 输入仍固定投影为一个逻辑页,
不依据 `data-page-idx` 重建原始多页。
- `image_url` 是 schema 2.0 内可选且默认省略的字段。
- 打开 Markdown 或 HTML 输出时,客户端可能访问原 HTML 中保留的远程图片地址;服务端解析阶段不会访问该地址。
@@ -58,5 +58,5 @@
- 如需公开 `auto/main/document` 或支持浏览器渲染,另行设计 API、配置、安全隔离和回归语料。
- 使用文章、文档站、论坛和本地资源页面持续校准正文选择阈值,低置信结果必须保持 body 回退。
-2026-09-06 标记迁移:精确路径仅识别 DocGale v1 标记;此前生成的 MinerU 标记 HTML
+2026-09-06 标记迁移:精确路径仅识别 DocVortex v1 标记;此前生成的 MinerU 标记 HTML
统一进入普通网页解析,不保留旧标记专用兼容分支。JSON 适配协议不受影响。
diff --git a/docs/next/middle-json/rendering.md b/docs/next/middle-json/rendering.md
index c7e8df34..62a84f80 100644
--- a/docs/next/middle-json/rendering.md
+++ b/docs/next/middle-json/rendering.md
@@ -214,7 +214,7 @@ TIFF 及安全 MinerU SVG fallback 规范化为 PNG,PNG/JPEG/GIF 保留,最
renderer 不下载 `image_url`。路径缺失、resolver 抛错、图片损坏或远程图片都不会中断输出:图片
主体省略,但已有结构内容、alt、caption、footnote 和识别文字继续可见,也不会生成虚构占位文案。
-EPUB 固定使用共享 planner 的 DEFAULT 连续语义,在单个 `article.docgale-document` 中展平页面,
+EPUB 固定使用共享 planner 的 DEFAULT 连续语义,在单个 `article.docvortex-document` 中展平页面,
隐藏页面辅助块、合并跨页续段与续表,不生成源页 section、空页或分页标记;`page_footnote` 仍然
输出。该能力仅属于严格 `mineru.render` 公共面,不新增 ParseResult 方法,也不迁移 CLI、API、
doclib 或 parse-job `output_formats`。
@@ -272,24 +272,24 @@ html_document = render_html(
`render_html()` 只接受严格 `MiddleJson`,返回字符串且不写文件、不读取图片 sidecar、
不访问网络。`standalone=True` 输出完整 HTML5 文档;`False` 输出单根
-`article.docgale-document` fragment,不包含 CSS、脚本或
+`article.docvortex-document` fragment,不包含 CSS、脚本或
`head`。显式标题缺失时,HTML title 使用首个非空 `doc_title` 的纯文本,再回退为
-`DocGale Document`。完整文档使用 `body.docgale-html-body` 提供居中和响应式页面布局;
+`DocVortex Document`。完整文档使用 `body.docvortex-html-body` 提供居中和响应式页面布局;
fragment 调用方可以自行决定外围容器尺寸。
HTML 与 Markdown 共用 `RenderMode` 和续段/续表 planner。DEFAULT 输出无页面 wrapper
-的连续阅读内容;FULL 为每个 `PageInfo` 输出一个 `section.docgale-page`,包括空页,并在
-相邻页面之间输出 `hr.docgale-page-break`。每个顶层 block wrapper 保留来源 page/type/index
-元数据。`article.docgale-document` 同时声明 `data-docgale-html-version="1"` 和
+的连续阅读内容;FULL 为每个 `PageInfo` 输出一个 `section.docvortex-page`,包括空页,并在
+相邻页面之间输出 `hr.docvortex-page-break`。每个顶层 block wrapper 保留来源 page/type/index
+元数据。`article.docvortex-document` 同时声明 `data-docvortex-html-version="1"` 和
`data-render-mode="default|full"`;顶层 block、visual body/caption/footnote、列表/目录叶子使用
原始下划线形式的 `data-block-type`,并按类型携带 `data-block-sub-type`、`data-guess-lang`、
`data-anchor` 或 `data-level`。这些 data 属性构成 renderer 到 HTML Flash parser 的版本化机器契约,
CSS class 不参与精确类型判定。
行内内容直接消费共享 AST:普通文本始终 HTML escape,未知标签保持可见;公式只在
-`docgale-math` carrier 内使用 `\(...\)` 或 `\[...\]`,不扫描普通正文中的美元符号。每个公式
+`docvortex-math` carrier 内使用 `\(...\)` 或 `\[...\]`,不扫描普通正文中的美元符号。每个公式
carrier 同时保存 `data-block-type="equation"`、`data-formula-display` 和裸 LaTeX
-`data-docgale-latex`,供 HTML parser 无损恢复;可见 MathJax 定界符不属于 Middle JSON 内容。
+`data-docvortex-latex`,供 HTML parser 无损恢复;可见 MathJax 定界符不属于 Middle JSON 内容。
HTML 的普通 `InlineText` 默认 linkify `http/https`、`www.`、邮箱和常见裸域名;裸域名统一补
`https://`,邮箱补 `mailto:`。无协议裸域名的 TLD 必须属于工程常用白名单:
`com cn org net edu gov io ai dev app de uk nl ru br fr au in eu jp`、
@@ -297,8 +297,8 @@ HTML 的普通 `InlineText` 默认 linkify `http/https`、`www.`、邮箱和常
不受该小白名单限制。已有 hyperlink、代码、算法、公式、raw HTML 及 Mermaid 源码不重复
识别,候选 href 仍通过统一 URL sanitizer。
-完整文档只内联压缩后的 `docgale.min.css`。其可读源码为 `docgale.css`,所有文档规则均
-限定在 `.docgale-document` 内,standalone 外围布局规则限定在 `.docgale-html-body`,
+完整文档只内联压缩后的 `docvortex.min.css`。其可读源码为 `docvortex.css`,所有文档规则均
+限定在 `.docvortex-document` 内,standalone 外围布局规则限定在 `.docvortex-html-body`,
不会修改 fragment 宿主页的全局标签样式。样式使用系统字体,不加载外部字体。
image、table、chart 和 code 主体均从正文内容区左边界开始;图片保持固有尺寸和宽高比,
宽表格/流程图只在自身容器滚动。视觉 caption 与 footnote 使用 figure 可用宽度并统一左对齐,
@@ -317,7 +317,7 @@ image、table、chart 和 code 主体均从正文内容区左边界开始;图
`maxTextSize=50000`、`maxEdges=500` 逐图生成 SVG,成功后替换 raster。无 JS、CDN/语法失败
继续显示 raster;无 raster 时自动展开已转义源码。图源码只在浏览器本地参与渲染。
-fragment 调用方需要加载随包提供的 `docgale.min.css`,并按实际内容加载同版本
+fragment 调用方需要加载随包提供的 `docvortex.min.css`,并按实际内容加载同版本
MathJax、Prism 和 Mermaid。MathJax 必须在初始化前复用 standalone 的 delimiter、
`ignoreHtmlClass/processHtmlClass`、`ui/safe`、禁用 `require` 及 safeOptions 配置。动态插入后调用
`MathJax.typesetPromise([root])` 与 `Prism.highlightAllUnder(root)`;替换已有公式前先调用
@@ -337,8 +337,8 @@ window.MathJax = {
packages: {"[-]": ["require"]},
},
options: {
- ignoreHtmlClass: "docgale-document",
- processHtmlClass: "docgale-math",
+ ignoreHtmlClass: "docvortex-document",
+ processHtmlClass: "docvortex-math",
enableMenu: false,
enableEnrichment: false,
safeOptions: {
@@ -506,7 +506,7 @@ text 合并允许跨越任意其他 block,后一个 text 的内容被吸收到
- `text/ref_text`: 直接渲染 InlineSpan 中的公式、样式和超链接;普通 TextSpan 转义可能误触发的 Markdown block 前缀。
- `doc_title/paragraph_title`: 使用全局 `level`,Markdown 标题最多六级;anchor 输出为 HTML id。
-- `page_footnote`: 独立于页面辅助块,Markdown/HTML 的 DEFAULT/FULL 以及固定默认 DOCX/EPUB/PDF 都输出;Markdown 使用无可见标签的 `<small><span class="docgale-page-footnote" data-block-type="page_footnote" style="color:#6b7280">…</span></small>`,其余格式使用各自的脚注样式和 anchor。
+- `page_footnote`: 独立于页面辅助块,Markdown/HTML 的 DEFAULT/FULL 以及固定默认 DOCX/EPUB/PDF 都输出;Markdown 使用无可见标签的 `<small><span class="docvortex-page-footnote" data-block-type="page_footnote" style="color:#6b7280">…</span></small>`,其余格式使用各自的脚注样式和 anchor。
- `list`: 递归缩进;普通列表直接使用 content 已内化的前缀。`sub_type=ref_text`
时统计每个直属非空 item 的前五个可见字符,数字前缀未达到严格多数则给全部 item
补 `- `,已有 `- ` 不重复;嵌套列表独立判定。
diff --git a/docs/zh/usage/quick_usage.md b/docs/zh/usage/quick_usage.md
index b7b311ae..3ac22415 100644
--- a/docs/zh/usage/quick_usage.md
+++ b/docs/zh/usage/quick_usage.md
@@ -34,7 +34,7 @@ mineru parse <input_path> --pages all -o <output_path>
>[!TIP]
>在浏览器中访问 `http://127.0.0.1:8000/docs` 查看 OpenAPI 文档。服务只提供 `/v1/*` 接口,包括健康检查、能力发现、上传、文件、解析任务和用量查询。
>
- >原生文档解析示例:[DocGale Python 示例](https://github.com/myhloli/docgale/blob/main/demo/demo.py)
+ >原生文档解析示例:[DocVortex Python 示例](https://github.com/myhloli/docvortex/blob/main/demo/demo.py)
- 启动gradio webui 可视化前端:
```bash
diff --git a/mineru/backend/analysis/csv.py b/mineru/backend/analysis/csv.py
index 2a468b11..471bc987 100644
--- a/mineru/backend/analysis/csv.py
+++ b/mineru/backend/analysis/csv.py
@@ -6,7 +6,7 @@ from __future__ import annotations
import time
from io import BytesIO
-from docgale.analyzers.native import CsvModel
+from docvortex.analyzers.native import CsvModel
from .contracts import AnalysisResult
diff --git a/mineru/backend/analysis/epub.py b/mineru/backend/analysis/epub.py
index 2f1a1e45..f90932c7 100644
--- a/mineru/backend/analysis/epub.py
+++ b/mineru/backend/analysis/epub.py
@@ -6,7 +6,7 @@ from __future__ import annotations
import time
from io import BytesIO
-from docgale.analyzers.native import EpubModel
+from docvortex.analyzers.native import EpubModel
from .contracts import AnalysisResult
diff --git a/mineru/backend/analysis/html.py b/mineru/backend/analysis/html.py
index a1217c9f..76448789 100644
--- a/mineru/backend/analysis/html.py
+++ b/mineru/backend/analysis/html.py
@@ -6,8 +6,8 @@ from __future__ import annotations
import time
from io import BytesIO
-from docgale.analyzers.native import HtmlModel
-from docgale.analyzers.native.html import HtmlSourceContext
+from docvortex.analyzers.native import HtmlModel
+from docvortex.analyzers.native.html import HtmlSourceContext
from .contracts import AnalysisResult
diff --git a/mineru/backend/analysis/ofd.py b/mineru/backend/analysis/ofd.py
index 476b52ef..8621d33e 100644
--- a/mineru/backend/analysis/ofd.py
+++ b/mineru/backend/analysis/ofd.py
@@ -6,7 +6,7 @@ from __future__ import annotations
import time
from io import BytesIO
-from docgale.analyzers.native import OfdModel
+from docvortex.analyzers.native import OfdModel
from .contracts import AnalysisResult
diff --git a/mineru/backend/analysis/office.py b/mineru/backend/analysis/office.py
index 0f919ab9..43b797e7 100644
--- a/mineru/backend/analysis/office.py
+++ b/mineru/backend/analysis/office.py
@@ -6,16 +6,16 @@ from __future__ import annotations
import time
from io import BytesIO
-from docgale.analyzers.native import DocModel
-from docgale.analyzers.native import DocxModel
-from docgale.analyzers.native import OdpModel
-from docgale.analyzers.native import OdsModel
-from docgale.analyzers.native import OdtModel
-from docgale.analyzers.native import PptModel
-from docgale.analyzers.native import PptxModel
-from docgale.analyzers.native import RtfModel
-from docgale.analyzers.native import XlsModel
-from docgale.analyzers.native import XlsxModel
+from docvortex.analyzers.native import DocModel
+from docvortex.analyzers.native import DocxModel
+from docvortex.analyzers.native import OdpModel
+from docvortex.analyzers.native import OdsModel
+from docvortex.analyzers.native import OdtModel
+from docvortex.analyzers.native import PptModel
+from docvortex.analyzers.native import PptxModel
+from docvortex.analyzers.native import RtfModel
+from docvortex.analyzers.native import XlsModel
+from docvortex.analyzers.native import XlsxModel
from .contracts import AnalysisResult, OfficeSuffix
diff --git a/mineru/backend/analysis/pdf/formulas.py b/mineru/backend/analysis/pdf/formulas.py
index 85c3c717..a0729a9a 100644
--- a/mineru/backend/analysis/pdf/formulas.py
+++ b/mineru/backend/analysis/pdf/formulas.py
@@ -11,17 +11,17 @@ import numpy as np
from PIL import Image
from ....model.runtime.hybrid import HybridLocalModelContext
-from docgale.foundation.geometry import normalize_to_int_bbox
+from docvortex.foundation.geometry import normalize_to_int_bbox
from ....model.ocr.image import get_rotate_crop_image_for_text_rec
-from docgale.foundation.text import build_tagged_formula_content
+from docvortex.foundation.text import build_tagged_formula_content
from ....types import RAW_FORMULA_NUMBER, BlockType
-from docgale.document.pdf.geometry import bbox_to_pixel_bbox as _bbox_to_pixel_bbox
-from docgale.document.pdf.geometry import medium_bbox_to_quad as _medium_bbox_to_quad
-from docgale.document.pdf.geometry import normalize_layout_bbox_to_unit as _normalize_layout_bbox_to_unit
-from docgale.document.pdf.geometry import normalize_medium_content as _normalize_medium_content
-from docgale.document.pdf.geometry import normalize_page_size as _normalize_page_size
+from docvortex.document.pdf.geometry import bbox_to_pixel_bbox as _bbox_to_pixel_bbox
+from docvortex.document.pdf.geometry import medium_bbox_to_quad as _medium_bbox_to_quad
+from docvortex.document.pdf.geometry import normalize_layout_bbox_to_unit as _normalize_layout_bbox_to_unit
+from docvortex.document.pdf.geometry import normalize_medium_content as _normalize_medium_content
+from docvortex.document.pdf.geometry import normalize_page_size as _normalize_page_size
def _is_hybrid_equation_block(block: dict[str, Any]) -> bool:
diff --git a/mineru/backend/analysis/pdf/images.py b/mineru/backend/analysis/pdf/images.py
index d5a93f84..1cb2db9f 100644
--- a/mineru/backend/analysis/pdf/images.py
+++ b/mineru/backend/analysis/pdf/images.py
@@ -4,9 +4,9 @@
from __future__ import annotations
import os
from typing import Any, Literal
-from docgale.document.pdf import images as _images
-from docgale.document.pdf.images import DEFAULT_PDF_IMAGE_DPI
-from docgale.document.pdf.images import (
+from docvortex.document.pdf import images as _images
+from docvortex.document.pdf.images import DEFAULT_PDF_IMAGE_DPI
+from docvortex.document.pdf.images import (
ImageType,
pdf_page_to_image,
shutdown_pdf_render_executor,
diff --git a/mineru/backend/analysis/pdf/layout.py b/mineru/backend/analysis/pdf/layout.py
index 440f36ab..b26c110e 100644
--- a/mineru/backend/analysis/pdf/layout.py
+++ b/mineru/backend/analysis/pdf/layout.py
@@ -11,11 +11,11 @@ import numpy as np
from PIL import Image
from ....types import BBox, BlockType
-from docgale.foundation.geometry import normalize_to_int_bbox
+from docvortex.foundation.geometry import normalize_to_int_bbox
from .images import get_crop_np_img
-from docgale.document.pdf.geometry import normalize_layout_bbox_to_unit as _normalize_layout_bbox_to_unit
-from docgale.document.pdf.geometry import normalize_page_size as _normalize_page_size
+from docvortex.document.pdf.geometry import normalize_layout_bbox_to_unit as _normalize_layout_bbox_to_unit
+from docvortex.document.pdf.geometry import normalize_page_size as _normalize_page_size
from .constants import (
VLM_LAYOUT_LABEL_MAP,
VLM_MODEL_LIST_FIELDS,
diff --git a/mineru/backend/analysis/pdf/normalization.py b/mineru/backend/analysis/pdf/normalization.py
index ec6c5c56..92d9f9b9 100644
--- a/mineru/backend/analysis/pdf/normalization.py
+++ b/mineru/backend/analysis/pdf/normalization.py
@@ -7,13 +7,13 @@ import math
import re
from typing import Any
-from docgale.content.spans import append_equation_span
-from docgale.content.spans import append_text_span
-from docgale.content.spans import inline_span_plain_text
-from docgale.content.spans import strip_span_dicts
+from docvortex.content.spans import append_equation_span
+from docvortex.content.spans import append_text_span
+from docvortex.content.spans import inline_span_plain_text
+from docvortex.content.spans import strip_span_dicts
from ....types import BBox, BlockType, RAW_ALGORITHM, RAW_PHONETIC
-from docgale.foundation.geometry import calculate_overlap_area_2_minbox_area_ratio
-from docgale.content import normalize_pdf_model_text
+from docvortex.foundation.geometry import calculate_overlap_area_2_minbox_area_ratio
+from docvortex.content import normalize_pdf_model_text
from .constants import (
LAYOUT_TITLE_SPLIT_OVERLAP_THRESHOLD,
@@ -21,7 +21,7 @@ from .constants import (
NATURAL_LANGUAGE_CONTENT_BLOCK_TYPES,
_VLM_UNCLASSIFIED_TITLE_TYPE,
)
-from docgale.document.pdf.geometry import bbox_to_pixel_bbox as _bbox_to_pixel_bbox
+from docvortex.document.pdf.geometry import bbox_to_pixel_bbox as _bbox_to_pixel_bbox
def _collect_layout_doc_title_bboxes(layout_res: list[dict[str, Any]], page_size: tuple[int, int]) -> list[BBox]:
diff --git a/mineru/backend/analysis/pdf/ocr.py b/mineru/backend/analysis/pdf/ocr.py
index 8e10b1ef..baf52487 100644
--- a/mineru/backend/analysis/pdf/ocr.py
+++ b/mineru/backend/analysis/pdf/ocr.py
@@ -12,7 +12,7 @@ from tqdm import tqdm
from ....model.runtime.hybrid import HybridLocalModelContext
from ....types import BlockType
-from docgale.foundation.geometry import normalize_to_int_bbox
+from docvortex.foundation.geometry import normalize_to_int_bbox
from .images import crop_img
from ....model.ocr.geometry import merge_det_boxes, sorted_boxes, update_det_boxes
from ....model.ocr.image import mask_formula_regions_for_ocr_det
@@ -25,8 +25,8 @@ from .constants import (
VLM_OCR_DET_TYPE,
VLM_TXT_DET_TYPE,
)
-from docgale.document.pdf.geometry import bbox_to_pixel_bbox as _bbox_to_pixel_bbox
-from docgale.document.pdf.geometry import normalize_medium_content as _normalize_medium_content
+from docvortex.document.pdf.geometry import bbox_to_pixel_bbox as _bbox_to_pixel_bbox
+from docvortex.document.pdf.geometry import normalize_medium_content as _normalize_medium_content
@dataclass
diff --git a/mineru/backend/analysis/pdf/pipeline.py b/mineru/backend/analysis/pdf/pipeline.py
index 17c458a2..f4f47a3f 100644
--- a/mineru/backend/analysis/pdf/pipeline.py
+++ b/mineru/backend/analysis/pdf/pipeline.py
@@ -11,7 +11,7 @@ from ....config import VlmConfig
from ....model.runtime.hybrid import HybridLocalModelContextSingleton
from ....model.runtime.memory import clean_memory
from ....model.vlm.client import get_vlm_predictor
-from docgale.document.pdf.document import PDFDocument
+from docvortex.document.pdf.document import PDFDocument
from .normalization import _normalize_pdf_model_list
from .window import process_pdf_windows
diff --git a/mineru/backend/analysis/pdf/tables.py b/mineru/backend/analysis/pdf/tables.py
index d1d6e869..f8bf83ec 100644
--- a/mineru/backend/analysis/pdf/tables.py
+++ b/mineru/backend/analysis/pdf/tables.py
@@ -16,18 +16,18 @@ from loguru import logger
from ....model.runtime.hybrid import HybridLocalModelContext, run_ocr_inference
from ....model.runtime.contracts import AtomicModelName
from ....types import RAW_ALGORITHM, RAW_FORMULA_NUMBER, RAW_PHONETIC, BBox, BlockType
-from docgale.foundation.geometry import calculate_overlap_area_in_bbox1_area_ratio
-from docgale.foundation.geometry import normalize_to_int_bbox
-from docgale.analyzers.native.pdf.table_recovery import NativeTableInput
-from docgale.analyzers.native.pdf.table_recovery import coerce_native_table_rectangles
-from docgale.analyzers.native.pdf.table_recovery import coerce_native_table_rules
-from docgale.analyzers.native.pdf.table_recovery import recover_native_pdf_table
-from docgale.analyzers.native.pdf.table_text_styles import render_native_table_html_with_scripts
+from docvortex.foundation.geometry import calculate_overlap_area_in_bbox1_area_ratio
+from docvortex.foundation.geometry import normalize_to_int_bbox
+from docvortex.analyzers.native.pdf.table_recovery import NativeTableInput
+from docvortex.analyzers.native.pdf.table_recovery import coerce_native_table_rectangles
+from docvortex.analyzers.native.pdf.table_recovery import coerce_native_table_rules
+from docvortex.analyzers.native.pdf.table_recovery import recover_native_pdf_table
+from docvortex.analyzers.native.pdf.table_text_styles import render_native_table_html_with_scripts
from ....model.ocr.image import mask_formula_regions_for_ocr_det
-from docgale.document.pdf.document import PDFPage
-from docgale.document.pdf.document import PDFPageTextGeometry
-from docgale.document.pdf.document import get_lines_from_chars
-from docgale.analyzers.native.pdf.shared import project_table_text as project_ocr_table_text
+from docvortex.document.pdf.document import PDFPage
+from docvortex.document.pdf.document import PDFPageTextGeometry
+from docvortex.document.pdf.document import get_lines_from_chars
+from docvortex.analyzers.native.pdf.shared import project_table_text as project_ocr_table_text
from .constants import (
BATCH_RATIO,
@@ -37,17 +37,17 @@ from .constants import (
TABLE_TEXT_ORIENTATION_MIN_DOMINANCE_RATIO,
TABLE_TEXT_ORIENTATION_MIN_VALID_LINES,
)
-from docgale.document.pdf.geometry import bbox_to_pixel_bbox as _bbox_to_pixel_bbox
-from docgale.document.pdf.geometry import encode_page_crop_as_jpeg_data_uri as _encode_page_crop_as_jpeg_data_uri
-from docgale.document.pdf.geometry import get_medium_table_virtual_image_bbox as _get_medium_table_virtual_image_bbox
-from docgale.document.pdf.geometry import medium_bbox_to_quad as _medium_bbox_to_quad
-from docgale.document.pdf.geometry import normalize_medium_content as _normalize_medium_content
-from docgale.document.pdf.geometry import normalize_page_size as _normalize_page_size
-from docgale.document.pdf.geometry import normalize_visual_block_angle as _normalize_visual_block_angle
-from docgale.document.pdf.geometry import rotate_medium_table_bbox as _rotate_medium_table_bbox
-from docgale.document.pdf.geometry import rotate_visual_block_image_to_upright as _rotate_visual_block_image_to_upright
-from docgale.document.pdf.geometry import sidecar_bbox_to_page_bbox as _sidecar_bbox_to_page_bbox
-from docgale.document.pdf.geometry import table_bbox_center as _table_bbox_center
+from docvortex.document.pdf.geometry import bbox_to_pixel_bbox as _bbox_to_pixel_bbox
+from docvortex.document.pdf.geometry import encode_page_crop_as_jpeg_data_uri as _encode_page_crop_as_jpeg_data_uri
+from docvortex.document.pdf.geometry import get_medium_table_virtual_image_bbox as _get_medium_table_virtual_image_bbox
+from docvortex.document.pdf.geometry import medium_bbox_to_quad as _medium_bbox_to_quad
+from docvortex.document.pdf.geometry import normalize_medium_content as _normalize_medium_content
+from docvortex.document.pdf.geometry import normalize_page_size as _normalize_page_size
+from docvortex.document.pdf.geometry import normalize_visual_block_angle as _normalize_visual_block_angle
+from docvortex.document.pdf.geometry import rotate_medium_table_bbox as _rotate_medium_table_bbox
+from docvortex.document.pdf.geometry import rotate_visual_block_image_to_upright as _rotate_visual_block_image_to_upright
+from docvortex.document.pdf.geometry import sidecar_bbox_to_page_bbox as _sidecar_bbox_to_page_bbox
+from docvortex.document.pdf.geometry import table_bbox_center as _table_bbox_center
from .text.native import _is_supported_rotation
diff --git a/mineru/backend/analysis/pdf/text/content.py b/mineru/backend/analysis/pdf/text/content.py
index 3ea8f4a0..ac458a94 100644
--- a/mineru/backend/analysis/pdf/text/content.py
+++ b/mineru/backend/analysis/pdf/text/content.py
@@ -9,29 +9,29 @@ import numpy as np
from PIL import Image
from .....model.runtime.hybrid import HybridLocalModelContext, run_ocr_inference
from .....types import BBox, BlockType, ContentType
-from docgale.foundation.language import detect_lang
+from docvortex.foundation.language import detect_lang
from .....model.ocr.image import rotate_vertical_crop_if_needed
from .....model.ocr.results import OcrConfidence
-from docgale.document.pdf.document import PDFPage
-from docgale.document.pdf.document import PDFPageTextGeometry
-from docgale.document.pdf.document import get_lines_from_chars
-from docgale.analyzers.native.pdf.text_styles import PDF_NATIVE_SCRIPT_MARKUP_KEY
-from docgale.analyzers.native.pdf.text_styles import PDFTextLinkLine
-from docgale.analyzers.native.pdf.text_styles import PDFTextScriptLine
-from docgale.analyzers.native.pdf.text_styles import PDFTextStyleLine
-from docgale.analyzers.native.pdf.text_styles import apply_pdf_text_links
-from docgale.analyzers.native.pdf.text_styles import apply_pdf_text_scripts
-from docgale.analyzers.native.pdf.text_styles import apply_pdf_text_styles
-from docgale.analyzers.native.pdf.text_styles import materialize_pdf_inline_spans
-from docgale.foundation.text import merge_text_line_contents
+from docvortex.document.pdf.document import PDFPage
+from docvortex.document.pdf.document import PDFPageTextGeometry
+from docvortex.document.pdf.document import get_lines_from_chars
+from docvortex.analyzers.native.pdf.text_styles import PDF_NATIVE_SCRIPT_MARKUP_KEY
+from docvortex.analyzers.native.pdf.text_styles import PDFTextLinkLine
+from docvortex.analyzers.native.pdf.text_styles import PDFTextScriptLine
+from docvortex.analyzers.native.pdf.text_styles import PDFTextStyleLine
+from docvortex.analyzers.native.pdf.text_styles import apply_pdf_text_links
+from docvortex.analyzers.native.pdf.text_styles import apply_pdf_text_scripts
+from docvortex.analyzers.native.pdf.text_styles import apply_pdf_text_styles
+from docvortex.analyzers.native.pdf.text_styles import materialize_pdf_inline_spans
+from docvortex.foundation.text import merge_text_line_contents
from ..constants import (
CODE_CONTENT_BLOCK_TYPES,
LINE_METADATA_BLOCK_TYPES,
TITLE_BLOCK_TYPES,
)
-from docgale.document.pdf.geometry import bbox_to_pixel_bbox as _bbox_to_pixel_bbox
-from docgale.document.pdf.geometry import sidecar_bbox_to_page_bbox as _sidecar_bbox_to_page_bbox
+from docvortex.document.pdf.geometry import bbox_to_pixel_bbox as _bbox_to_pixel_bbox
+from docvortex.document.pdf.geometry import sidecar_bbox_to_page_bbox as _sidecar_bbox_to_page_bbox
from .lines import group_spans_to_lines
from .models import _AnalyzeLine, _AnalyzeSpan
from .native import (
diff --git a/mineru/backend/analysis/pdf/text/native.py b/mineru/backend/analysis/pdf/text/native.py
index 039075e1..d46591ae 100644
--- a/mineru/backend/analysis/pdf/text/native.py
+++ b/mineru/backend/analysis/pdf/text/native.py
@@ -13,16 +13,16 @@ from typing import Any, Callable, cast
import cv2
import numpy as np
from loguru import logger
-from docgale.document.pdf.text.contracts import Char
+from docvortex.document.pdf.text.contracts import Char
from .....types import BBox, BlockType, ContentType
-from docgale.document.pdf.document import PDFPage
-from docgale.document.pdf.document import get_lines_from_chars
-from docgale.analyzers.native.pdf.script_geometry import ScriptRole
-from docgale.analyzers.native.pdf.script_geometry import classify_char_script_roles
-from docgale.analyzers.native.pdf.text_styles import PDF_NATIVE_SCRIPT_MARKUP_KEY
-from docgale.foundation.geometry import calculate_overlap_area_in_bbox1_area_ratio
-from docgale.foundation.image import calculate_contrast
+from docvortex.document.pdf.document import PDFPage
+from docvortex.document.pdf.document import get_lines_from_chars
+from docvortex.analyzers.native.pdf.script_geometry import ScriptRole
+from docvortex.analyzers.native.pdf.script_geometry import classify_char_script_roles
+from docvortex.analyzers.native.pdf.text_styles import PDF_NATIVE_SCRIPT_MARKUP_KEY
+from docvortex.foundation.geometry import calculate_overlap_area_in_bbox1_area_ratio
+from docvortex.foundation.image import calculate_contrast
from ..images import get_crop_img
from .models import _AnalyzeSpan
@@ -778,7 +778,7 @@ def calculate_char_in_span(
def _get_char_bbox_metrics(char: Char) -> dict[str, float]:
- """提取字符 bbox 的宽高和中心点,统一兼容 list 与 DocGale Bbox 对象。"""
+ """提取字符 bbox 的宽高和中心点,统一兼容 list 与 DocVortex Bbox 对象。"""
bbox = char["bbox"]
x0, y0, x1, y1 = [float(v) for v in bbox]
return {
diff --git a/mineru/backend/analysis/pdf/text/styles.py b/mineru/backend/analysis/pdf/text/styles.py
index 1d46b0d4..a24cf238 100644
--- a/mineru/backend/analysis/pdf/text/styles.py
+++ b/mineru/backend/analysis/pdf/text/styles.py
@@ -5,15 +5,15 @@ from __future__ import annotations
from typing import Any, Sequence
-from docgale.document.pdf.document import PDFPage
-from docgale.document.pdf.document import PDFPageTextGeometry
-from docgale.document.pdf.document import get_lines_from_chars
-from docgale.analyzers.native.pdf.text_styles import PDFTextLinkLine
-from docgale.analyzers.native.pdf.text_styles import PDFTextScriptLine
-from docgale.analyzers.native.pdf.text_styles import PDFTextStyleLine
-from docgale.analyzers.native.pdf.text_styles import detect_pdf_text_link_lines
-from docgale.analyzers.native.pdf.text_styles import detect_pdf_text_script_lines
-from docgale.analyzers.native.pdf.text_styles import detect_pdf_text_style_lines
+from docvortex.document.pdf.document import PDFPage
+from docvortex.document.pdf.document import PDFPageTextGeometry
+from docvortex.document.pdf.document import get_lines_from_chars
+from docvortex.analyzers.native.pdf.text_styles import PDFTextLinkLine
+from docvortex.analyzers.native.pdf.text_styles import PDFTextScriptLine
+from docvortex.analyzers.native.pdf.text_styles import PDFTextStyleLine
+from docvortex.analyzers.native.pdf.text_styles import detect_pdf_text_link_lines
+from docvortex.analyzers.native.pdf.text_styles import detect_pdf_text_script_lines
+from docvortex.analyzers.native.pdf.text_styles import detect_pdf_text_style_lines
from .....types import BBox
@@ -69,11 +69,11 @@ def build_pdf_native_visual_lines_and_styles(
"""一次读取当前页字符,构造视觉 run、普通样式、链接和脚本证据。"""
# 延迟导入避免 Hybrid 模块初始化时提前加载完整 Flash PDF 流水线。
- from docgale.analyzers.native.pdf.shared import build_native_line_items as _build_native_line_items
- from docgale.analyzers.native.pdf.shared import (
+ from docvortex.analyzers.native.pdf.shared import build_native_line_items as _build_native_line_items
+ from docvortex.analyzers.native.pdf.shared import (
merge_overlapping_inline_text_clusters as _merge_overlapping_inline_text_clusters,
)
- from docgale.analyzers.native.pdf.shared import merge_same_baseline_text_lines as _merge_same_baseline_text_lines
+ from docvortex.analyzers.native.pdf.shared import merge_same_baseline_text_lines as _merge_same_baseline_text_lines
geometry = page_text_geometry if page_text_geometry is not None else pdf_page.get_chars_with_geometry()
chars = geometry.chars
diff --git a/mineru/backend/analysis/pdf/window.py b/mineru/backend/analysis/pdf/window.py
index 24c1fff5..561cf1b8 100644
--- a/mineru/backend/analysis/pdf/window.py
+++ b/mineru/backend/analysis/pdf/window.py
@@ -10,9 +10,9 @@ import numpy as np
from loguru import logger
from ....model.runtime.hybrid import HybridLocalModelContext
-from docgale.document.pdf.document import PDFDocument
-from docgale.document.pdf.document import PDFPage
-from docgale.document.pdf.document import PDFPageTextGeometry
+from docvortex.document.pdf.document import PDFDocument
+from docvortex.document.pdf.document import PDFPage
+from docvortex.document.pdf.document import PDFPageTextGeometry
from .images import load_images_from_pdf_bytes_range
from ..contracts import AnalyzeEffort
@@ -23,7 +23,7 @@ from .constants import (
NOT_EXTRACT_TYPES,
PIPELINE_DET_TYPE,
)
-from docgale.document.pdf.geometry import normalize_page_size as _normalize_page_size
+from docvortex.document.pdf.geometry import normalize_page_size as _normalize_page_size
from .layout import (
_build_vl_style_layout_blocks,
_collect_table_items,
@@ -52,8 +52,8 @@ from .tables import (
_restore_native_high_table_blocks,
_split_native_high_table_blocks,
)
-from docgale.document.pdf.visuals import attach_visual_block_images as _attach_visual_block_images
-from docgale.document.pdf.visuals import supplement_missing_image_block_containers as _supplement_missing_image_block_containers
+from docvortex.document.pdf.visuals import attach_visual_block_images as _attach_visual_block_images
+from docvortex.document.pdf.visuals import supplement_missing_image_block_containers as _supplement_missing_image_block_containers
from .text.content import (
_fill_window_block_content_and_lines,
_validate_text_formula_window_inputs,
@@ -295,7 +295,7 @@ def process_pdf_windows(
model_list: list[list[dict[str, Any]]] = []
if flash_txt_mode:
# Flash 先对整份 PDF 生成完整 model_list,不依赖页面渲染和处理窗口。
- from docgale.analyzers.native import PdfModel
+ from docvortex.analyzers.native import PdfModel
model_list = PdfModel().predict(document)
diff --git a/mineru/backend/analyze.py b/mineru/backend/analyze.py
index c697ee05..8d3cf74e 100644
--- a/mineru/backend/analyze.py
+++ b/mineru/backend/analyze.py
@@ -2,8 +2,8 @@
"""统一 PDF、EPUB、HTML、OFD、CSV 与 Office/RTF 文档分析的稳定公共门面。"""
from __future__ import annotations
-from docgale.schema import Producer
-from ..integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from ..integrations.docvortex import build_metadata
import asyncio
from typing import cast
@@ -12,7 +12,7 @@ from loguru import logger
from .analysis.contracts import AnalyzeEffort, OfficeSuffix, ParseMode
from ..config import VlmConfig, config
-from docgale.analyzers.native.html import HtmlSourceContext
+from docvortex.analyzers.native.html import HtmlSourceContext
from ..types import FILE_SUFFIXES, FileSuffix, MiddleJson, ModelJson
from ..version import __version__ as mineru_version
diff --git a/mineru/backend/postprocess/__init__.py b/mineru/backend/postprocess/__init__.py
index a199121f..d2ec67be 100644
--- a/mineru/backend/postprocess/__init__.py
+++ b/mineru/backend/postprocess/__init__.py
@@ -1,4 +1,4 @@
# Copyright (c) Opendatalab. All rights reserved.
-"""宿主后处理编排与可选 LLM 增强,确定性实现由 DocGale 提供。"""
+"""宿主后处理编排与可选 LLM 增强,确定性实现由 DocVortex 提供。"""
__all__ = []
diff --git a/mineru/backend/postprocess/document.py b/mineru/backend/postprocess/document.py
index bb55d8a2..ebef0e3d 100644
--- a/mineru/backend/postprocess/document.py
+++ b/mineru/backend/postprocess/document.py
@@ -2,14 +2,14 @@
"""共享确定性文档后处理,并在 MinerU 边界执行可选智能增强。"""
from __future__ import annotations
-from docgale.postprocess.document import model_json_to_middle_json as build_middle_json
+from docvortex.postprocess.document import model_json_to_middle_json as build_middle_json
from ...config import LLMAidedConfig
from ...types import MiddleJson, ModelJson
from .llm_aided import apply_llm_aided_postprocess
def model_json_to_middle_json(model_json: ModelJson, *, llm_aided_config: LLMAidedConfig) -> MiddleJson:
- """只由宿主显式启用 LLM,DocGale 的默认后处理完整且独立。"""
+ """只由宿主显式启用 LLM,DocVortex 的默认后处理完整且独立。"""
middle_json = build_middle_json(model_json)
if model_json.file_suffix == "pdf":
apply_llm_aided_postprocess(middle_json, llm_aided_config)
diff --git a/mineru/backend/postprocess/table_merge/__init__.py b/mineru/backend/postprocess/table_merge/__init__.py
index 719dd32b..6a9e8d4b 100644
--- a/mineru/backend/postprocess/table_merge/__init__.py
+++ b/mineru/backend/postprocess/table_merge/__init__.py
@@ -1,7 +1,7 @@
# Copyright (c) Opendatalab. All rights reserved.
"""共享跨页表格内容操作的稳定入口。"""
-from docgale.content.table import (
+from docvortex.content.table import (
merge_table,
merge_table_content,
build_table_state_from_html,
diff --git a/mineru/backend/postprocess/table_merge/llm_cell_merge.py b/mineru/backend/postprocess/table_merge/llm_cell_merge.py
index 6858fe70..ca04fa0d 100644
--- a/mineru/backend/postprocess/table_merge/llm_cell_merge.py
+++ b/mineru/backend/postprocess/table_merge/llm_cell_merge.py
@@ -10,10 +10,10 @@ from typing import Literal, cast
from ....types import PageInfo, TableBlock, TableBodyBlock
-from docgale.content.table.html import build_row_rendered_cell_segments
-from docgale.content.table.html import build_table_state_from_html
-from docgale.content.table import expand_header_count_by_rowspan as _expand_header_count_by_rowspan
-from docgale.content.table.structure import detect_table_headers
+from docvortex.content.table.html import build_row_rendered_cell_segments
+from docvortex.content.table.html import build_table_state_from_html
+from docvortex.content.table import expand_header_count_by_rowspan as _expand_header_count_by_rowspan
+from docvortex.content.table.structure import detect_table_headers
from ..llm_client import LLMAidedClient
CellMergeFlag = Literal[0, 1]
diff --git a/mineru/backend/postprocess/title_leveling.py b/mineru/backend/postprocess/title_leveling.py
index 8b7bd8e8..c660a31e 100644
--- a/mineru/backend/postprocess/title_leveling.py
+++ b/mineru/backend/postprocess/title_leveling.py
@@ -8,7 +8,7 @@ import json
from typing import Any
from ...types import DocTitleBlock, PageInfo, ParagraphTitleBlock
-from docgale.content.inline import inline_plain_text
+from docvortex.content.inline import inline_plain_text
from .llm_client import LLMAidedClient
diff --git a/mineru/config.py b/mineru/config.py
index 12aa1393..6b42d5a0 100644
--- a/mineru/config.py
+++ b/mineru/config.py
@@ -1,7 +1,7 @@
"""MinerU startup configuration."""
from __future__ import annotations
-from docgale.options import LatexDelimiterConfig, LatexDelimitersConfig
+from docvortex.options import LatexDelimiterConfig, LatexDelimitersConfig
import copy
import logging
diff --git a/mineru/doclib/background/compaction.py b/mineru/doclib/background/compaction.py
index 99cae1de..481d5f48 100644
--- a/mineru/doclib/background/compaction.py
+++ b/mineru/doclib/background/compaction.py
@@ -1,8 +1,8 @@
"""Compaction — merges overlapping / adjacent done parse batches to keep the parses table lean."""
from __future__ import annotations
-from docgale.schema import Producer
-from ...integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from ...integrations.docvortex import build_metadata
import asyncio
import json
@@ -39,8 +39,8 @@ def _normalize_batch_pages(batch_payload: dict[str, Any]) -> list[dict[str, Any]
if not isinstance(raw_pages, list) or any(not isinstance(page, dict) for page in raw_pages):
raise ValueError("stale Middle JSON cache requires source reparse")
- from docgale.compat.legacy_schema_adapter import legacy_page_to_model_list
- from docgale.postprocess.pages import model_json_to_pages
+ from docvortex.compat.legacy_schema_adapter import legacy_page_to_model_list
+ from docvortex.postprocess.pages import model_json_to_pages
from ...parser.base import (
_legacy_effort,
_legacy_file_suffix,
diff --git a/mineru/doclib/core/file_io.py b/mineru/doclib/core/file_io.py
index 3b9299b5..34648804 100644
--- a/mineru/doclib/core/file_io.py
+++ b/mineru/doclib/core/file_io.py
@@ -9,7 +9,7 @@ from dataclasses import dataclass
from pathlib import Path
from ...filetypes import CSV_EXTENSIONS, EPUB_EXTENSIONS, ODF_EXTENSIONS, OFD_EXTENSIONS, OFFICE_EXTENSIONS
-from docgale.document.pdf.document import PDFDocument
+from docvortex.document.pdf.document import PDFDocument
# Optional office doc support
try:
@@ -210,7 +210,7 @@ async def _extract_office_meta(filepath: str, ext: str, result: dict) -> None:
wb.close()
elif ext in ODF_EXTENSIONS:
- from docgale.analyzers.native.office.odf.metadata import extract_odf_metadata
+ from docvortex.analyzers.native.office.odf.metadata import extract_odf_metadata
try:
with open(filepath, "rb") as odf_file:
@@ -220,7 +220,7 @@ async def _extract_office_meta(filepath: str, ext: str, result: dict) -> None:
result.update(metadata)
elif ext == "rtf":
- from docgale.analyzers.native.office.rtf.converter import extract_rtf_metadata
+ from docvortex.analyzers.native.office.rtf.converter import extract_rtf_metadata
try:
with open(filepath, "rb") as rtf_file:
@@ -241,7 +241,7 @@ async def _extract_epub_meta(filepath: str, result: dict) -> None:
def _extract() -> None:
"""打开 EPUB 文件流并把原生 metadata 合并到 doclib 结果。"""
- from docgale.analyzers.native.epub import extract_epub_metadata
+ from docvortex.analyzers.native.epub import extract_epub_metadata
try:
with open(filepath, "rb") as epub_file:
@@ -258,7 +258,7 @@ async def _extract_ofd_meta(filepath: str, result: dict) -> None:
def _extract() -> None:
"""打开 OFD 文件流并合并原生元数据。"""
- from docgale.analyzers.native.ofd import extract_ofd_metadata
+ from docvortex.analyzers.native.ofd import extract_ofd_metadata
try:
with open(filepath, "rb") as ofd_file:
diff --git a/mineru/doclib/server.py b/mineru/doclib/server.py
index f63969f2..706eb860 100644
--- a/mineru/doclib/server.py
+++ b/mineru/doclib/server.py
@@ -1,7 +1,7 @@
"""New doclib HTTP server implementation backed by the public interface."""
from __future__ import annotations
-from docgale.content.tree import iter_child_blocks as _iter_child_blocks
+from docvortex.content.tree import iter_child_blocks as _iter_child_blocks
import asyncio
import math
@@ -32,9 +32,9 @@ from ..parser.page_range import (
normalize_result_page_range,
)
from ..parser.tier import TierDependencyError, ensure_tier_runtime_dependencies
-from docgale.render.markdown import build_markdown_image
-from docgale.render.markdown import render_single_block
-from docgale.foundation.image_payload import parse_image_data_uri_strict
+from docvortex.render.markdown import build_markdown_image
+from docvortex.render.markdown import render_single_block
+from docvortex.foundation.image_payload import parse_image_data_uri_strict
from ..types import (
DEPLOYMENT_TIERS,
TIERS,
@@ -49,7 +49,7 @@ from ..types import (
)
from ..model.download import verify_model_repo
from ..model.registry import ModelRepo, model_repos_for_tier
-from docgale.document.pdf.document import PDFDocument
+from docvortex.document.pdf.document import PDFDocument
from ..version import __version__
from .background.parse_server_health import get_health, get_managed_parse_server_tier
from .base import AsyncDoclibInterface
diff --git a/mineru/doclib/services/parse_svc.py b/mineru/doclib/services/parse_svc.py
index ebfc30a2..39f3caa8 100644
--- a/mineru/doclib/services/parse_svc.py
+++ b/mineru/doclib/services/parse_svc.py
@@ -1410,7 +1410,7 @@ class ParseService:
continue
from ...config import config
- from docgale.render.markdown import render_single_block
+ from docvortex.render.markdown import render_single_block
delimiters = config.render.latex_delimiters
parts: list[str] = []
diff --git a/mineru/filetypes.py b/mineru/filetypes.py
index e3589675..df57a4f5 100644
--- a/mineru/filetypes.py
+++ b/mineru/filetypes.py
@@ -8,7 +8,7 @@ from .types import QUALITY_TIERS, Tier, validate_tier
# ── file types ─────────────────────────────────────────────────────
-# Legacy Office binary formats and RTF are natively parsed by DocGale native Office converters.
+# Legacy Office binary formats and RTF are natively parsed by DocVortex native Office converters.
# Unsupported document/e-book/archive-like formats:
# "key",
# "mobi",
diff --git a/mineru/integrations/docgale.py b/mineru/integrations/docvortex.py
similarity index 91%
rename from mineru/integrations/docgale.py
rename to mineru/integrations/docvortex.py
index d514f960..85312edf 100644
--- a/mineru/integrations/docgale.py
+++ b/mineru/integrations/docvortex.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from docgale.compat.mineru import MinerUMetadata
+from docvortex.compat.mineru import MinerUMetadata
from pydantic import JsonValue
diff --git a/mineru/kit/commands/vlm_server.py b/mineru/kit/commands/vlm_server.py
index 387eb47f..abb9074a 100644
--- a/mineru/kit/commands/vlm_server.py
+++ b/mineru/kit/commands/vlm_server.py
@@ -9,7 +9,7 @@ from typing import Literal
import typer
from loguru import logger
-from docgale.foundation.platform import is_mac_os_version_supported
+from docvortex.foundation.platform import is_mac_os_version_supported
from ...utils.stdio import configure_standard_streams
from ..errors import exit_with_message
diff --git a/mineru/kit/gradio/artifacts.py b/mineru/kit/gradio/artifacts.py
index acfe81bf..e9c82c35 100644
--- a/mineru/kit/gradio/artifacts.py
+++ b/mineru/kit/gradio/artifacts.py
@@ -16,8 +16,8 @@ from urllib.parse import quote
from loguru import logger
from ...filetypes import IMAGE_EXTENSIONS, PDF_EXTENSIONS
-from docgale.document.pdf.document import PDFDocument
-from docgale.document.pdf.pdfium import safe_rewrite_pdf_bytes_with_pdfium_result
+from docvortex.document.pdf.document import PDFDocument
+from docvortex.document.pdf.pdfium import safe_rewrite_pdf_bytes_with_pdfium_result
from ...parser.base import ParseResult
from ...parser.page_range import parse_page_range
from ...render import (
@@ -33,8 +33,8 @@ from ...render import (
render,
)
from ...types import BlockBase, ImagePayloadBlock, MiddleJson
-from docgale.foundation.image_payload import parse_image_data_uri_strict
-from docgale.foundation.image_payload import validate_image_sidecar_path
+from docvortex.foundation.image_payload import parse_image_data_uri_strict
+from docvortex.foundation.image_payload import validate_image_sidecar_path
DownloadFormat = Literal["zip", "html", "docx", "latex", "epub", "pdf"]
diff --git a/mineru/kit/gradio/page_range.py b/mineru/kit/gradio/page_range.py
index 630d23c8..667bb613 100644
--- a/mineru/kit/gradio/page_range.py
+++ b/mineru/kit/gradio/page_range.py
@@ -28,7 +28,7 @@ def read_pdf_page_count(path: str | Path) -> int:
"""在共享 PDFium 锁内读取页数,并在成功或异常时及时释放文档。"""
import pypdfium2 as pdfium
- from docgale.document.pdf.pdfium import pdfium_guard
+ from docvortex.document.pdf.pdfium import pdfium_guard
try:
with pdfium_guard():
diff --git a/mineru/model/layout/pp_doclayout_v2_base.py b/mineru/model/layout/pp_doclayout_v2_base.py
index 057664f6..9ffdf493 100644
--- a/mineru/model/layout/pp_doclayout_v2_base.py
+++ b/mineru/model/layout/pp_doclayout_v2_base.py
@@ -18,7 +18,7 @@ from typing import Dict, List, Optional, Sequence, Tuple, Union
import numpy as np
from PIL import Image, ImageDraw, ImageFont
-from docgale.foundation.geometry import normalize_to_int_bbox
+from docvortex.foundation.geometry import normalize_to_int_bbox
DEFAULT_IMAGE_SIZE = (800, 800)
DEFAULT_RESCALE_FACTOR = 1.0 / 255.0
diff --git a/mineru/model/ocr/image.py b/mineru/model/ocr/image.py
index cd71cb69..daa2ed7e 100644
--- a/mineru/model/ocr/image.py
+++ b/mineru/model/ocr/image.py
@@ -8,7 +8,7 @@ from typing import Any
import cv2
import numpy as np
-from docgale.foundation.geometry import normalize_to_int_bbox
+from docvortex.foundation.geometry import normalize_to_int_bbox
from .geometry import is_bbox_aligned_rect
TEXT_REC_ROTATE_RATIO = 1.5
diff --git a/mineru/model/ocr/results.py b/mineru/model/ocr/results.py
index a5d68de0..ddcc66f9 100644
--- a/mineru/model/ocr/results.py
+++ b/mineru/model/ocr/results.py
@@ -8,7 +8,7 @@ from typing import Any
import numpy as np
-from docgale.foundation.geometry import normalize_to_int_bbox
+from docvortex.foundation.geometry import normalize_to_int_bbox
from .geometry import calculate_is_angle
from .image import get_rotate_crop_image_for_text_rec
diff --git a/mineru/model/table/rec/unet_table/main.py b/mineru/model/table/rec/unet_table/main.py
index 1bb516b2..25bd247d 100644
--- a/mineru/model/table/rec/unet_table/main.py
+++ b/mineru/model/table/rec/unet_table/main.py
@@ -12,7 +12,7 @@ from bs4 import BeautifulSoup
from loguru import logger
from PIL import Image
-from docgale.foundation.image import calculate_contrast
+from docvortex.foundation.image import calculate_contrast
from ....registry import PDF_EXTRACT_KIT
from .table_recover import TableRecover
diff --git a/mineru/model/vlm/engine_utils.py b/mineru/model/vlm/engine_utils.py
index 4e2c0f11..0b4c9590 100644
--- a/mineru/model/vlm/engine_utils.py
+++ b/mineru/model/vlm/engine_utils.py
@@ -6,8 +6,8 @@ from typing import Any, Literal
from loguru import logger
from packaging import version
-from docgale.foundation.platform import is_linux_environment
-from docgale.foundation.platform import is_windows_environment
+from docvortex.foundation.platform import is_linux_environment
+from docvortex.foundation.platform import is_windows_environment
from ..runtime.device import get_device
from ..runtime.memory import get_vram
diff --git a/mineru/model/vlm/runtime.py b/mineru/model/vlm/runtime.py
index a71a44f7..d23a9bfc 100644
--- a/mineru/model/vlm/runtime.py
+++ b/mineru/model/vlm/runtime.py
@@ -16,7 +16,7 @@ from loguru import logger
from mineru_vl_utils import MinerUClient
from packaging import version
-from docgale.foundation.platform import is_mac_os_version_supported
+from docvortex.foundation.platform import is_mac_os_version_supported
from ..runtime.device import get_device
from ..registry import MINERU_2_5_PRO_2605_1_2B, MINERU_2_5_PRO_2605_1_2B_GGUF
from .engine_utils import (
diff --git a/mineru/model/vlm/selector.py b/mineru/model/vlm/selector.py
index 3e86cb1d..dffbc73f 100644
--- a/mineru/model/vlm/selector.py
+++ b/mineru/model/vlm/selector.py
@@ -3,10 +3,10 @@ from typing import Literal, TypeAlias
from loguru import logger
-from docgale.foundation.platform import is_linux_environment
-from docgale.foundation.platform import is_mac_environment
-from docgale.foundation.platform import is_mac_os_version_supported
-from docgale.foundation.platform import is_windows_environment
+from docvortex.foundation.platform import is_linux_environment
+from docvortex.foundation.platform import is_mac_environment
+from docvortex.foundation.platform import is_mac_os_version_supported
+from docvortex.foundation.platform import is_windows_environment
VlmEngine: TypeAlias = Literal[
"llama-cpp-engine",
diff --git a/mineru/parser/__init__.py b/mineru/parser/__init__.py
index 28680556..b165245d 100644
--- a/mineru/parser/__init__.py
+++ b/mineru/parser/__init__.py
@@ -5,7 +5,7 @@ from pathlib import Path
from typing import Literal
from ..config import VlmConfig
-from docgale.analyzers.native.html import HtmlSourceContext
+from docvortex.analyzers.native.html import HtmlSourceContext
from ..types import Tier
from .api_client import ApiJobStatus, MinerUApiParser
from .base import MIDDLE_JSON_SCHEMA_VERSION, DocumentParser, ParseResult
diff --git a/mineru/parser/api_client.py b/mineru/parser/api_client.py
index e2bcdcc3..a2857e48 100644
--- a/mineru/parser/api_client.py
+++ b/mineru/parser/api_client.py
@@ -28,7 +28,7 @@ import httpx
from ..filetypes import mime_type_for_extension
from ..types import PageInfo, Tier, validate_tier
-from docgale.foundation.image_payload import validate_image_sidecar_path
+from docvortex.foundation.image_payload import validate_image_sidecar_path
from .base import DocumentParser, ParseResult
from .page_range import normalize_page_range_input
diff --git a/mineru/parser/api_server.py b/mineru/parser/api_server.py
index 5461bbb4..21f5f660 100644
--- a/mineru/parser/api_server.py
+++ b/mineru/parser/api_server.py
@@ -50,7 +50,7 @@ from ..filetypes import (
from .writer import DataWriter
from ..types import SERVER_TIERS, TIERS_BY_SERVER_TIER, DeploymentTier, PageInfo, ServerTier, Tier, select_default_quality_tier
from .tier import effort_for_tier
-from docgale.foundation.image_payload import validate_image_sidecar_path
+from docvortex.foundation.image_payload import validate_image_sidecar_path
from .process_control import ManagedProcessControlWatcher
from ..model.ocr.language import PUBLIC_OCR_LANGUAGES, validate_public_ocr_lang
from ..utils.stdio import configure_standard_streams
@@ -1375,7 +1375,7 @@ async def _run_job(
source_context = None
if stype == "html":
- from docgale.analyzers.native.html import HtmlSourceContext
+ from docvortex.analyzers.native.html import HtmlSourceContext
source_context = HtmlSourceContext(
source_uri=extracted.source_uri,
diff --git a/mineru/parser/base.py b/mineru/parser/base.py
index 30eb1f41..60a3ee5e 100644
--- a/mineru/parser/base.py
+++ b/mineru/parser/base.py
@@ -1,8 +1,8 @@
# Copyright (c) Opendatalab. All rights reserved.
from __future__ import annotations
-from docgale.compat.mineru import from_mineru_middle, to_mineru_middle, to_mineru_model
-from docgale.schema import Producer
-from ..integrations.docgale import build_metadata
+from docvortex.compat.mineru import from_mineru_middle, to_mineru_middle, to_mineru_model
+from docvortex.schema import Producer
+from ..integrations.docvortex import build_metadata
import json
from abc import ABC, abstractmethod
@@ -124,7 +124,7 @@ class ParseResult:
@staticmethod
def _build_middle_json_from_legacy(d: dict[str, Any], raw_pages: list[dict[str, Any]]) -> MiddleJson:
"""把 3.4.5 页面回推为 raw ModelJson,再走当前统一后处理生成 2.0。"""
- from docgale.compat.legacy_schema_adapter import legacy_page_to_model_list
+ from docvortex.compat.legacy_schema_adapter import legacy_page_to_model_list
from ..version import __version__ as current_mineru_version
source_version = d.get("_version_name", d.get("mineru_version"))
@@ -140,7 +140,7 @@ class ParseResult:
effort=_legacy_effort(d), parse_mode=_legacy_parse_mode(d), mineru_version=mineru_version
),
)
- from docgale.postprocess.document import model_json_to_middle_json
+ from docvortex.postprocess.document import model_json_to_middle_json
return model_json_to_middle_json(model_json)
diff --git a/mineru/parser/file_type.py b/mineru/parser/file_type.py
index 564fc82d..06862003 100644
--- a/mineru/parser/file_type.py
+++ b/mineru/parser/file_type.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from pathlib import Path
-from docgale.document import detection
+from docvortex.document import detection
def guess_suffix_by_bytes(file_bytes: bytes, file_path: str | None = None) -> str:
diff --git a/mineru/parser/mineru_parser.py b/mineru/parser/mineru_parser.py
index 26c3d782..28d59ce5 100644
--- a/mineru/parser/mineru_parser.py
+++ b/mineru/parser/mineru_parser.py
@@ -14,7 +14,7 @@ from ..backend.analyze import aio_doc_analyze, doc_analyze
from ..config import VlmConfig, config
from ..errors import InvalidRequestError
from ..filetypes import IMAGE_EXTENSIONS, PAGE_RANGE_PARSE_EXTENSIONS
-from docgale.analyzers.native.html import HtmlSourceContext
+from docvortex.analyzers.native.html import HtmlSourceContext
from ..types import FILE_SUFFIXES, FileSuffix, MiddleJson, ModelJson, PageInfo, Tier
from .tier import effort_for_tier
from .base import DocumentParser, ParseResult
@@ -147,7 +147,7 @@ class MinerUParser(DocumentParser):
source_suffix = suffix
if suffix in IMAGE_EXTENSIONS:
- from docgale.document.pdf.document import PDFDocument
+ from docvortex.document.pdf.document import PDFDocument
conversion_started_at = time.perf_counter()
input_size = len(file_bytes)
@@ -183,7 +183,7 @@ class MinerUParser(DocumentParser):
)
resolved_source_context = source_context
if suffix == "html" and resolved_source_context is None:
- from docgale.analyzers.native.html import HtmlSourceContext
+ from docvortex.analyzers.native.html import HtmlSourceContext
resolved_path = path.resolve()
resolved_source_context = HtmlSourceContext(
@@ -209,7 +209,7 @@ class MinerUParser(DocumentParser):
if suffix != "pdf":
return file_bytes, None, None
- from docgale.document.pdf.document import PDFDocument
+ from docvortex.document.pdf.document import PDFDocument
from .page_range import parse_page_range
with PDFDocument(file_bytes) as doc:
@@ -219,7 +219,7 @@ class MinerUParser(DocumentParser):
if page_indices == list(range(page_count)):
return file_bytes, None, None
- from docgale.document.pdf.pdfium import safe_rewrite_pdf_bytes_with_pdfium_result
+ from docvortex.document.pdf.pdfium import safe_rewrite_pdf_bytes_with_pdfium_result
rewrite_result = safe_rewrite_pdf_bytes_with_pdfium_result(file_bytes, page_indices=page_indices)
if rewrite_result.used_original:
diff --git a/mineru/parser/page_range.py b/mineru/parser/page_range.py
index 5ffe9181..966bba04 100644
--- a/mineru/parser/page_range.py
+++ b/mineru/parser/page_range.py
@@ -3,8 +3,8 @@
from __future__ import annotations
from typing import Iterable
-from docgale.document import page_range as _ranges
-from docgale.errors import InvalidRequestError as _DocumentInvalidRequest
+from docvortex.document import page_range as _ranges
+from docvortex.errors import InvalidRequestError as _DocumentInvalidRequest
from ..errors import InvalidRequestError
PAGE_RANGE_DESCRIPTION = _ranges.PAGE_RANGE_DESCRIPTION
diff --git a/mineru/render/content_list.py b/mineru/render/content_list.py
index 3691e75e..e59d98a8 100644
--- a/mineru/render/content_list.py
+++ b/mineru/render/content_list.py
@@ -15,7 +15,7 @@ def render_content_list(
) -> list[dict[str, Any]]:
"""惰性加载 Content List V1 实现并渲染严格 MiddleJson。"""
from ..config import config
- from docgale.render.content_list import render_content_list as _render_content_list
+ from docvortex.render.content_list import render_content_list as _render_content_list
return _render_content_list(middle_json, asset_base_url=asset_base_url, latex_delimiters=config.render.latex_delimiters)
diff --git a/mineru/render/content_list_v2.py b/mineru/render/content_list_v2.py
index 3d906d6f..48881bff 100644
--- a/mineru/render/content_list_v2.py
+++ b/mineru/render/content_list_v2.py
@@ -15,7 +15,7 @@ def render_content_list_v2(
) -> list[list[dict[str, Any]]]:
"""惰性加载 Content List V2 实现并渲染严格 MiddleJson。"""
from ..config import config
- from docgale.render.content_list_v2 import render_content_list_v2 as _render_content_list_v2
+ from docvortex.render.content_list_v2 import render_content_list_v2 as _render_content_list_v2
return _render_content_list_v2(middle_json, asset_base_url=asset_base_url, latex_delimiters=config.render.latex_delimiters)
diff --git a/mineru/render/contracts.py b/mineru/render/contracts.py
index 2a8c4a5d..8c57bfe5 100644
--- a/mineru/render/contracts.py
+++ b/mineru/render/contracts.py
@@ -1,7 +1,7 @@
# Copyright (c) Opendatalab. All rights reserved.
-"""共享 DocGale 渲染契约的 MinerU 公共门面。"""
+"""共享 DocVortex 渲染契约的 MinerU 公共门面。"""
-from docgale.render.contracts import (
+from docvortex.render.contracts import (
AssetResolver,
ContentListRenderOptions,
ContentListV2RenderOptions,
diff --git a/mineru/render/docx.py b/mineru/render/docx.py
index e7c8ce05..614a02ca 100644
--- a/mineru/render/docx.py
+++ b/mineru/render/docx.py
@@ -7,7 +7,7 @@ from ..types import MiddleJson
from .contracts import AssetResolver
-from docgale.render.docx import DocxRenderError
+from docvortex.render.docx import DocxRenderError
def render_docx(
@@ -16,7 +16,7 @@ def render_docx(
asset_resolver: AssetResolver | None = None,
) -> bytes:
"""惰性加载 DOCX 实现并渲染严格 MiddleJson。"""
- from docgale.render.docx import render_docx as _render_docx
+ from docvortex.render.docx import render_docx as _render_docx
return _render_docx(middle_json, asset_resolver=asset_resolver)
diff --git a/mineru/render/epub.py b/mineru/render/epub.py
index 04a52d0b..3b541aff 100644
--- a/mineru/render/epub.py
+++ b/mineru/render/epub.py
@@ -20,7 +20,7 @@ def render_epub(
asset_resolver: AssetResolver | None = None,
) -> bytes:
"""惰性加载 EPUB 实现并返回完整 EPUB 3.3 容器字节。"""
- from docgale.render.epub import render_epub as _render_epub
+ from docvortex.render.epub import render_epub as _render_epub
return _render_epub(
middle_json,
diff --git a/mineru/render/html.py b/mineru/render/html.py
index ba286034..36f77791 100644
--- a/mineru/render/html.py
+++ b/mineru/render/html.py
@@ -16,7 +16,7 @@ def render_html(
document_title: str | None = None,
) -> str:
"""惰性加载 HTML 实现并渲染严格 MiddleJson。"""
- from docgale.render.html import render_html as _render_html
+ from docvortex.render.html import render_html as _render_html
return _render_html(
middle_json,
diff --git a/mineru/render/latex.py b/mineru/render/latex.py
index d184f311..89b79877 100644
--- a/mineru/render/latex.py
+++ b/mineru/render/latex.py
@@ -13,7 +13,7 @@ def render_latex(
document_title: str | None = None,
) -> str:
"""惰性加载 LaTeX 实现并返回完整 UTF-8 文档源码。"""
- from docgale.render.latex import render_latex as _render_latex
+ from docvortex.render.latex import render_latex as _render_latex
return _render_latex(
middle_json,
diff --git a/mineru/render/markdown.py b/mineru/render/markdown.py
index a7a95d6d..e5fb3c22 100644
--- a/mineru/render/markdown.py
+++ b/mineru/render/markdown.py
@@ -16,7 +16,7 @@ def render_markdown(
) -> str:
"""惰性加载 Markdown 实现并渲染严格 MiddleJson。"""
from ..config import config
- from docgale.render.markdown import render_markdown as _render_markdown
+ from docvortex.render.markdown import render_markdown as _render_markdown
return _render_markdown(
middle_json,
diff --git a/mineru/render/pdf.py b/mineru/render/pdf.py
index 16c4a2c2..3a3c982d 100644
--- a/mineru/render/pdf.py
+++ b/mineru/render/pdf.py
@@ -14,7 +14,7 @@ def render_pdf(
document_title: str | None = None,
) -> bytes:
"""惰性加载 PDF 实现并渲染严格 MiddleJson。"""
- from docgale.render.pdf import render_pdf as _render_pdf
+ from docvortex.render.pdf import render_pdf as _render_pdf
return _render_pdf(
middle_json,
diff --git a/mineru/render/structured_content.py b/mineru/render/structured_content.py
index 4f7df94c..b12569df 100644
--- a/mineru/render/structured_content.py
+++ b/mineru/render/structured_content.py
@@ -3,7 +3,7 @@
from __future__ import annotations
-from docgale.compat.mineru import to_mineru_structured_content
+from docvortex.compat.mineru import to_mineru_structured_content
from typing import Any
from ..types import MiddleJson
@@ -16,7 +16,7 @@ def render_structured_content(
) -> dict[str, Any]:
"""惰性加载 Structured Content 实现并渲染严格 MiddleJson。"""
from ..config import config
- from docgale.render.structured_content import render_structured_content as _render_structured_content
+ from docvortex.render.structured_content import render_structured_content as _render_structured_content
return to_mineru_structured_content(
_render_structured_content(middle_json, asset_base_url=asset_base_url, latex_delimiters=config.render.latex_delimiters)
diff --git a/mineru/types.py b/mineru/types.py
index c98ab9f3..cc53730d 100644
--- a/mineru/types.py
+++ b/mineru/types.py
@@ -1,9 +1,9 @@
# Copyright (c) Opendatalab. All rights reserved.
-"""MinerU 产品档位与 DocGale 共享文档类型的稳定入口。"""
+"""MinerU 产品档位与 DocVortex 共享文档类型的稳定入口。"""
from __future__ import annotations
from typing import Iterable, Literal
-from docgale.schema import (
+from docvortex.schema import (
RawBlockType,
RAW_ALGORITHM,
RAW_CAPTION,
diff --git a/pyproject.toml b/pyproject.toml
index 599f6a46..e6095e6b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -38,7 +38,7 @@ classifiers = [
"Programming Language :: Python :: 3.13",
]
dependencies = [
- "docgale>=0.1.0,<1.0.0",
+ "docvortex>=0.1.0,<1.0.0",
"mineru-vl-utils>=1.2.1,<2",
"metafile-render>=0.3.0,<1.0.0",
"mineru-llama-cpp>=0.1.0,<1",
diff --git a/tests/fixtures/capture_hybrid_native_script_inputs.py b/tests/fixtures/capture_hybrid_native_script_inputs.py
index 7d96e36f..7679db51 100644
--- a/tests/fixtures/capture_hybrid_native_script_inputs.py
+++ b/tests/fixtures/capture_hybrid_native_script_inputs.py
@@ -1,4 +1,4 @@
-"""从 DocGale 原始语料再生 Hybrid 测试所需的最小字符输入。"""
+"""从 DocVortex 原始语料再生 Hybrid 测试所需的最小字符输入。"""
from __future__ import annotations
@@ -9,8 +9,8 @@ import json
from pathlib import Path
from typing import Any
-from docgale.document.pdf import PDFDocument
-from docgale.document.pdf.document import get_lines_from_chars
+from docvortex.document.pdf import PDFDocument
+from docvortex.document.pdf.document import get_lines_from_chars
_CONTROL_CHARS = {"\r", "\n", "\x02", "\ufffe", "\uffff"}
@@ -54,7 +54,7 @@ def extract_case(source_root: Path, case: dict[str, Any]) -> dict[str, Any]:
def main() -> None:
"""校验源文件身份后检查或显式更新 fixture;日常 pytest 无需源文件。"""
parser = argparse.ArgumentParser(description=__doc__)
- parser.add_argument("--source-root", required=True, type=Path, help="DocGale demo/pdfs 目录")
+ parser.add_argument("--source-root", required=True, type=Path, help="DocVortex demo/pdfs 目录")
parser.add_argument("--fixture", type=Path, default=Path(__file__).with_name("hybrid_native_script_inputs.json"))
parser.add_argument("--check", action="store_true", help="只比较,不写出")
args = parser.parse_args()
@@ -64,7 +64,7 @@ def main() -> None:
raise ValueError(f"Source hash mismatch: {name}")
updated = {
**original,
- "producer": {"docgale": version("docgale"), "pypdfium2": version("pypdfium2")},
+ "producer": {"docvortex": version("docvortex"), "pypdfium2": version("pypdfium2")},
"cases": [extract_case(args.source_root, case) for case in original["cases"]],
}
serialized = json.dumps(updated, ensure_ascii=False, indent=2, default=list) + "\n"
diff --git a/tests/fixtures/evaluate_native_pdf_table_manifest.py b/tests/fixtures/evaluate_native_pdf_table_manifest.py
index 8a06372c..73aea2a8 100644
--- a/tests/fixtures/evaluate_native_pdf_table_manifest.py
+++ b/tests/fixtures/evaluate_native_pdf_table_manifest.py
@@ -12,12 +12,12 @@ from collections import defaultdict
from pathlib import Path, PureWindowsPath
from typing import Any
-from docgale.analyzers.native.pdf.table_recovery import NativeTableInput
-from docgale.analyzers.native.pdf.table_recovery import coerce_native_table_rectangles
-from docgale.analyzers.native.pdf.table_recovery import coerce_native_table_rules
-from docgale.analyzers.native.pdf.table_recovery import recover_native_pdf_table
-from docgale.analyzers.native.pdf.table_recovery.engine import diagnose_native_pdf_table
-from docgale.document.pdf.document import PDFDocument
+from docvortex.analyzers.native.pdf.table_recovery import NativeTableInput
+from docvortex.analyzers.native.pdf.table_recovery import coerce_native_table_rectangles
+from docvortex.analyzers.native.pdf.table_recovery import coerce_native_table_rules
+from docvortex.analyzers.native.pdf.table_recovery import recover_native_pdf_table
+from docvortex.analyzers.native.pdf.table_recovery.engine import diagnose_native_pdf_table
+from docvortex.document.pdf.document import PDFDocument
_DEFAULT_SOURCE_ROOT = Path(__file__).resolve().parents[1] / "unittest" / "pdfs" / "native_pdf_tables"
diff --git a/tests/unittest/_flash_pdf_test_utils.py b/tests/unittest/_flash_pdf_test_utils.py
index c482e4da..70e9d321 100644
--- a/tests/unittest/_flash_pdf_test_utils.py
+++ b/tests/unittest/_flash_pdf_test_utils.py
@@ -4,7 +4,7 @@ import hashlib
import json
from typing import Any
-from docgale.analyzers.native.pdf import models
+from docvortex.analyzers.native.pdf import models
_IGNORED_FINGERPRINT_KEYS = {
diff --git a/tests/unittest/test_backend_architecture.py b/tests/unittest/test_backend_architecture.py
index 53290a06..d2352cf9 100644
--- a/tests/unittest/test_backend_architecture.py
+++ b/tests/unittest/test_backend_architecture.py
@@ -9,7 +9,7 @@ import sys
from mineru.backend.postprocess import table_merge
_PROJECT_ROOT = Path(__file__).resolve().parents[2]
-_DOCGALE_ROOT = Path(importlib.util.find_spec("docgale").origin).parent
+_DOCVORTEX_ROOT = Path(importlib.util.find_spec("docvortex").origin).parent
_COPYRIGHT_HEADER = "# Copyright (c) Opendatalab. All rights reserved."
_SOURCE_ROOTS = (
_PROJECT_ROOT / "mineru/backend",
@@ -48,29 +48,29 @@ _CHINESE_DOCSTRING_PATHS = (
_PROJECT_ROOT / "mineru/render/epub.py",
_PROJECT_ROOT / "mineru/render/pdf.py",
_PROJECT_ROOT / "mineru/render/structured_content.py",
- _DOCGALE_ROOT / "render/_internal/common/html_table.py",
- _DOCGALE_ROOT / "render/_internal/latex",
+ _DOCVORTEX_ROOT / "render/_internal/common/html_table.py",
+ _DOCVORTEX_ROOT / "render/_internal/latex",
)
_REMOVED_INTERNAL_MODULES = (
"mineru.cli_old",
"mineru.backend.local_model_runtime",
"mineru.model.model_types",
- "docgale.analyzers.native.model",
- "docgale.analyzers.native.native_pdf",
- "docgale.analyzers.native.office.chart",
- "docgale.analyzers.native.office.docx.tools",
- "docgale.analyzers.native.office.docx.tools.math",
- "docgale.analyzers.native.office.image_equation",
- "docgale.analyzers.native.office.legacy.errors",
- "docgale.analyzers.native.office.legacy.limits",
- "docgale.analyzers.native.office.legacy.mtef",
- "docgale.analyzers.native.office.legacy.mtef_v5",
- "docgale.analyzers.native.office.legacy.stream",
- "docgale.analyzers.native.office.math",
- "docgale.analyzers.native.office.ooxml_equation",
+ "docvortex.analyzers.native.model",
+ "docvortex.analyzers.native.native_pdf",
+ "docvortex.analyzers.native.office.chart",
+ "docvortex.analyzers.native.office.docx.tools",
+ "docvortex.analyzers.native.office.docx.tools.math",
+ "docvortex.analyzers.native.office.image_equation",
+ "docvortex.analyzers.native.office.legacy.errors",
+ "docvortex.analyzers.native.office.legacy.limits",
+ "docvortex.analyzers.native.office.legacy.mtef",
+ "docvortex.analyzers.native.office.legacy.mtef_v5",
+ "docvortex.analyzers.native.office.legacy.stream",
+ "docvortex.analyzers.native.office.math",
+ "docvortex.analyzers.native.office.ooxml_equation",
"mineru.model.utils",
"mineru.render.writer",
- "docgale.render._internal.common.inline",
+ "docvortex.render._internal.common.inline",
"mineru.utils.backend_options",
"mineru.utils.config_reader",
"mineru.utils.model_registry",
@@ -82,7 +82,7 @@ _REMOVED_INTERNAL_MODULES = (
def _module_name(path: Path) -> str:
"""把项目内 Python 路径转换为完整模块名。"""
- relative = path.relative_to(_DOCGALE_ROOT.parent if path.is_relative_to(_DOCGALE_ROOT) else _PROJECT_ROOT).with_suffix("")
+ relative = path.relative_to(_DOCVORTEX_ROOT.parent if path.is_relative_to(_DOCVORTEX_ROOT) else _PROJECT_ROOT).with_suffix("")
parts = list(relative.parts)
if parts[-1] == "__init__":
parts.pop()
@@ -199,11 +199,11 @@ def test_layer_dependencies_are_one_way() -> None:
if invalid:
offenders[str(path.relative_to(_PROJECT_ROOT))] = invalid
for path in _PROJECT_ROOT.glob("mineru/backend/analysis/**/*.py"):
- invalid = sorted(module for module in _resolved_imports(path) if module.startswith("docgale.postprocess"))
+ invalid = sorted(module for module in _resolved_imports(path) if module.startswith("docvortex.postprocess"))
if invalid:
offenders[str(path.relative_to(_PROJECT_ROOT))] = invalid
allowed_render_backend = (
- "docgale.content.inline",
+ "docvortex.content.inline",
"mineru.backend.postprocess.table_merge",
)
for path in _PROJECT_ROOT.glob("mineru/render/**/*.py"):
@@ -225,17 +225,17 @@ def test_latex_and_render_common_keep_private_dependencies_one_way() -> None:
str(path): sorted(
module
for module in _resolved_imports(path)
- if module.startswith(tuple(f"docgale.render._internal.{name}" for name in format_names))
+ if module.startswith(tuple(f"docvortex.render._internal.{name}" for name in format_names))
)
- for path in (_DOCGALE_ROOT / "render/_internal/latex").rglob("*.py")
+ for path in (_DOCVORTEX_ROOT / "render/_internal/latex").rglob("*.py")
}
common_offenders = {
str(path): sorted(
module
for module in _resolved_imports(path)
- if module.startswith(tuple(f"docgale.render._internal.{name}" for name in (*format_names, "latex")))
+ if module.startswith(tuple(f"docvortex.render._internal.{name}" for name in (*format_names, "latex")))
)
- for path in (_DOCGALE_ROOT / "render/_internal/common").rglob("*.py")
+ for path in (_DOCVORTEX_ROOT / "render/_internal/common").rglob("*.py")
}
assert not {path: imports for path, imports in latex_offenders.items() if imports}
assert not {path: imports for path, imports in common_offenders.items() if imports}
@@ -244,7 +244,7 @@ def test_latex_and_render_common_keep_private_dependencies_one_way() -> None:
def test_flash_office_does_not_depend_on_pdf_implementation() -> None:
"""守卫 Office 格式只复用中立能力,不反向依赖 Flash PDF 实现。"""
offenders = {
- str(path): sorted(module for module in _resolved_imports(path) if module.startswith("docgale.analyzers.native.pdf"))
+ str(path): sorted(module for module in _resolved_imports(path) if module.startswith("docvortex.analyzers.native.pdf"))
for path in (_PROJECT_ROOT / "mineru/model/flash/office").rglob("*.py")
}
assert not {path: imports for path, imports in offenders.items() if imports}
@@ -254,7 +254,7 @@ def test_flash_spreadsheet_dependencies_are_one_way() -> None:
"""守卫 XLS/XLSX 只依赖中立 spreadsheet 层且共享层不反向引用格式实现。"""
xls_offenders = {
str(path): sorted(
- module for module in _resolved_imports(path) if module.startswith("docgale.analyzers.native.office.xlsx")
+ module for module in _resolved_imports(path) if module.startswith("docvortex.analyzers.native.office.xlsx")
)
for path in (_PROJECT_ROOT / "mineru/model/flash/office/xls").rglob("*.py")
}
@@ -262,7 +262,7 @@ def test_flash_spreadsheet_dependencies_are_one_way() -> None:
str(path): sorted(
module
for module in _resolved_imports(path)
- if module.startswith(("docgale.analyzers.native.office.xls", "docgale.analyzers.native.office.xlsx"))
+ if module.startswith(("docvortex.analyzers.native.office.xls", "docvortex.analyzers.native.office.xlsx"))
)
for path in (_PROJECT_ROOT / "mineru/model/flash/office/spreadsheet").rglob("*.py")
}
@@ -273,7 +273,7 @@ def test_flash_spreadsheet_dependencies_are_one_way() -> None:
def test_flash_equation_and_legacy_dependencies_are_one_way() -> None:
"""守卫公式层不反向引用格式实现,legacy 层也不重新承载公式解析。"""
format_prefixes = tuple(
- f"docgale.analyzers.native.office.{name}"
+ f"docvortex.analyzers.native.office.{name}"
for name in ("doc", "docx", "odf", "ppt", "pptx", "rtf", "spreadsheet", "xls", "xlsx")
)
equation_offenders = {
@@ -282,7 +282,7 @@ def test_flash_equation_and_legacy_dependencies_are_one_way() -> None:
}
legacy_offenders = {
str(path): sorted(
- module for module in _resolved_imports(path) if module.startswith("docgale.analyzers.native.office.equation")
+ module for module in _resolved_imports(path) if module.startswith("docvortex.analyzers.native.office.equation")
)
for path in (_PROJECT_ROOT / "mineru/model/flash/office/legacy").rglob("*.py")
}
@@ -339,7 +339,7 @@ import sys
before_env = dict(os.environ)
import mineru.backend.analyze
import mineru.render
-from docgale.analyzers.native import PdfModel
+from docvortex.analyzers.native import PdfModel
assert PdfModel.__name__ == "PdfModel"
for prefix in (
@@ -372,7 +372,7 @@ assert before_env == dict(os.environ)
def test_table_merge_package_keeps_one_way_internal_dependencies() -> None:
"""守卫 table_merge 低层模块不反向导入内容合并或文档编排模块。"""
- package_path = _DOCGALE_ROOT / "content/table"
+ package_path = _DOCVORTEX_ROOT / "content/table"
allowed_imports = {
"models.py": set(),
"html.py": {"models"},
diff --git a/tests/unittest/test_backend_block_object_regressions.py b/tests/unittest/test_backend_block_object_regressions.py
index 0fb22928..bbc5fb80 100644
--- a/tests/unittest/test_backend_block_object_regressions.py
+++ b/tests/unittest/test_backend_block_object_regressions.py
@@ -1,8 +1,8 @@
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from typing import Any
-from docgale.postprocess.pages import model_json_to_pages
+from docvortex.postprocess.pages import model_json_to_pages
from mineru.types import BlockType, ImageBlock, ModelJson
from _span_test_utils import inline
diff --git a/tests/unittest/test_content_list_render.py b/tests/unittest/test_content_list_render.py
index af8573af..02f35755 100644
--- a/tests/unittest/test_content_list_render.py
+++ b/tests/unittest/test_content_list_render.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from copy import deepcopy
diff --git a/tests/unittest/test_content_list_v2_render.py b/tests/unittest/test_content_list_v2_render.py
index ab57234c..a4f02271 100644
--- a/tests/unittest/test_content_list_v2_render.py
+++ b/tests/unittest/test_content_list_v2_render.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from copy import deepcopy
diff --git a/tests/unittest/test_doclib_cache_semantics.py b/tests/unittest/test_doclib_cache_semantics.py
index 84419ff9..68278ab1 100644
--- a/tests/unittest/test_doclib_cache_semantics.py
+++ b/tests/unittest/test_doclib_cache_semantics.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from _span_test_utils import inline as _inline, inline_text
import asyncio
diff --git a/tests/unittest/test_docgale_routing.py b/tests/unittest/test_docvortex_routing.py
similarity index 98%
rename from tests/unittest/test_docgale_routing.py
rename to tests/unittest/test_docvortex_routing.py
index f9b3c174..7f212d3d 100644
--- a/tests/unittest/test_docgale_routing.py
+++ b/tests/unittest/test_docvortex_routing.py
@@ -72,7 +72,7 @@ def test_flash_routes_classification_and_native_analysis_explicitly(
@pytest.mark.parametrize("effort", ["medium", "high", "xhigh"])
@pytest.mark.parametrize("parse_mode", ["txt", "ocr"])
-def test_hybrid_and_vlm_pdf_outputs_share_docgale_text_cleanup(
+def test_hybrid_and_vlm_pdf_outputs_share_docvortex_text_cleanup(
monkeypatch: pytest.MonkeyPatch,
effort: str,
parse_mode: str,
diff --git a/tests/unittest/test_docx_assets.py b/tests/unittest/test_docx_assets.py
index d3076314..39227dc9 100644
--- a/tests/unittest/test_docx_assets.py
+++ b/tests/unittest/test_docx_assets.py
@@ -8,11 +8,11 @@ from pathlib import Path
from PIL import Image, features
import pytest
-from docgale.render._internal.docx.assets import DocxAssetError
-from docgale.render._internal.docx.assets import PreparedImage
-from docgale.render._internal.docx.assets import prepare_block_image
-from docgale.render._internal.docx.assets import prepare_html_image
-from docgale.render._internal.docx.assets import prepare_image_bytes
+from docvortex.render._internal.docx.assets import DocxAssetError
+from docvortex.render._internal.docx.assets import PreparedImage
+from docvortex.render._internal.docx.assets import prepare_block_image
+from docvortex.render._internal.docx.assets import prepare_html_image
+from docvortex.render._internal.docx.assets import prepare_image_bytes
from mineru.types import ImageBodyBlock
@@ -53,7 +53,7 @@ def test_generated_svg_rejects_dtd_beyond_prefix_window() -> None:
+ _generated_svg().replace(b"</svg>", b'<text x="0" y="0" fill="#000">&injected;</text></svg>')
)
- with pytest.raises(DocxAssetError, match="safely generated by MinerU"):
+ with pytest.raises(DocxAssetError, match="safely generated by DocVortex"):
prepare_image_bytes(payload, declared_extension="svg")
diff --git a/tests/unittest/test_docx_complex_fields.py b/tests/unittest/test_docx_complex_fields.py
index 6cb2f7fd..70de2a53 100644
--- a/tests/unittest/test_docx_complex_fields.py
+++ b/tests/unittest/test_docx_complex_fields.py
@@ -10,10 +10,10 @@ from docx.opc.constants import RELATIONSHIP_TYPE
from docx.text.paragraph import Paragraph
from mineru.backend.analyze import doc_analyze
-from docgale.content.inline import inline_plain_text
-from docgale.analyzers.native import DocxModel
-from docgale.content.spans import inline_span_plain_text
-from docgale.analyzers.native.office.docx.docx_converter import DocxConverter
+from docvortex.content.inline import inline_plain_text
+from docvortex.analyzers.native import DocxModel
+from docvortex.content.spans import inline_span_plain_text
+from docvortex.analyzers.native.office.docx.docx_converter import DocxConverter
from mineru.types import IndexBlock, ParagraphTitleBlock, TextBlock
from _span_test_utils import inline_urls
diff --git a/tests/unittest/test_docx_math.py b/tests/unittest/test_docx_math.py
index d424c570..53c6e1d0 100644
--- a/tests/unittest/test_docx_math.py
+++ b/tests/unittest/test_docx_math.py
@@ -3,9 +3,9 @@ from __future__ import annotations
import pytest
from lxml import etree
-from docgale.render._internal.docx.math import DocxFormulaError
-from docgale.render._internal.docx.math import latex_to_omml
-from docgale.render._internal.docx.math import split_formula_tag
+from docvortex.render._internal.docx.math import DocxFormulaError
+from docvortex.render._internal.docx.math import latex_to_omml
+from docvortex.render._internal.docx.math import split_formula_tag
_OFFICE_MATH_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/math"
diff --git a/tests/unittest/test_docx_render.py b/tests/unittest/test_docx_render.py
index 53dc6cac..308e935a 100644
--- a/tests/unittest/test_docx_render.py
+++ b/tests/unittest/test_docx_render.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from _span_test_utils import inline as _inline
import base64
@@ -68,7 +68,7 @@ def _png_uri(*, size: tuple[int, int] = (12, 8)) -> str:
def _generated_svg_uri(*, logical_size: tuple[int, int] = (12, 8), fallback_size: tuple[int, int] = (96, 64)) -> str:
- """生成带高密度 PNG fallback 的 MinerU SVG data URI。"""
+ """生成带高密度 PNG fallback 的 DocVortex SVG data URI。"""
width, height = logical_size
fallback = base64.b64encode(_png_bytes(size=fallback_size)).decode("ascii")
svg = (
@@ -199,7 +199,7 @@ def test_docx_uses_page_footnote_bookmark_and_style() -> None:
assert 'w:bookmarkStart w:id="0" w:name="note_one"' in document_xml
assert 'w:hyperlink w:anchor="note_one"' in document_xml
assert document_xml.count("<w:hyperlink") == 1
- assert footnote.style.name == "MinerU Footnote"
+ assert footnote.style.name == "DocVortex Footnote"
assert "missing-note" not in relationships
assert "#note-one" not in relationships
@@ -759,11 +759,11 @@ def test_spatial_table_preserves_preformatted_text_without_assets(image_payload:
resolver.assert_not_called()
assert document.paragraphs[0].text == content.replace("\x01", "\ufffd")
- assert document.paragraphs[0].style.name == "MinerU Spatial Table"
- assert document.styles["MinerU Spatial Table"].font.name == document.styles["MinerU Code"].font.name
- assert document.styles["MinerU Spatial Table"].font.size == document.styles["MinerU Code"].font.size
- assert document.styles["MinerU Spatial Table"].paragraph_format.line_spacing == 1.0
- assert 'w:pStyle w:val="MinerUSpatialTable"' in document_xml
+ assert document.paragraphs[0].style.name == "DocVortex Spatial Table"
+ assert document.styles["DocVortex Spatial Table"].font.name == document.styles["DocVortex Code"].font.name
+ assert document.styles["DocVortex Spatial Table"].font.size == document.styles["DocVortex Code"].font.size
+ assert document.styles["DocVortex Spatial Table"].paragraph_format.line_spacing == 1.0
+ assert 'w:pStyle w:val="DocVortexSpatialTable"' in document_xml
assert 'xml:space="preserve"' in document_xml
assert "<w:tab/>" in document_xml
assert document_xml.count("<w:br/>") == 3
@@ -933,9 +933,9 @@ def test_spatial_table_preserves_caption_body_footnote_order() -> None:
"Table footnote",
]
assert [paragraph.style.name for paragraph in document.paragraphs] == [
- "MinerU Caption",
- "MinerU Spatial Table",
- "MinerU Footnote",
+ "DocVortex Caption",
+ "DocVortex Spatial Table",
+ "DocVortex Footnote",
]
@@ -1020,7 +1020,7 @@ def test_code_and_algorithm_keep_line_breaks_styles_and_inline_math() -> None:
document = Document(BytesIO(result))
document_xml = _part(result, "word/document.xml")
- assert [paragraph.style.name for paragraph in document.paragraphs] == ["MinerU Code", "MinerU Code"]
+ assert [paragraph.style.name for paragraph in document.paragraphs] == ["DocVortex Code", "DocVortex Code"]
assert "a = 1\nb = 2" == document.paragraphs[0].text
assert "<m:oMath" in document_xml
assert 'w:vertAlign w:val="subscript"' in document_xml
diff --git a/tests/unittest/test_docx_special_char_tables.py b/tests/unittest/test_docx_special_char_tables.py
index 299b7b2b..8de732ec 100644
--- a/tests/unittest/test_docx_special_char_tables.py
+++ b/tests/unittest/test_docx_special_char_tables.py
@@ -5,7 +5,7 @@ from docx import Document
from docx.oxml.ns import qn
from lxml import etree
-from docgale.analyzers.native.office.docx.docx_converter import DocxConverter
+from docvortex.analyzers.native.office.docx.docx_converter import DocxConverter
NO_BREAK_HYPHEN = "‑"
diff --git a/tests/unittest/test_docx_table.py b/tests/unittest/test_docx_table.py
index 236f225f..a92cb028 100644
--- a/tests/unittest/test_docx_table.py
+++ b/tests/unittest/test_docx_table.py
@@ -8,12 +8,12 @@ from docx import Document
from docx.oxml.ns import qn
from docx.table import _Cell
-from docgale.render._internal.docx.table import DocxTableError
-from docgale.render._internal.docx.table import NestedTableWriter
-from docgale.render._internal.docx.table import materialize_docx_table
-from docgale.render._internal.docx.table import materialize_docx_tables
-from docgale.render._internal.docx.table import parse_html_table
-from docgale.render._internal.docx.table import parse_html_tables
+from docvortex.render._internal.docx.table import DocxTableError
+from docvortex.render._internal.docx.table import NestedTableWriter
+from docvortex.render._internal.docx.table import materialize_docx_table
+from docvortex.render._internal.docx.table import materialize_docx_tables
+from docvortex.render._internal.docx.table import parse_html_table
+from docvortex.render._internal.docx.table import parse_html_tables
def _text_filler(
diff --git a/tests/unittest/test_emfplus_integration.py b/tests/unittest/test_emfplus_integration.py
index 07a8adc1..06e1c475 100644
--- a/tests/unittest/test_emfplus_integration.py
+++ b/tests/unittest/test_emfplus_integration.py
@@ -13,7 +13,7 @@ from PIL import Image
from pypdf import PdfReader
from mineru.backend.analyze import doc_analyze
-from docgale.analyzers.native.office import image as office_image
+from docvortex.analyzers.native.office import image as office_image
from mineru.render import render_docx, render_epub, render_html, render_pdf
_FIXTURES = Path(__file__).parent / "fixtures" / "emfplus"
diff --git a/tests/unittest/test_epub_render.py b/tests/unittest/test_epub_render.py
index 8adda33b..aebde1bd 100644
--- a/tests/unittest/test_epub_render.py
+++ b/tests/unittest/test_epub_render.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
import base64
from copy import deepcopy
@@ -14,9 +14,9 @@ from PIL import Image
import pytest
from mineru.backend.analyze import doc_analyze
-from docgale.analyzers.native.epub import EpubPackage
+from docvortex.analyzers.native.epub import EpubPackage
from mineru.render import render_epub
-from docgale.render._internal.epub import assets as epub_assets
+from docvortex.render._internal.epub import assets as epub_assets
from mineru.types import (
AlgorithmBodyBlock,
ChartBlock,
@@ -38,10 +38,10 @@ from mineru.types import (
TableBodyBlock,
TextBlock,
)
-from docgale.foundation.image_payload import MAX_DECODED_RASTER_DIMENSION
-from docgale.foundation.image_payload import MAX_DECODED_RASTER_PIXELS
-from docgale.foundation.image_payload import validate_decoded_raster_size
-from docgale.foundation import image_payload as image_payload_utils
+from docvortex.foundation.image_payload import MAX_DECODED_RASTER_DIMENSION
+from docvortex.foundation.image_payload import MAX_DECODED_RASTER_PIXELS
+from docvortex.foundation.image_payload import validate_decoded_raster_size
+from docvortex.foundation import image_payload as image_payload_utils
from _epub_test_utils import build_epub_fixture
from _span_test_utils import equation, hyperlink, inline
@@ -223,11 +223,11 @@ def test_epub_uses_default_planner_without_source_page_boundaries() -> None:
with _archive(payload) as archive:
content = _xml(archive, "EPUB/text/content.xhtml")
- paragraphs = content.xpath("//xhtml:p[contains(@class, 'docgale-text')]", namespaces=_NS)
+ paragraphs = content.xpath("//xhtml:p[contains(@class, 'docvortex-text')]", namespaces=_NS)
assert [_text(item) for item in paragraphs] == ["international"]
- assert content.xpath("string(//xhtml:article/@class)", namespaces=_NS) == "docgale-document"
- assert not content.xpath("//xhtml:section[contains(@class, 'docgale-page')]", namespaces=_NS)
- assert not content.xpath("//xhtml:hr[contains(@class, 'docgale-page-break')]", namespaces=_NS)
+ assert content.xpath("string(//xhtml:article/@class)", namespaces=_NS) == "docvortex-document"
+ assert not content.xpath("//xhtml:section[contains(@class, 'docvortex-page')]", namespaces=_NS)
+ assert not content.xpath("//xhtml:hr[contains(@class, 'docvortex-page-break')]", namespaces=_NS)
assert "HEADER" not in _text(content) and "FOOTER" not in _text(content)
with pytest.raises(TypeError, match="unexpected keyword argument 'mode'"):
render_epub(middle, mode="default") # type: ignore[call-arg]
@@ -469,7 +469,7 @@ def test_epub_mathml_failure_uses_visible_latex_without_false_manifest_property(
assert package.xpath("string(opf:manifest/opf:item[@id='content']/@properties)", namespaces=_NS) == ""
content = _xml(archive, "EPUB/text/content.xhtml")
assert not content.xpath("//math:math", namespaces=_NS)
- fallback = content.xpath("//xhtml:code[contains(@class, 'docgale-latex-fallback')]", namespaces=_NS)
+ fallback = content.xpath("//xhtml:code[contains(@class, 'docvortex-latex-fallback')]", namespaces=_NS)
assert len(fallback) == 1 and _text(fallback[0]) == "{"
@@ -514,10 +514,10 @@ def test_epub_static_chart_code_and_algorithm_cover_remaining_visual_bodies() ->
with _archive(render_epub(middle, modified_at=_FIXED_TIME)) as archive:
content = _xml(archive, "EPUB/text/content.xhtml")
assert "| A | B |" in _text(content)
- code = content.xpath("//xhtml:pre[contains(@class, 'docgale-code')]/xhtml:code", namespaces=_NS)
+ code = content.xpath("//xhtml:pre[contains(@class, 'docvortex-code')]/xhtml:code", namespaces=_NS)
assert len(code) == 1 and code[0].get("class") == "language-python"
- assert content.xpath("//xhtml:div[contains(@class, 'docgale-algorithm')]//xhtml:strong", namespaces=_NS)
- assert content.xpath("//xhtml:div[contains(@class, 'docgale-algorithm')]//math:math", namespaces=_NS)
+ assert content.xpath("//xhtml:div[contains(@class, 'docvortex-algorithm')]//xhtml:strong", namespaces=_NS)
+ assert content.xpath("//xhtml:div[contains(@class, 'docvortex-algorithm')]//math:math", namespaces=_NS)
assert not content.xpath("//xhtml:script", namespaces=_NS)
diff --git a/tests/unittest/test_flash_csv.py b/tests/unittest/test_flash_csv.py
index 69cb92c4..727ec701 100644
--- a/tests/unittest/test_flash_csv.py
+++ b/tests/unittest/test_flash_csv.py
@@ -10,12 +10,12 @@ import pytest
from bs4 import BeautifulSoup
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.analyzers.native import CsvModel
-from docgale.analyzers.native import csv as csv_module
+from docvortex.analyzers.native import CsvModel
+from docvortex.analyzers.native import csv as csv_module
from mineru.parser import parse, parse_async
from mineru.parser import api_server
from mineru.parser.api_server import CreateJobRequest, FileStore
-from docgale.document.detection import guess_suffix_by_bytes, guess_suffix_by_path
+from docvortex.document.detection import guess_suffix_by_bytes, guess_suffix_by_path
from mineru.render.html import render_html
from mineru.render.markdown import render_markdown
from mineru.types import BlockType, TableBlock, TableBodyBlock
diff --git a/tests/unittest/test_flash_docx_equationxml.py b/tests/unittest/test_flash_docx_equationxml.py
index 0d1406a8..873b751c 100644
--- a/tests/unittest/test_flash_docx_equationxml.py
+++ b/tests/unittest/test_flash_docx_equationxml.py
@@ -1,5 +1,5 @@
from __future__ import annotations
-from docgale.export.middle import export_middle_json
+from docvortex.export.middle import export_middle_json
import asyncio
from io import BytesIO
@@ -11,14 +11,14 @@ from lxml import etree # type: ignore[reportAttributeAccessIssue]
import pytest
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.analyzers.native import DocxModel
-from docgale.analyzers.native.office.docx.docx_converter import DocxConverter
-from docgale.analyzers.native.office.docx.equationxml import DocxEquationXmlDecoder
-from docgale.analyzers.native.office.errors import LegacyOfficeResourceLimitError
-from docgale.render._internal.docx.math import latex_to_omml
+from docvortex.analyzers.native import DocxModel
+from docvortex.analyzers.native.office.docx.docx_converter import DocxConverter
+from docvortex.analyzers.native.office.docx.equationxml import DocxEquationXmlDecoder
+from docvortex.analyzers.native.office.errors import LegacyOfficeResourceLimitError
+from docvortex.render._internal.docx.math import latex_to_omml
from mineru.types import BlockType, MiddleJson, ModelJson
-import docgale.analyzers.native.office.docx.equationxml as equationxml_module
+import docvortex.analyzers.native.office.docx.equationxml as equationxml_module
from _docx_equationxml_test_utils import (
M_NS,
WORD_2003_NS,
diff --git a/tests/unittest/test_flash_epub.py b/tests/unittest/test_flash_epub.py
index 10621239..83efaabe 100644
--- a/tests/unittest/test_flash_epub.py
+++ b/tests/unittest/test_flash_epub.py
@@ -13,29 +13,29 @@ from bs4 import BeautifulSoup
from lxml import etree
from loguru import logger
-import docgale.analyzers.native.epub.package as epub_package_module
+import docvortex.analyzers.native.epub.package as epub_package_module
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.postprocess.lists import fix_office_list_blocks
+from docvortex.postprocess.lists import fix_office_list_blocks
from mineru.doclib.core.file_io import extract_metadata
from mineru.doclib.core.db import DatabaseManager
from mineru.doclib.core.fts import FTSManager
from mineru.doclib.services.parse_svc import ParseService
from mineru.errors import InvalidRequestError
-from docgale.analyzers.native import EpubModel
-from docgale.analyzers.native.epub import EpubEncryptedError
-from docgale.analyzers.native.epub import EpubPackage
-from docgale.analyzers.native.epub import EpubParseError
-from docgale.analyzers.native.epub import EpubResourceLimitError
-from docgale.analyzers.native.epub import detect_epub
-from docgale.analyzers.native._shared.markup import MarkupStylesheet
-from docgale.analyzers.native._shared.markup import TextStyle
-from docgale.analyzers.native.epub.xhtml import EpubChapterConverter
-from docgale.analyzers.native.epub.xhtml import build_anchor_registry
-from docgale.analyzers.native.epub.xhtml import convert_svg_spine
+from docvortex.analyzers.native import EpubModel
+from docvortex.analyzers.native.epub import EpubEncryptedError
+from docvortex.analyzers.native.epub import EpubPackage
+from docvortex.analyzers.native.epub import EpubParseError
+from docvortex.analyzers.native.epub import EpubResourceLimitError
+from docvortex.analyzers.native.epub import detect_epub
+from docvortex.analyzers.native._shared.markup import MarkupStylesheet
+from docvortex.analyzers.native._shared.markup import TextStyle
+from docvortex.analyzers.native.epub.xhtml import EpubChapterConverter
+from docvortex.analyzers.native.epub.xhtml import build_anchor_registry
+from docvortex.analyzers.native.epub.xhtml import convert_svg_spine
from mineru.parser import MinerUParser, parse, parse_async
from mineru.parser import api_server
from mineru.parser.api_server import CreateJobRequest, FileStore
-from docgale.document.detection import guess_suffix_by_bytes, guess_suffix_by_path
+from docvortex.document.detection import guess_suffix_by_bytes, guess_suffix_by_path
from mineru.render import RenderMode, render_docx, render_html, render_markdown, render_structured_content
from mineru.types import BlockType, PageFootnoteBlock
@@ -152,8 +152,8 @@ def test_epub_notes_use_page_footnote_and_document_wide_anchors() -> None:
full_markdown = render_markdown(middle, mode=RenderMode.FULL)
assert "First footnote paragraph" in default_markdown
assert f"](#{first.anchor})" in default_markdown
- assert f'id="{first.anchor}" class="docgale-page-footnote"' in default_markdown
- assert f'id="{first.anchor}" class="docgale-page-footnote"' in full_markdown
+ assert f'id="{first.anchor}" class="docvortex-page-footnote"' in default_markdown
+ assert f'id="{first.anchor}" class="docvortex-page-footnote"' in full_markdown
assert "Page footnote:" not in default_markdown
for html_output in (
@@ -162,7 +162,7 @@ def test_epub_notes_use_page_footnote_and_document_wide_anchors() -> None:
):
assert f'href="#{first.anchor}"' in html_output
assert f'id="{first.anchor}"' in html_output
- assert 'class="docgale-page-footnote"' in html_output
+ assert 'class="docvortex-page-footnote"' in html_output
structured = render_structured_content(middle)
structured_blocks = [block for page in structured["pages"] for block in page["blocks"]]
@@ -446,7 +446,7 @@ def test_non_pdf_public_parser_rejects_page_range(
"""验证所有非 PDF 路径入口在初始化具体模型前拒绝 page_range。"""
source = tmp_path / f"sample.{suffix}"
source.write_bytes(b"not-read")
- monkeypatch.setattr("docgale.document.detection.guess_suffix_by_path", lambda _path: suffix)
+ monkeypatch.setattr("docvortex.document.detection.guess_suffix_by_path", lambda _path: suffix)
parser = MinerUParser(tier="flash")
with pytest.raises(InvalidRequestError, match="full-document parsing") as exc_info:
parser.parse(source, page_range="1")
@@ -1022,7 +1022,7 @@ def test_epub_public_import_does_not_load_heavy_models() -> None:
code = """
import sys
import mineru.parser
-blocked = ('torch', 'cv2', 'docgale.analyzers.native.epub', 'mineru_vl_utils')
+blocked = ('torch', 'cv2', 'docvortex.analyzers.native.epub', 'mineru_vl_utils')
assert not any(name == prefix or name.startswith(prefix + '.') for prefix in blocked for name in sys.modules)
print('ok')
"""
diff --git a/tests/unittest/test_flash_html.py b/tests/unittest/test_flash_html.py
index 8aad3cd1..9d8a18dd 100644
--- a/tests/unittest/test_flash_html.py
+++ b/tests/unittest/test_flash_html.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.compat.mineru import from_mineru_middle
-from docgale.export.middle import export_middle_json
+from docvortex.compat.mineru import from_mineru_middle
+from docvortex.export.middle import export_middle_json
import asyncio
import base64
@@ -22,16 +22,16 @@ from PIL import Image
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
from mineru.errors import InvalidRequestError
from mineru.doclib.services.parse_svc import ParseService
-from docgale.analyzers.native import HtmlModel
-from docgale.analyzers.native._shared.markup import MarkupProjector
-from docgale.analyzers.native.html import HtmlResourceLimitError
-from docgale.analyzers.native.html import HtmlSourceContext
-from docgale.analyzers.native.html import converter as html_converter_module
-from docgale.analyzers.native.html import document as html_document_module
-from docgale.analyzers.native.html import resources as html_resources_module
-from docgale.analyzers.native.html import selector as html_selector_module
-from docgale.analyzers.native.html.resources import HtmlResourceContext
-from docgale.codecs.html import decode_docgale_html_wire
+from docvortex.analyzers.native import HtmlModel
+from docvortex.analyzers.native._shared.markup import MarkupProjector
+from docvortex.analyzers.native.html import HtmlResourceLimitError
+from docvortex.analyzers.native.html import HtmlSourceContext
+from docvortex.analyzers.native.html import converter as html_converter_module
+from docvortex.analyzers.native.html import document as html_document_module
+from docvortex.analyzers.native.html import resources as html_resources_module
+from docvortex.analyzers.native.html import selector as html_selector_module
+from docvortex.analyzers.native.html.resources import HtmlResourceContext
+from docvortex.codecs.html import decode_docvortex_html_wire
from mineru.parser import ParseResult, parse, parse_async
from mineru.parser import api_server
from mineru.parser.api_server import CreateJobRequest, FileStore
@@ -622,7 +622,7 @@ def test_html_referenced_external_footnote_keeps_anchor_and_content() -> None:
assert footnote.anchor == "html-e31e5112c08d4945a7af" # type: ignore[union-attr]
assert "Footnote body." in inline_text(footnote.content) # type: ignore[union-attr]
assert f"](#{footnote.anchor})" in markdown # type: ignore[union-attr]
- assert f'id="{footnote.anchor}" class="docgale-page-footnote"' in markdown # type: ignore[union-attr]
+ assert f'id="{footnote.anchor}" class="docvortex-page-footnote"' in markdown # type: ignore[union-attr]
def test_html_structured_only_footnote_does_not_create_dangling_anchor() -> None:
@@ -882,7 +882,7 @@ def test_html_formula_sources_are_normalized_without_duplicate_katex_text() -> N
<annotation encoding="application/x-tex">q_4</annotation></semantics></math>
<span>mathjax duplicate</span></span>
<span data-expr="z_3">formula fallback</span></p>
- <div class="docgale-math docgale-math--block">\[w^4\]</div></body></html>"""
+ <div class="docvortex-math docvortex-math--block">\[w^4\]</div></body></html>"""
middle = doc_analyze(payload, file_suffix="html")[0]
markdown = render_markdown(middle)
@@ -939,9 +939,9 @@ def test_html_generic_formula_class_wrappers_preserve_mixed_content() -> None:
def test_html_mineru_page_footnote_marker_roundtrips_as_page_footnote() -> None:
- """验证 DocGale HTML renderer 的轻量脚注 marker 可恢复统一 page_footnote block。"""
+ """验证 DocVortex HTML renderer 的轻量脚注 marker 可恢复统一 page_footnote block。"""
payload = b"""<html><body><h1>Footnote</h1>
- <div class="docgale-page-footnote" data-block-type="page_footnote">Rendered footnote.</div>
+ <div class="docvortex-page-footnote" data-block-type="page_footnote">Rendered footnote.</div>
</body></html>"""
middle = doc_analyze(payload, file_suffix="html")[0]
@@ -977,9 +977,9 @@ def test_html_arbitrary_svg_data_image_degrades_to_alt_text() -> None:
def test_html_mineru_figure_keeps_real_caption_without_exposing_alt_as_caption() -> None:
"""验证 MinerU renderer 图片只恢复真实 caption,不重复显示用于无障碍的长 alt。"""
- payload = b"""<html><body><h1>Figure</h1><figure class="docgale-figure docgale-figure--image">
+ payload = b"""<html><body><h1>Figure</h1><figure class="docvortex-figure docvortex-figure--image">
<img src="https://example.com/image.png" alt="Long internal image description">
- <p class="docgale-caption">Visible figure caption</p></figure></body></html>"""
+ <p class="docvortex-caption">Visible figure caption</p></figure></body></html>"""
markdown = render_markdown(doc_analyze(payload, file_suffix="html")[0])
@@ -989,9 +989,9 @@ def test_html_mineru_figure_keeps_real_caption_without_exposing_alt_as_caption()
def test_html_mineru_table_figure_rebinds_renderer_caption() -> None:
"""验证 MinerU table figure 的独立 caption 恢复为 table_caption 且只输出一次。"""
- payload = b"""<html><body><h1>Table figure</h1><figure class="docgale-figure docgale-figure--table">
+ payload = b"""<html><body><h1>Table figure</h1><figure class="docvortex-figure docvortex-figure--table">
<table><tr><th>A</th></tr><tr><td>1</td></tr></table>
- <p class="docgale-caption">Visible table caption</p></figure></body></html>"""
+ <p class="docvortex-caption">Visible table caption</p></figure></body></html>"""
middle = doc_analyze(payload, file_suffix="html")[0]
markdown = render_markdown(middle)
@@ -1172,7 +1172,7 @@ def test_html_alt_caption_fallback_policy_distinguishes_generic_and_mineru_figur
payload = b"""<html><body>
<figure><img src="https://example.com/a.png" alt="Generic alt"></figure>
<figure><img src="https://example.com/b.png" alt="Hidden alt"><figcaption>Explicit caption</figcaption></figure>
- <figure class="docgale-figure"><img src="https://example.com/c.png" alt="Accessibility alt"></figure>
+ <figure class="docvortex-figure"><img src="https://example.com/c.png" alt="Accessibility alt"></figure>
</body></html>"""
middle = doc_analyze(payload, file_suffix="html")[0]
@@ -1515,21 +1515,21 @@ def test_html_versioned_wire_roundtrips_empty_code_body() -> None:
def test_html_versioned_wire_roundtrips_all_semantic_types() -> None:
- """验证新版 DocGale HTML 在 DEFAULT/FULL 中精确恢复公开类型和关键元数据。"""
+ """验证新版 DocVortex HTML 在 DEFAULT/FULL 中精确恢复公开类型和关键元数据。"""
source = _wire_contract_middle()
default_html = render_html(source, standalone=False)
full_html = render_html(source, mode=RenderMode.FULL, standalone=False)
standalone_html = render_html(source, standalone=True)
- default_root = BeautifulSoup(default_html, "html.parser").select_one(".docgale-document")
- full_root = BeautifulSoup(full_html, "html.parser").select_one(".docgale-document")
+ default_root = BeautifulSoup(default_html, "html.parser").select_one(".docvortex-document")
+ full_root = BeautifulSoup(full_html, "html.parser").select_one(".docvortex-document")
- assert default_root["data-docgale-html-version"] == "1"
+ assert default_root["data-docvortex-html-version"] == "1"
assert default_root["data-render-mode"] == "default"
assert full_root["data-render-mode"] == "full"
assert full_root.select_one('[data-block-type="chart_body"]') is not None
assert full_root.select_one('[data-block-type="image_footnote"]') is not None
assert full_root.select_one('[data-block-sub-type="algorithm"]') is not None
- assert "y^2\\tag{1}" in [element.get("data-docgale-latex") for element in full_root.select("[data-docgale-latex]")]
+ assert "y^2\\tag{1}" in [element.get("data-docvortex-latex") for element in full_root.select("[data-docvortex-latex]")]
default_middle = doc_analyze(default_html.encode(), file_suffix="html")[0]
full_middle = doc_analyze(full_html.encode(), file_suffix="html")[0]
@@ -1565,15 +1565,15 @@ def test_html_wire_decode_distinguishes_absent_empty_and_noncanonical() -> None:
ordinary = html_document_module.parse_html_document(b"<html><body><p>ordinary</p></body></html>")
empty = html_document_module.parse_html_document(render_html(source, standalone=False).encode())
edited_soup = BeautifulSoup(render_html(source, standalone=False), "html.parser")
- edited_soup.select_one(".docgale-document").append("EDITED")
+ edited_soup.select_one(".docvortex-document").append("EDITED")
edited = html_document_module.parse_html_document(str(edited_soup).encode())
- ordinary_result = decode_docgale_html_wire(
+ ordinary_result = decode_docvortex_html_wire(
ordinary.body,
HtmlResourceContext(ordinary.source_context),
)
- empty_result = decode_docgale_html_wire(empty.body, HtmlResourceContext(empty.source_context))
- edited_result = decode_docgale_html_wire(edited.body, HtmlResourceContext(edited.source_context))
+ empty_result = decode_docvortex_html_wire(empty.body, HtmlResourceContext(empty.source_context))
+ edited_result = decode_docvortex_html_wire(edited.body, HtmlResourceContext(edited.source_context))
assert ordinary_result.blocks is None and ordinary_result.fallback_reason is None
assert empty_result.blocks == [] and empty_result.fallback_reason is None
@@ -1708,7 +1708,7 @@ def test_html_versioned_wire_roundtrips_canonical_visual_body_variants() -> None
rendered = render_html(source, standalone=False)
document = html_document_module.parse_html_document(rendered.encode())
- decode_result = decode_docgale_html_wire(document.body, HtmlResourceContext(document.source_context))
+ decode_result = decode_docvortex_html_wire(document.body, HtmlResourceContext(document.source_context))
middle, _ = doc_analyze(rendered.encode(), file_suffix="html")
bodies = [block.content[0] for block in middle.pages[0].blocks]
@@ -1751,7 +1751,7 @@ def test_html_versioned_wire_distinguishes_index_carrier_from_inline_link() -> N
rendered = render_html(source, standalone=False)
document = html_document_module.parse_html_document(rendered.encode())
- decode_result = decode_docgale_html_wire(document.body, HtmlResourceContext(document.source_context))
+ decode_result = decode_docvortex_html_wire(document.body, HtmlResourceContext(document.source_context))
middle = doc_analyze(rendered.encode(), file_suffix="html")[0]
assert decode_result.blocks is not None and decode_result.fallback_reason is None
@@ -1799,7 +1799,7 @@ def test_html_noncanonical_wire_structural_edits_use_generic_fallback(edit_kind:
}
)
soup = BeautifulSoup(render_html(source, standalone=False), "html.parser")
- target = soup.select_one('.docgale-index li[data-block-type="paragraph_title"]')
+ target = soup.select_one('.docvortex-index li[data-block-type="paragraph_title"]')
assert target is not None
target.append(" ADDED")
else:
@@ -1809,7 +1809,7 @@ def test_html_noncanonical_wire_structural_edits_use_generic_fallback(edit_kind:
target.append(soup.new_tag("img", src="https://example.com/added.png", alt="Added"))
document = html_document_module.parse_html_document(str(soup).encode())
- decode_result = decode_docgale_html_wire(document.body, HtmlResourceContext(document.source_context))
+ decode_result = decode_docvortex_html_wire(document.body, HtmlResourceContext(document.source_context))
middle, model = doc_analyze(str(soup).encode(), file_suffix="html")
assert decode_result.blocks is None and decode_result.fallback_reason == "non_canonical_wire"
@@ -1900,11 +1900,11 @@ def test_html_invalid_versioned_markers_fallback_without_partial_results() -> No
variants: list[str] = []
unknown = BeautifulSoup(base, "html.parser")
- unknown.select_one(".docgale-document")["data-docgale-html-version"] = "999"
+ unknown.select_one(".docvortex-document")["data-docvortex-html-version"] = "999"
variants.append(str(unknown))
illegal_type = BeautifulSoup(base, "html.parser")
- illegal_type.select_one(".docgale-block")["data-block-type"] = "not_a_block"
+ illegal_type.select_one(".docvortex-block")["data-block-type"] = "not_a_block"
variants.append(str(illegal_type))
missing_body = BeautifulSoup(base, "html.parser")
@@ -1936,8 +1936,8 @@ def test_html_invalid_versioned_markers_fallback_without_partial_results() -> No
@pytest.mark.parametrize(
("parent_type", "body_type", "sub_type", "owned_class"),
[
- ("image", "image_body", "diagram", "docgale-image"),
- ("chart", "chart_body", "bar", "docgale-chart-image"),
+ ("image", "image_body", "diagram", "docvortex-image"),
+ ("chart", "chart_body", "bar", "docvortex-chart-image"),
],
)
def test_html_versioned_wire_multiple_owned_images_fall_back_without_loss(
@@ -2006,19 +2006,19 @@ def test_html_versioned_wire_visible_structural_text_falls_back_without_loss() -
variants: list[tuple[str, str]] = []
root_text = BeautifulSoup(default_html, "html.parser")
- root_text.select_one(".docgale-document").insert(0, "ROOT EDIT ")
+ root_text.select_one(".docvortex-document").insert(0, "ROOT EDIT ")
variants.append((str(root_text), "ROOT EDIT"))
section_text = BeautifulSoup(full_html, "html.parser")
- section_text.select_one(".docgale-page").insert(0, "SECTION EDIT ")
+ section_text.select_one(".docvortex-page").insert(0, "SECTION EDIT ")
variants.append((str(section_text), "SECTION EDIT"))
wrapper_text = BeautifulSoup(default_html, "html.parser")
- wrapper_text.select_one(".docgale-block").insert(0, "WRAPPER EDIT ")
+ wrapper_text.select_one(".docvortex-block").insert(0, "WRAPPER EDIT ")
variants.append((str(wrapper_text), "WRAPPER EDIT"))
child_tail = BeautifulSoup(default_html, "html.parser")
- child_tail.select_one(".docgale-block > p").insert_after(" CHILD TAIL EDIT")
+ child_tail.select_one(".docvortex-block > p").insert_after(" CHILD TAIL EDIT")
variants.append((str(child_tail), "CHILD TAIL EDIT"))
for variant, edited_text in variants:
@@ -2043,7 +2043,7 @@ def test_html_versioned_wire_visible_sibling_falls_back_without_loss(position: s
soup = BeautifulSoup(render_html(source, standalone=False), "html.parser")
sibling = soup.new_tag("p")
sibling.string = "VISIBLE SIBLING"
- wire_root = soup.select_one(".docgale-document")
+ wire_root = soup.select_one(".docvortex-document")
if position == "before":
wire_root.insert_before(sibling)
else:
@@ -2082,7 +2082,7 @@ def test_html_versioned_wire_markerless_block_child_falls_back_without_crash() -
soup = BeautifulSoup(render_html(source, standalone=False), "html.parser")
paragraph = soup.new_tag("p")
paragraph.string = "EXTRA NOTE"
- soup.select_one(".docgale-page-footnote").append(paragraph)
+ soup.select_one(".docvortex-page-footnote").append(paragraph)
markdown = render_markdown(doc_analyze(str(soup).encode(), file_suffix="html")[0])
@@ -2321,7 +2321,7 @@ def test_html_generic_div_soup_attaches_contextual_caption_and_footnote() -> Non
def test_html_formula_priority_delimiters_and_supported_mathml_are_normalized() -> None:
"""验证所有受支持公式来源按统一优先级输出裸 LaTeX,并保留内部 tag。"""
payload = rb"""<html><body><h1>Formula matrix</h1><p>
- <span class="formula"><span data-docgale-latex="\(producer\)" data-tex="data-low"><math alttext="alt-low">
+ <span class="formula"><span data-docvortex-latex="\(producer\)" data-tex="data-low"><math alttext="alt-low">
<annotation encoding="application/x-tex">annotation-low</annotation></math></span></span>
<math data-tex="data-low"><semantics><mi>x</mi>
<annotation encoding="application/x-tex">annotation-high</annotation></semantics></math>
diff --git a/tests/unittest/test_flash_image_mtef.py b/tests/unittest/test_flash_image_mtef.py
index 779e4868..4764fc82 100644
--- a/tests/unittest/test_flash_image_mtef.py
+++ b/tests/unittest/test_flash_image_mtef.py
@@ -2,10 +2,10 @@ from __future__ import annotations
import pytest
-from docgale.analyzers.native.office.errors import LegacyOfficeResourceLimitError
-from docgale.analyzers.native.office.equation import image as image_equation_module
-from docgale.analyzers.native.office.equation.image import OfficeImageEquationDecoder
-from docgale.analyzers.native.office.equation.image import decode_image_embedded_equation
+from docvortex.analyzers.native.office.errors import LegacyOfficeResourceLimitError
+from docvortex.analyzers.native.office.equation import image as image_equation_module
+from docvortex.analyzers.native.office.equation.image import OfficeImageEquationDecoder
+from docvortex.analyzers.native.office.equation.image import decode_image_embedded_equation
from _image_mtef_test_utils import (
apps_mfcc_comment,
diff --git a/tests/unittest/test_flash_legacy_chart_data.py b/tests/unittest/test_flash_legacy_chart_data.py
index 8e6631ee..41faa551 100644
--- a/tests/unittest/test_flash_legacy_chart_data.py
+++ b/tests/unittest/test_flash_legacy_chart_data.py
@@ -6,9 +6,9 @@ import zlib
from bs4 import BeautifulSoup
from mineru.backend.analyze import doc_analyze
-from docgale.analyzers.native.office.ppt import parser as ppt_parser
-from docgale.analyzers.native.office.ppt.records import PptRecord
-from docgale.analyzers.native.office.xls.embedded_chart import extract_embedded_chart_html
+from docvortex.analyzers.native.office.ppt import parser as ppt_parser
+from docvortex.analyzers.native.office.ppt.records import PptRecord
+from docvortex.analyzers.native.office.xls.embedded_chart import extract_embedded_chart_html
from mineru.types import BlockType, ChartBlock
from _legacy_ppt_test_utils import _build_cfb
diff --git a/tests/unittest/test_flash_legacy_doc.py b/tests/unittest/test_flash_legacy_doc.py
index d25fcd0a..918dd0cc 100644
--- a/tests/unittest/test_flash_legacy_doc.py
+++ b/tests/unittest/test_flash_legacy_doc.py
@@ -8,22 +8,22 @@ from unittest.mock import Mock
import pytest
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.postprocess.lists import fix_office_list_blocks
-from docgale.analyzers.native import DocModel
-from docgale.analyzers.native._shared.hyperlink import OFFICE_EXTERNAL_HYPERLINK_SCHEMES
-from docgale.analyzers.native._shared.hyperlink import sanitize_hyperlink_target
-from docgale.analyzers.native.office.doc.models import DocCharStyle
-from docgale.analyzers.native.office.doc.models import DocTableCell
-from docgale.analyzers.native.office.doc.images import ImageStore
-from docgale.analyzers.native.office.doc.parser import _RawTableRow
-from docgale.analyzers.native.office.doc.parser import _materialize_table_rows
-from docgale.analyzers.native.office.doc.records import DocBudget
-from docgale.analyzers.native.office.doc.sprm import apply_character_sprms
-from docgale.analyzers.native.office.errors import LegacyOfficeEncryptedError
-from docgale.analyzers.native.office.errors import LegacyOfficeMalformedError
-from docgale.analyzers.native.office.errors import LegacyOfficeMissingPartError
-from docgale.analyzers.native.office.errors import LegacyOfficeResourceLimitError
-from docgale.analyzers.native.office.legacy.officeart import OfficeImagePayload
+from docvortex.postprocess.lists import fix_office_list_blocks
+from docvortex.analyzers.native import DocModel
+from docvortex.analyzers.native._shared.hyperlink import OFFICE_EXTERNAL_HYPERLINK_SCHEMES
+from docvortex.analyzers.native._shared.hyperlink import sanitize_hyperlink_target
+from docvortex.analyzers.native.office.doc.models import DocCharStyle
+from docvortex.analyzers.native.office.doc.models import DocTableCell
+from docvortex.analyzers.native.office.doc.images import ImageStore
+from docvortex.analyzers.native.office.doc.parser import _RawTableRow
+from docvortex.analyzers.native.office.doc.parser import _materialize_table_rows
+from docvortex.analyzers.native.office.doc.records import DocBudget
+from docvortex.analyzers.native.office.doc.sprm import apply_character_sprms
+from docvortex.analyzers.native.office.errors import LegacyOfficeEncryptedError
+from docvortex.analyzers.native.office.errors import LegacyOfficeMalformedError
+from docvortex.analyzers.native.office.errors import LegacyOfficeMissingPartError
+from docvortex.analyzers.native.office.errors import LegacyOfficeResourceLimitError
+from docvortex.analyzers.native.office.legacy.officeart import OfficeImagePayload
from mineru.parser import parse
from mineru.types import BlockType, MiddleJson, ModelJson
@@ -203,8 +203,8 @@ def test_doc_exact_list_label_is_consumed_before_strict_projection() -> None:
def test_doc_table_grid_materializes_colspan_and_rowspan() -> None:
"""验证 Word table edge 网格能同时恢复横向和纵向合并。"""
- from docgale.analyzers.native.office.doc.models import DocTableCellFormat
- from docgale.analyzers.native.office.doc.models import DocTableFormat
+ from docvortex.analyzers.native.office.doc.models import DocTableCellFormat
+ from docvortex.analyzers.native.office.doc.models import DocTableFormat
first = DocTableCell(blocks=[])
raw_rows = [
@@ -252,7 +252,7 @@ def test_doc_rejects_word95_encryption_rtf_and_missing_word_stream() -> None:
def test_doc_budget_uses_stable_resource_limit(monkeypatch: pytest.MonkeyPatch) -> None:
"""验证 DOC 记录预算超过固定上限时使用共享错误类型。"""
- import docgale.analyzers.native.office.doc.records as records
+ import docvortex.analyzers.native.office.doc.records as records
monkeypatch.setattr(records, "MAX_RECORDS", 1)
budget = records.DocBudget()
diff --git a/tests/unittest/test_flash_legacy_doc_mtef.py b/tests/unittest/test_flash_legacy_doc_mtef.py
index 952b17c8..3a3f4c25 100644
--- a/tests/unittest/test_flash_legacy_doc_mtef.py
+++ b/tests/unittest/test_flash_legacy_doc_mtef.py
@@ -6,10 +6,10 @@ from io import BytesIO
import pytest
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.analyzers.native import DocModel
-from docgale.analyzers.native.office.equation.mtef import decode_equation_native
-from docgale.analyzers.native.office.equation.mtef import decode_equation_object
-from docgale.analyzers.native.office.equation.mtef import decode_mtef_v3
+from docvortex.analyzers.native import DocModel
+from docvortex.analyzers.native.office.equation.mtef import decode_equation_native
+from docvortex.analyzers.native.office.equation.mtef import decode_equation_object
+from docvortex.analyzers.native.office.equation.mtef import decode_mtef_v3
from mineru.render.contracts import RenderMode
from mineru.render.html import render_html
from mineru.render.markdown import render_markdown
diff --git a/tests/unittest/test_flash_legacy_ppt.py b/tests/unittest/test_flash_legacy_ppt.py
index 573f12f9..67191f45 100644
--- a/tests/unittest/test_flash_legacy_ppt.py
+++ b/tests/unittest/test_flash_legacy_ppt.py
@@ -8,18 +8,18 @@ import struct
import pytest
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.analyzers.native import PptModel
-from docgale.analyzers.native._shared.hyperlink import sanitize_hyperlink_target
-from docgale.analyzers.native.office.errors import LegacyOfficeEncryptedError
-from docgale.analyzers.native.office.errors import LegacyOfficeResourceLimitError
-from docgale.analyzers.native.office.ppt import parser as ppt_parser
-from docgale.analyzers.native.office.ppt.models import PptPresentation
-from docgale.analyzers.native.office.ppt.models import PptSlide
-from docgale.analyzers.native.office.ppt.ppt_converter import PptConverter
-from docgale.analyzers.native.office.ppt.records import PptRecord
-from docgale.analyzers.native.office.ppt.records import RecordBudget
-from docgale.analyzers.native.office.ppt.style_text import CharacterRun
-from docgale.analyzers.native.office.ppt.style_text import StyleRuns
+from docvortex.analyzers.native import PptModel
+from docvortex.analyzers.native._shared.hyperlink import sanitize_hyperlink_target
+from docvortex.analyzers.native.office.errors import LegacyOfficeEncryptedError
+from docvortex.analyzers.native.office.errors import LegacyOfficeResourceLimitError
+from docvortex.analyzers.native.office.ppt import parser as ppt_parser
+from docvortex.analyzers.native.office.ppt.models import PptPresentation
+from docvortex.analyzers.native.office.ppt.models import PptSlide
+from docvortex.analyzers.native.office.ppt.ppt_converter import PptConverter
+from docvortex.analyzers.native.office.ppt.records import PptRecord
+from docvortex.analyzers.native.office.ppt.records import RecordBudget
+from docvortex.analyzers.native.office.ppt.style_text import CharacterRun
+from docvortex.analyzers.native.office.ppt.style_text import StyleRuns
from mineru.parser import parse
from mineru.types import BlockType, MiddleJson, ModelJson
diff --git a/tests/unittest/test_flash_legacy_xls.py b/tests/unittest/test_flash_legacy_xls.py
index 04f32264..a9c93872 100644
--- a/tests/unittest/test_flash_legacy_xls.py
+++ b/tests/unittest/test_flash_legacy_xls.py
@@ -9,17 +9,17 @@ from bs4 import BeautifulSoup
import pytest
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.analyzers.native import XlsModel
-from docgale.analyzers.native._shared.hyperlink import OFFICE_EXTERNAL_HYPERLINK_SCHEMES
-from docgale.analyzers.native._shared.hyperlink import sanitize_hyperlink_target
-from docgale.analyzers.native.office.errors import LegacyOfficeEncryptedError
-from docgale.analyzers.native.office.errors import LegacyOfficeMissingPartError
-from docgale.analyzers.native.office.errors import LegacyOfficeResourceLimitError
-from docgale.analyzers.native.office.limits import MAX_RECORDS
-from docgale.analyzers.native.office.xls import xls_converter as xls_converter_module
-from docgale.analyzers.native.office.xls.number_format import format_number
-from docgale.analyzers.native.office.xls.number_format import format_text
-from docgale.analyzers.native.office.xls.records import RecordBudget
+from docvortex.analyzers.native import XlsModel
+from docvortex.analyzers.native._shared.hyperlink import OFFICE_EXTERNAL_HYPERLINK_SCHEMES
+from docvortex.analyzers.native._shared.hyperlink import sanitize_hyperlink_target
+from docvortex.analyzers.native.office.errors import LegacyOfficeEncryptedError
+from docvortex.analyzers.native.office.errors import LegacyOfficeMissingPartError
+from docvortex.analyzers.native.office.errors import LegacyOfficeResourceLimitError
+from docvortex.analyzers.native.office.limits import MAX_RECORDS
+from docvortex.analyzers.native.office.xls import xls_converter as xls_converter_module
+from docvortex.analyzers.native.office.xls.number_format import format_number
+from docvortex.analyzers.native.office.xls.number_format import format_text
+from docvortex.analyzers.native.office.xls.records import RecordBudget
from mineru.parser import parse
from mineru.types import BlockType, MiddleJson, ModelJson
diff --git a/tests/unittest/test_flash_legacy_xls_ppt_mtef.py b/tests/unittest/test_flash_legacy_xls_ppt_mtef.py
index aa9be51d..550314c4 100644
--- a/tests/unittest/test_flash_legacy_xls_ppt_mtef.py
+++ b/tests/unittest/test_flash_legacy_xls_ppt_mtef.py
@@ -7,10 +7,10 @@ from io import BytesIO
import pytest
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.analyzers.native import PptModel
-from docgale.analyzers.native import XlsModel
-from docgale.analyzers.native.office.errors import LegacyOfficeResourceLimitError
-from docgale.analyzers.native.office.limits import MAX_ENTRY_BYTES
+from docvortex.analyzers.native import PptModel
+from docvortex.analyzers.native import XlsModel
+from docvortex.analyzers.native.office.errors import LegacyOfficeResourceLimitError
+from docvortex.analyzers.native.office.limits import MAX_ENTRY_BYTES
from mineru.types import BlockType, MiddleJson, ModelJson
from _legacy_ppt_test_utils import build_equation_ppt
diff --git a/tests/unittest/test_flash_markup_anchors.py b/tests/unittest/test_flash_markup_anchors.py
index 64b786ad..47b32518 100644
--- a/tests/unittest/test_flash_markup_anchors.py
+++ b/tests/unittest/test_flash_markup_anchors.py
@@ -4,13 +4,13 @@ from dataclasses import dataclass
from lxml import etree
-from docgale.analyzers.native._shared.markup import AnchorVisibilityScope
-from docgale.analyzers.native._shared.markup import MarkupAnchorDocument
-from docgale.analyzers.native._shared.markup import MarkupAnchorRegistry
-from docgale.analyzers.native._shared.markup import MarkupStylesheet
-from docgale.analyzers.native._shared.markup import canonical_anchor
-from docgale.analyzers.native._shared.markup import element_id
-from docgale.analyzers.native._shared.markup import visible_element_text
+from docvortex.analyzers.native._shared.markup import AnchorVisibilityScope
+from docvortex.analyzers.native._shared.markup import MarkupAnchorDocument
+from docvortex.analyzers.native._shared.markup import MarkupAnchorRegistry
+from docvortex.analyzers.native._shared.markup import MarkupStylesheet
+from docvortex.analyzers.native._shared.markup import canonical_anchor
+from docvortex.analyzers.native._shared.markup import element_id
+from docvortex.analyzers.native._shared.markup import visible_element_text
@dataclass(frozen=True, slots=True)
diff --git a/tests/unittest/test_flash_model.py b/tests/unittest/test_flash_model.py
index 162b48b2..60a5db06 100644
--- a/tests/unittest/test_flash_model.py
+++ b/tests/unittest/test_flash_model.py
@@ -5,9 +5,9 @@ from unittest.mock import MagicMock
import pytest
-from docgale.analyzers.native import PdfModel
-from docgale.analyzers.native.pdf import pipeline
-from docgale.document.pdf.document import PDFDocument
+from docvortex.analyzers.native import PdfModel
+from docvortex.analyzers.native.pdf import pipeline
+from docvortex.document.pdf.document import PDFDocument
def test_pdf_model_predict_returns_native_model_list_without_owning_document(
@@ -31,7 +31,7 @@ def test_pdf_model_predict_returns_native_model_list_without_owning_document(
def test_pdf_model_is_public_and_old_flash_model_is_removed() -> None:
"""验证 PdfModel 公开可用,旧 FlashModel 名称不再兼容。"""
- flash_module = importlib.import_module("docgale.analyzers.native")
+ flash_module = importlib.import_module("docvortex.analyzers.native")
assert flash_module.PdfModel is PdfModel
assert not hasattr(flash_module, "FlashModel")
diff --git a/tests/unittest/test_flash_mtef_v5.py b/tests/unittest/test_flash_mtef_v5.py
index f67cef1e..1c804515 100644
--- a/tests/unittest/test_flash_mtef_v5.py
+++ b/tests/unittest/test_flash_mtef_v5.py
@@ -4,14 +4,14 @@ import struct
import pytest
-from docgale.analyzers.native.office.equation import mtef_v5 as mtef_v5_module
-from docgale.analyzers.native.office.equation import mtef as mtef_module
-from docgale.analyzers.native.office.errors import LegacyOfficeResourceLimitError
-from docgale.analyzers.native.office.equation.mtef import decode_equation_native
-from docgale.analyzers.native.office.equation.mtef import decode_equation_object
-from docgale.analyzers.native.office.equation.mtef import decode_mtef
-from docgale.analyzers.native.office.equation.mtef import decode_mtef_v3
-from docgale.analyzers.native.office.equation.mtef import decode_mtef_v5
+from docvortex.analyzers.native.office.equation import mtef_v5 as mtef_v5_module
+from docvortex.analyzers.native.office.equation import mtef as mtef_module
+from docvortex.analyzers.native.office.errors import LegacyOfficeResourceLimitError
+from docvortex.analyzers.native.office.equation.mtef import decode_equation_native
+from docvortex.analyzers.native.office.equation.mtef import decode_equation_object
+from docvortex.analyzers.native.office.equation.mtef import decode_mtef
+from docvortex.analyzers.native.office.equation.mtef import decode_mtef_v3
+from docvortex.analyzers.native.office.equation.mtef import decode_mtef_v5
from _mtef_test_utils import build_equation_object, equation_native, formula_corpus
from _mtef_v5_test_utils import (
diff --git a/tests/unittest/test_flash_odf.py b/tests/unittest/test_flash_odf.py
index da335a64..f2f14c86 100644
--- a/tests/unittest/test_flash_odf.py
+++ b/tests/unittest/test_flash_odf.py
@@ -13,27 +13,27 @@ from zipfile import ZIP_DEFLATED, ZipFile
import pytest
from lxml import etree
-import docgale.analyzers.native.office.odf.table as odf_table_module
-import docgale.analyzers.native.office.odf.text as odf_text_module
+import docvortex.analyzers.native.office.odf.table as odf_table_module
+import docvortex.analyzers.native.office.odf.text as odf_text_module
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
from mineru.doclib.core.file_io import extract_metadata
from mineru.doclib.core.db import DatabaseManager
from mineru.doclib.core.fts import FTSManager
from mineru.doclib.services.parse_svc import ParseService
from mineru.errors import InvalidRequestError
-from docgale.analyzers.native import OdpModel
-from docgale.analyzers.native import OdsModel
-from docgale.analyzers.native import OdtModel
-from docgale.analyzers.native.office.odf.errors import OdfEncryptedError
-from docgale.analyzers.native.office.odf.errors import OdfParseError
-from docgale.analyzers.native.office.odf.errors import OdfResourceLimitError
-from docgale.analyzers.native.office.odf.metadata import MAX_ODT_METADATA_PAGE_COUNT
-from docgale.analyzers.native.office.odf.metadata import extract_odf_metadata
-from docgale.analyzers.native.office.odf.package import OdfPackage
+from docvortex.analyzers.native import OdpModel
+from docvortex.analyzers.native import OdsModel
+from docvortex.analyzers.native import OdtModel
+from docvortex.analyzers.native.office.odf.errors import OdfEncryptedError
+from docvortex.analyzers.native.office.odf.errors import OdfParseError
+from docvortex.analyzers.native.office.odf.errors import OdfResourceLimitError
+from docvortex.analyzers.native.office.odf.metadata import MAX_ODT_METADATA_PAGE_COUNT
+from docvortex.analyzers.native.office.odf.metadata import extract_odf_metadata
+from docvortex.analyzers.native.office.odf.package import OdfPackage
from mineru.parser import parse, parse_async
from mineru.parser import api_server
from mineru.parser.api_server import CreateJobRequest, FileStore
-from docgale.document.detection import guess_suffix_by_bytes, guess_suffix_by_path
+from docvortex.document.detection import guess_suffix_by_bytes, guess_suffix_by_path
from mineru.render import render_docx, render_html, render_markdown, render_structured_content
from mineru.types import BlockType
@@ -1362,10 +1362,10 @@ def test_csv_and_rtf_runtime_do_not_load_odf_modules() -> None:
script = "\n".join(
[
"import io, sys",
- "from docgale.analyzers.native import CsvModel, RtfModel",
+ "from docvortex.analyzers.native import CsvModel, RtfModel",
"CsvModel().predict(io.BytesIO(b'a,b\\n1,2\\n'))",
"RtfModel().predict(io.BytesIO(b'{\\\\rtf1 ok}'))",
- "assert not any(name.startswith('docgale.analyzers.native.office.odf') for name in sys.modules)",
+ "assert not any(name.startswith('docvortex.analyzers.native.office.odf') for name in sys.modules)",
]
)
result = subprocess.run([sys.executable, "-c", script], capture_output=True, text=True, check=False)
@@ -1374,6 +1374,6 @@ def test_csv_and_rtf_runtime_do_not_load_odf_modules() -> None:
def test_odf_subpackage_does_not_export_models() -> None:
"""验证 ODF 模型只从 Flash 根包公开,不形成第二套公共路径。"""
- assert importlib.util.find_spec("docgale.analyzers.native.office.odf.model") is None
- package = __import__("docgale.analyzers.native.office.odf", fromlist=["__all__"])
+ assert importlib.util.find_spec("docvortex.analyzers.native.office.odf.model") is None
+ package = __import__("docvortex.analyzers.native.office.odf", fromlist=["__all__"])
assert package.__all__ == []
diff --git a/tests/unittest/test_flash_ofd.py b/tests/unittest/test_flash_ofd.py
index 2e85b218..75f16053 100644
--- a/tests/unittest/test_flash_ofd.py
+++ b/tests/unittest/test_flash_ofd.py
@@ -20,45 +20,45 @@ from mineru.doclib.core.db import DatabaseManager
from mineru.doclib.core.fts import FTSManager
from mineru.doclib.services.parse_svc import ParseService
from mineru.errors import InvalidRequestError
-from docgale.analyzers.native import OfdModel
-from docgale.analyzers.native.ofd import OfdParseError
-from docgale.analyzers.native.ofd import OfdResourceLimitError
-from docgale.analyzers.native.ofd import detect_ofd
-from docgale.analyzers.native.ofd import images as ofd_images
-from docgale.analyzers.native.ofd import metadata as ofd_metadata
-from docgale.analyzers.native.ofd import scene as ofd_scene
-from docgale.analyzers.native.ofd import table as ofd_table
-from docgale.analyzers.native.ofd import text as ofd_text
-from docgale.analyzers.native.ofd.constants import MAX_DELTA_TOKENS
-from docgale.analyzers.native.ofd.constants import MAX_DOCUMENT_COUNT
-from docgale.analyzers.native.ofd.constants import MAX_DRAW_PARAM_INHERITANCE
-from docgale.analyzers.native.ofd.constants import MAX_EXPANDED_GLYPHS
-from docgale.analyzers.native.ofd.constants import MAX_GLYPH_TOKENS
-from docgale.analyzers.native.ofd.constants import MAX_PAGE_COUNT
-from docgale.analyzers.native.ofd.constants import MAX_PATH_TOKENS
-from docgale.analyzers.native.ofd.geometry import Affine
-from docgale.analyzers.native.ofd.geometry import canonical_angle
-from docgale.analyzers.native.ofd.images import build_image_item
-from docgale.analyzers.native.ofd.models import AxisLine
-from docgale.analyzers.native.ofd.models import MediaResource
-from docgale.analyzers.native.ofd.models import OfdPageScene
-from docgale.analyzers.native.ofd.models import ResourceRegistry
-from docgale.analyzers.native.ofd.models import TextLine
-from docgale.analyzers.native.ofd.package import OfdPackage
-from docgale.analyzers.native.ofd.path import OfdPathBudget
-from docgale.analyzers.native.ofd.path import _segments
-from docgale.analyzers.native.ofd.path import build_axis_lines
-from docgale.analyzers.native.ofd.reading_order import OfdReadingOrderProjector
-from docgale.analyzers.native.ofd.resources import parse_resource_part
-from docgale.analyzers.native.ofd.resources import resolve_draw_param
-from docgale.analyzers.native.ofd.text import FontMetricResolver
-from docgale.analyzers.native.ofd.text import OfdTextBudget
-from docgale.analyzers.native.ofd.text import build_text_lines
-from docgale.analyzers.native.ofd.text import parse_delta
+from docvortex.analyzers.native import OfdModel
+from docvortex.analyzers.native.ofd import OfdParseError
+from docvortex.analyzers.native.ofd import OfdResourceLimitError
+from docvortex.analyzers.native.ofd import detect_ofd
+from docvortex.analyzers.native.ofd import images as ofd_images
+from docvortex.analyzers.native.ofd import metadata as ofd_metadata
+from docvortex.analyzers.native.ofd import scene as ofd_scene
+from docvortex.analyzers.native.ofd import table as ofd_table
+from docvortex.analyzers.native.ofd import text as ofd_text
+from docvortex.analyzers.native.ofd.constants import MAX_DELTA_TOKENS
+from docvortex.analyzers.native.ofd.constants import MAX_DOCUMENT_COUNT
+from docvortex.analyzers.native.ofd.constants import MAX_DRAW_PARAM_INHERITANCE
+from docvortex.analyzers.native.ofd.constants import MAX_EXPANDED_GLYPHS
+from docvortex.analyzers.native.ofd.constants import MAX_GLYPH_TOKENS
+from docvortex.analyzers.native.ofd.constants import MAX_PAGE_COUNT
+from docvortex.analyzers.native.ofd.constants import MAX_PATH_TOKENS
+from docvortex.analyzers.native.ofd.geometry import Affine
+from docvortex.analyzers.native.ofd.geometry import canonical_angle
+from docvortex.analyzers.native.ofd.images import build_image_item
+from docvortex.analyzers.native.ofd.models import AxisLine
+from docvortex.analyzers.native.ofd.models import MediaResource
+from docvortex.analyzers.native.ofd.models import OfdPageScene
+from docvortex.analyzers.native.ofd.models import ResourceRegistry
+from docvortex.analyzers.native.ofd.models import TextLine
+from docvortex.analyzers.native.ofd.package import OfdPackage
+from docvortex.analyzers.native.ofd.path import OfdPathBudget
+from docvortex.analyzers.native.ofd.path import _segments
+from docvortex.analyzers.native.ofd.path import build_axis_lines
+from docvortex.analyzers.native.ofd.reading_order import OfdReadingOrderProjector
+from docvortex.analyzers.native.ofd.resources import parse_resource_part
+from docvortex.analyzers.native.ofd.resources import resolve_draw_param
+from docvortex.analyzers.native.ofd.text import FontMetricResolver
+from docvortex.analyzers.native.ofd.text import OfdTextBudget
+from docvortex.analyzers.native.ofd.text import build_text_lines
+from docvortex.analyzers.native.ofd.text import parse_delta
from mineru.parser import MinerUParser
from mineru.parser import api_server
from mineru.parser.api_server import CreateJobRequest, FileStore
-from docgale.document.detection import guess_suffix_by_bytes, guess_suffix_by_path
+from docvortex.document.detection import guess_suffix_by_bytes, guess_suffix_by_path
from mineru.render import render_docx, render_html, render_markdown, render_structured_content
from mineru.types import BlockType
diff --git a/tests/unittest/test_flash_office_image_mtef.py b/tests/unittest/test_flash_office_image_mtef.py
index 9b4708c0..60b7b465 100644
--- a/tests/unittest/test_flash_office_image_mtef.py
+++ b/tests/unittest/test_flash_office_image_mtef.py
@@ -1,5 +1,5 @@
from __future__ import annotations
-from docgale.export.middle import export_middle_json
+from docvortex.export.middle import export_middle_json
import asyncio
from collections.abc import Callable
@@ -10,22 +10,22 @@ from zipfile import ZIP_DEFLATED, ZipFile
import pytest
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.analyzers.native import DocModel
-from docgale.analyzers.native import DocxModel
-from docgale.analyzers.native import PptModel
-from docgale.analyzers.native import PptxModel
-from docgale.analyzers.native import XlsModel
-from docgale.analyzers.native import XlsxModel
-from docgale.analyzers.native.office.doc.doc_converter import DocConverter
-from docgale.analyzers.native.office.docx.docx_converter import DocxConverter
-from docgale.analyzers.native.office.doc.models import DocImage
-from docgale.analyzers.native.office.doc.models import DocImagePayload
-from docgale.analyzers.native.office.doc.models import DocParagraph
-from docgale.analyzers.native.office.doc.models import DocTable
-from docgale.analyzers.native.office.doc.models import DocTableCell
-from docgale.analyzers.native.office.doc.models import DocTableRow
-from docgale.analyzers.native.office.xlsx.xlsx_converter import XlsxConverter
-from docgale.analyzers.native.office.pptx.pptx_converter import PptxConverter
+from docvortex.analyzers.native import DocModel
+from docvortex.analyzers.native import DocxModel
+from docvortex.analyzers.native import PptModel
+from docvortex.analyzers.native import PptxModel
+from docvortex.analyzers.native import XlsModel
+from docvortex.analyzers.native import XlsxModel
+from docvortex.analyzers.native.office.doc.doc_converter import DocConverter
+from docvortex.analyzers.native.office.docx.docx_converter import DocxConverter
+from docvortex.analyzers.native.office.doc.models import DocImage
+from docvortex.analyzers.native.office.doc.models import DocImagePayload
+from docvortex.analyzers.native.office.doc.models import DocParagraph
+from docvortex.analyzers.native.office.doc.models import DocTable
+from docvortex.analyzers.native.office.doc.models import DocTableCell
+from docvortex.analyzers.native.office.doc.models import DocTableRow
+from docvortex.analyzers.native.office.xlsx.xlsx_converter import XlsxConverter
+from docvortex.analyzers.native.office.pptx.pptx_converter import PptxConverter
from mineru.types import BlockType, MiddleJson, ModelJson
from _docx_equationxml_test_utils import (
diff --git a/tests/unittest/test_flash_office_metafile.py b/tests/unittest/test_flash_office_metafile.py
index bf47f053..4ed4b994 100644
--- a/tests/unittest/test_flash_office_metafile.py
+++ b/tests/unittest/test_flash_office_metafile.py
@@ -32,22 +32,22 @@ from metafile_render import (
)
from PIL import Image
-from docgale.analyzers.native import DocModel
-from docgale.analyzers.native import DocxModel
-from docgale.analyzers.native import OdpModel
-from docgale.analyzers.native import OdsModel
-from docgale.analyzers.native import OdtModel
-from docgale.analyzers.native import PptModel
-from docgale.analyzers.native import PptxModel
-from docgale.analyzers.native import RtfModel
-from docgale.analyzers.native import XlsModel
-from docgale.analyzers.native import XlsxModel
-from docgale.analyzers.native.office import image as office_image
-from docgale.analyzers.native.office.legacy.officeart import OfficeArtRecord
-from docgale.analyzers.native.office.legacy.officeart import decode_blip
-from docgale.analyzers.native.office.pptx.pptx_converter import PptxConverter
-from docgale.analyzers.native.office.xlsx.xlsx_converter import XlsxConverter
-from docgale.foundation.image_payload import extract_generated_svg_fallback
+from docvortex.analyzers.native import DocModel
+from docvortex.analyzers.native import DocxModel
+from docvortex.analyzers.native import OdpModel
+from docvortex.analyzers.native import OdsModel
+from docvortex.analyzers.native import OdtModel
+from docvortex.analyzers.native import PptModel
+from docvortex.analyzers.native import PptxModel
+from docvortex.analyzers.native import RtfModel
+from docvortex.analyzers.native import XlsModel
+from docvortex.analyzers.native import XlsxModel
+from docvortex.analyzers.native.office import image as office_image
+from docvortex.analyzers.native.office.legacy.officeart import OfficeArtRecord
+from docvortex.analyzers.native.office.legacy.officeart import decode_blip
+from docvortex.analyzers.native.office.pptx.pptx_converter import PptxConverter
+from docvortex.analyzers.native.office.xlsx.xlsx_converter import XlsxConverter
+from docvortex.foundation.image_payload import extract_generated_svg_fallback
def _open_result(payload: bytes) -> Image.Image:
diff --git a/tests/unittest/test_flash_office_mtef_v5.py b/tests/unittest/test_flash_office_mtef_v5.py
index e0ec9a67..0db58601 100644
--- a/tests/unittest/test_flash_office_mtef_v5.py
+++ b/tests/unittest/test_flash_office_mtef_v5.py
@@ -7,15 +7,15 @@ from io import BytesIO
import pytest
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.analyzers.native import DocModel
-from docgale.analyzers.native import DocxModel
-from docgale.analyzers.native import PptModel
-from docgale.analyzers.native import PptxModel
-from docgale.analyzers.native import XlsModel
-from docgale.analyzers.native import XlsxModel
-from docgale.analyzers.native.office.docx.docx_converter import DocxConverter
-from docgale.analyzers.native.office.pptx.pptx_converter import PptxConverter
-from docgale.analyzers.native.office.xlsx.xlsx_converter import XlsxConverter
+from docvortex.analyzers.native import DocModel
+from docvortex.analyzers.native import DocxModel
+from docvortex.analyzers.native import PptModel
+from docvortex.analyzers.native import PptxModel
+from docvortex.analyzers.native import XlsModel
+from docvortex.analyzers.native import XlsxModel
+from docvortex.analyzers.native.office.docx.docx_converter import DocxConverter
+from docvortex.analyzers.native.office.pptx.pptx_converter import PptxConverter
+from docvortex.analyzers.native.office.xlsx.xlsx_converter import XlsxConverter
from mineru.types import BlockType, MiddleJson, ModelJson
from _docx_equationxml_test_utils import (
diff --git a/tests/unittest/test_flash_office_package_normalizers.py b/tests/unittest/test_flash_office_package_normalizers.py
index cc3aab5d..54803a69 100644
--- a/tests/unittest/test_flash_office_package_normalizers.py
+++ b/tests/unittest/test_flash_office_package_normalizers.py
@@ -6,9 +6,9 @@ import xml.etree.ElementTree as ET
from lxml import etree
-from docgale.analyzers.native.office.docx.package_normalizer import normalize_docx_package
-from docgale.analyzers.native.office.pptx.package_normalizer import normalize_pptx_package
-from docgale.analyzers.native.office.xlsx.package_normalizer import normalize_xlsx_package
+from docvortex.analyzers.native.office.docx.package_normalizer import normalize_docx_package
+from docvortex.analyzers.native.office.pptx.package_normalizer import normalize_pptx_package
+from docvortex.analyzers.native.office.xlsx.package_normalizer import normalize_xlsx_package
_PACKAGE_RELATIONSHIPS_NS = "http://schemas.openxmlformats.org/package/2006/relationships"
diff --git a/tests/unittest/test_flash_ooxml_mtef.py b/tests/unittest/test_flash_ooxml_mtef.py
index 9aa36890..1fa8296a 100644
--- a/tests/unittest/test_flash_ooxml_mtef.py
+++ b/tests/unittest/test_flash_ooxml_mtef.py
@@ -1,5 +1,5 @@
from __future__ import annotations
-from docgale.export.middle import export_middle_json
+from docvortex.export.middle import export_middle_json
import asyncio
from collections.abc import Callable
@@ -13,16 +13,16 @@ from docx.oxml import parse_xml
import pytest
from mineru.backend.analyze import aio_doc_analyze, doc_analyze
-from docgale.analyzers.native import DocxModel
-from docgale.analyzers.native import PptxModel
-from docgale.analyzers.native import XlsxModel
-from docgale.analyzers.native.office.docx.docx_converter import DocxConverter
-from docgale.analyzers.native.office.errors import LegacyOfficeResourceLimitError
-from docgale.analyzers.native.office.limits import MAX_ASSET_TOTAL_BYTES
-from docgale.analyzers.native.office.equation.ooxml import OoxmlEquationDecoder
-from docgale.analyzers.native.office.equation.ooxml import is_mathtype_equation_prog_id
-from docgale.analyzers.native.office.pptx.pptx_converter import PptxConverter
-from docgale.analyzers.native.office.xlsx.xlsx_converter import XlsxConverter
+from docvortex.analyzers.native import DocxModel
+from docvortex.analyzers.native import PptxModel
+from docvortex.analyzers.native import XlsxModel
+from docvortex.analyzers.native.office.docx.docx_converter import DocxConverter
+from docvortex.analyzers.native.office.errors import LegacyOfficeResourceLimitError
+from docvortex.analyzers.native.office.limits import MAX_ASSET_TOTAL_BYTES
+from docvortex.analyzers.native.office.equation.ooxml import OoxmlEquationDecoder
+from docvortex.analyzers.native.office.equation.ooxml import is_mathtype_equation_prog_id
+from docvortex.analyzers.native.office.pptx.pptx_converter import PptxConverter
+from docvortex.analyzers.native.office.xlsx.xlsx_converter import XlsxConverter
from mineru.types import BlockType, MiddleJson, ModelJson
from _mtef_test_utils import build_equation_object, formula_corpus
diff --git a/tests/unittest/test_flash_pdf_auxiliary_text.py b/tests/unittest/test_flash_pdf_auxiliary_text.py
index 44de6108..33cfd2ec 100644
--- a/tests/unittest/test_flash_pdf_auxiliary_text.py
+++ b/tests/unittest/test_flash_pdf_auxiliary_text.py
@@ -4,10 +4,10 @@ import inspect
import pytest
-from docgale.analyzers.native.pdf import auxiliary_text
-from docgale.analyzers.native.pdf import models
-from docgale.analyzers.native.pdf import pipeline
-from docgale.analyzers.native.pdf import text_blocks
+from docvortex.analyzers.native.pdf import auxiliary_text
+from docvortex.analyzers.native.pdf import models
+from docvortex.analyzers.native.pdf import pipeline
+from docvortex.analyzers.native.pdf import text_blocks
from _flash_pdf_test_utils import (
diff --git a/tests/unittest/test_flash_pdf_document_profile.py b/tests/unittest/test_flash_pdf_document_profile.py
index fd99dff7..b25f2a0c 100644
--- a/tests/unittest/test_flash_pdf_document_profile.py
+++ b/tests/unittest/test_flash_pdf_document_profile.py
@@ -1,7 +1,7 @@
from __future__ import annotations
-from docgale.analyzers.native.pdf import models
-from docgale.analyzers.native.pdf import titles
+from docvortex.analyzers.native.pdf import models
+from docvortex.analyzers.native.pdf import titles
from _flash_pdf_test_utils import _prepared_text_page, _text_line
diff --git a/tests/unittest/test_flash_pdf_extractor.py b/tests/unittest/test_flash_pdf_extractor.py
index b3380477..b98c2a11 100644
--- a/tests/unittest/test_flash_pdf_extractor.py
+++ b/tests/unittest/test_flash_pdf_extractor.py
@@ -1,4 +1,4 @@
-from docgale.analyzers.native.pdf import pipeline
+from docvortex.analyzers.native.pdf import pipeline
def test_marginal_header_row_does_not_break_two_column_reading_order() -> None:
diff --git a/tests/unittest/test_flash_pdf_formulas.py b/tests/unittest/test_flash_pdf_formulas.py
index 777120b0..63c4b98b 100644
--- a/tests/unittest/test_flash_pdf_formulas.py
+++ b/tests/unittest/test_flash_pdf_formulas.py
@@ -5,11 +5,11 @@ from dataclasses import replace
import pytest
-from docgale.analyzers.native.pdf import formulas
-from docgale.analyzers.native.pdf import geometry
-from docgale.analyzers.native.pdf import line_merging
-from docgale.analyzers.native.pdf import models
-from docgale.document.pdf.document import PDFPathInfo
+from docvortex.analyzers.native.pdf import formulas
+from docvortex.analyzers.native.pdf import geometry
+from docvortex.analyzers.native.pdf import line_merging
+from docvortex.analyzers.native.pdf import models
+from docvortex.document.pdf.document import PDFPathInfo
from _flash_pdf_test_utils import (
diff --git a/tests/unittest/test_flash_pdf_graphics.py b/tests/unittest/test_flash_pdf_graphics.py
index 10ef1d70..3b86a22b 100644
--- a/tests/unittest/test_flash_pdf_graphics.py
+++ b/tests/unittest/test_flash_pdf_graphics.py
@@ -5,10 +5,10 @@ import inspect
import pytest
-from docgale.analyzers.native.pdf import graphics
-from docgale.analyzers.native.pdf import models
-from docgale.analyzers.native.pdf import pipeline
-from docgale.document.pdf.document import PDFPathInfo
+from docvortex.analyzers.native.pdf import graphics
+from docvortex.analyzers.native.pdf import models
+from docvortex.analyzers.native.pdf import pipeline
+from docvortex.document.pdf.document import PDFPathInfo
from _flash_pdf_test_utils import (
diff --git a/tests/unittest/test_flash_pdf_index_blocks.py b/tests/unittest/test_flash_pdf_index_blocks.py
index 8f8490bd..90ad9db8 100644
--- a/tests/unittest/test_flash_pdf_index_blocks.py
+++ b/tests/unittest/test_flash_pdf_index_blocks.py
@@ -2,7 +2,7 @@ from __future__ import annotations
import pytest
-from docgale.analyzers.native.pdf import index_blocks
+from docvortex.analyzers.native.pdf import index_blocks
from _flash_pdf_test_utils import _text_line
diff --git a/tests/unittest/test_flash_pdf_line_metadata.py b/tests/unittest/test_flash_pdf_line_metadata.py
index d9cacf08..0d12c892 100644
--- a/tests/unittest/test_flash_pdf_line_metadata.py
+++ b/tests/unittest/test_flash_pdf_line_metadata.py
@@ -2,9 +2,9 @@ from __future__ import annotations
import pytest
-from docgale.analyzers.native.pdf import line_layout
-from docgale.analyzers.native.pdf import pipeline
-from docgale.analyzers.native.pdf import text_blocks
+from docvortex.analyzers.native.pdf import line_layout
+from docvortex.analyzers.native.pdf import pipeline
+from docvortex.analyzers.native.pdf import text_blocks
from _flash_pdf_test_utils import _text_line
diff --git a/tests/unittest/test_flash_pdf_native_text.py b/tests/unittest/test_flash_pdf_native_text.py
index d7aed972..9c1cde4f 100644
--- a/tests/unittest/test_flash_pdf_native_text.py
+++ b/tests/unittest/test_flash_pdf_native_text.py
@@ -5,8 +5,8 @@ from typing import Any
import pytest
-from docgale.analyzers.native.pdf import models
-from docgale.analyzers.native.pdf import native_text
+from docvortex.analyzers.native.pdf import models
+from docvortex.analyzers.native.pdf import native_text
def _span(
diff --git a/tests/unittest/test_flash_pdf_pipeline.py b/tests/unittest/test_flash_pdf_pipeline.py
index 42892cf6..6dece5c1 100644
--- a/tests/unittest/test_flash_pdf_pipeline.py
+++ b/tests/unittest/test_flash_pdf_pipeline.py
@@ -6,25 +6,25 @@ import weakref
import pytest
-from docgale.analyzers.native import PdfModel
-from docgale.analyzers.native.pdf import auxiliary_text
-from docgale.analyzers.native.pdf import char_geometry
-from docgale.analyzers.native.pdf import formulas
-from docgale.analyzers.native.pdf import geometry
-from docgale.analyzers.native.pdf import graphics
-from docgale.analyzers.native.pdf import index_blocks
-from docgale.analyzers.native.pdf import line_layout
-from docgale.analyzers.native.pdf import line_merging
-from docgale.analyzers.native.pdf import models
-from docgale.analyzers.native.pdf import native_text
-from docgale.analyzers.native.pdf import pipeline
-from docgale.analyzers.native.pdf import tables
-from docgale.analyzers.native.pdf import text_blocks
-from docgale.analyzers.native.pdf import text_styles
-from docgale.analyzers.native.pdf import titles
-from docgale.analyzers.native.pdf import visual_annotations
-from docgale.document.pdf.document import PDFImageInfo
-from docgale.document.pdf.document import PDFPageTextGeometry
+from docvortex.analyzers.native import PdfModel
+from docvortex.analyzers.native.pdf import auxiliary_text
+from docvortex.analyzers.native.pdf import char_geometry
+from docvortex.analyzers.native.pdf import formulas
+from docvortex.analyzers.native.pdf import geometry
+from docvortex.analyzers.native.pdf import graphics
+from docvortex.analyzers.native.pdf import index_blocks
+from docvortex.analyzers.native.pdf import line_layout
+from docvortex.analyzers.native.pdf import line_merging
+from docvortex.analyzers.native.pdf import models
+from docvortex.analyzers.native.pdf import native_text
+from docvortex.analyzers.native.pdf import pipeline
+from docvortex.analyzers.native.pdf import tables
+from docvortex.analyzers.native.pdf import text_blocks
+from docvortex.analyzers.native.pdf import text_styles
+from docvortex.analyzers.native.pdf import titles
+from docvortex.analyzers.native.pdf import visual_annotations
+from docvortex.document.pdf.document import PDFImageInfo
+from docvortex.document.pdf.document import PDFPageTextGeometry
from _flash_pdf_test_utils import (
_prepared_text_page,
diff --git a/tests/unittest/test_flash_pdf_tables.py b/tests/unittest/test_flash_pdf_tables.py
index 091bf2a7..558cbe9c 100644
--- a/tests/unittest/test_flash_pdf_tables.py
+++ b/tests/unittest/test_flash_pdf_tables.py
@@ -4,10 +4,10 @@ from unittest.mock import MagicMock
import pytest
-from docgale.analyzers.native.pdf import geometry
-from docgale.analyzers.native.pdf import models
-from docgale.analyzers.native.pdf import tables
-from docgale.document.pdf.document import PDFPathInfo
+from docvortex.analyzers.native.pdf import geometry
+from docvortex.analyzers.native.pdf import models
+from docvortex.analyzers.native.pdf import tables
+from docvortex.document.pdf.document import PDFPathInfo
def _axis_line(
diff --git a/tests/unittest/test_flash_pdf_text_blocks.py b/tests/unittest/test_flash_pdf_text_blocks.py
index 5d21ea3e..343eb8ba 100644
--- a/tests/unittest/test_flash_pdf_text_blocks.py
+++ b/tests/unittest/test_flash_pdf_text_blocks.py
@@ -4,13 +4,13 @@ from dataclasses import replace
import pytest
-from docgale.analyzers.native.pdf import geometry
-from docgale.analyzers.native.pdf import line_layout
-from docgale.analyzers.native.pdf import line_merging
-from docgale.analyzers.native.pdf import models
-from docgale.analyzers.native.pdf import native_text
-from docgale.analyzers.native.pdf import pipeline
-from docgale.analyzers.native.pdf import text_blocks
+from docvortex.analyzers.native.pdf import geometry
+from docvortex.analyzers.native.pdf import line_layout
+from docvortex.analyzers.native.pdf import line_merging
+from docvortex.analyzers.native.pdf import models
+from docvortex.analyzers.native.pdf import native_text
+from docvortex.analyzers.native.pdf import pipeline
+from docvortex.analyzers.native.pdf import text_blocks
from _flash_pdf_test_utils import (
diff --git a/tests/unittest/test_flash_pdf_titles.py b/tests/unittest/test_flash_pdf_titles.py
index 9a84bae6..3391ed23 100644
--- a/tests/unittest/test_flash_pdf_titles.py
+++ b/tests/unittest/test_flash_pdf_titles.py
@@ -4,11 +4,11 @@ import inspect
import pytest
-from docgale.analyzers.native.pdf import line_layout
-from docgale.analyzers.native.pdf import line_merging
-from docgale.analyzers.native.pdf import models
-from docgale.analyzers.native.pdf import text_blocks
-from docgale.analyzers.native.pdf import titles
+from docvortex.analyzers.native.pdf import line_layout
+from docvortex.analyzers.native.pdf import line_merging
+from docvortex.analyzers.native.pdf import models
+from docvortex.analyzers.native.pdf import text_blocks
+from docvortex.analyzers.native.pdf import titles
from _flash_pdf_test_utils import (
diff --git a/tests/unittest/test_flash_pdf_visual_annotations.py b/tests/unittest/test_flash_pdf_visual_annotations.py
index 41d05b9f..69644549 100644
--- a/tests/unittest/test_flash_pdf_visual_annotations.py
+++ b/tests/unittest/test_flash_pdf_visual_annotations.py
@@ -2,10 +2,10 @@ from __future__ import annotations
import pytest
-from docgale.analyzers.native.pdf import geometry
-from docgale.analyzers.native.pdf import pipeline
-from docgale.analyzers.native.pdf import text_blocks
-from docgale.analyzers.native.pdf import visual_annotations
+from docvortex.analyzers.native.pdf import geometry
+from docvortex.analyzers.native.pdf import pipeline
+from docvortex.analyzers.native.pdf import text_blocks
+from docvortex.analyzers.native.pdf import visual_annotations
_PAGE_SIZE = (200.0, 200.0)
diff --git a/tests/unittest/test_flash_rtf.py b/tests/unittest/test_flash_rtf.py
index 9c6740bf..663a39ae 100644
--- a/tests/unittest/test_flash_rtf.py
+++ b/tests/unittest/test_flash_rtf.py
@@ -1,5 +1,5 @@
from __future__ import annotations
-from docgale.export.middle import export_middle_json
+from docvortex.export.middle import export_middle_json
import asyncio
from io import BytesIO
@@ -18,14 +18,14 @@ from mineru.doclib.core.db import DatabaseManager
from mineru.doclib.core.fts import FTSManager
from mineru.doclib.services.parse_svc import ParseService
from mineru.errors import InvalidRequestError
-from docgale.analyzers.native import RtfModel
-from docgale.analyzers.native.office.errors import LegacyOfficeMalformedError
-from docgale.analyzers.native.office.errors import LegacyOfficeResourceLimitError
-from docgale.analyzers.native.office.rtf import lexer as lexer_module
-from docgale.analyzers.native.office.rtf import parser as parser_module
-from docgale.analyzers.native.office.rtf.converter import extract_rtf_metadata
-from docgale.analyzers.native.office.rtf.lexer import RtfBinary
-from docgale.analyzers.native.office.rtf.lexer import RtfLexer
+from docvortex.analyzers.native import RtfModel
+from docvortex.analyzers.native.office.errors import LegacyOfficeMalformedError
+from docvortex.analyzers.native.office.errors import LegacyOfficeResourceLimitError
+from docvortex.analyzers.native.office.rtf import lexer as lexer_module
+from docvortex.analyzers.native.office.rtf import parser as parser_module
+from docvortex.analyzers.native.office.rtf.converter import extract_rtf_metadata
+from docvortex.analyzers.native.office.rtf.lexer import RtfBinary
+from docvortex.analyzers.native.office.rtf.lexer import RtfLexer
from mineru.parser import parse
from mineru.render import RenderMode, render_docx, render_html, render_markdown, render_structured_content
from mineru.types import BlockType
@@ -607,8 +607,8 @@ def test_rtf_runtime_has_no_anydoc_dependency() -> None:
script = "\n".join(
[
"import sys",
- "from docgale.analyzers.native import RtfModel",
- "assert 'docgale.analyzers.native.office.rtf.converter' not in sys.modules",
+ "from docvortex.analyzers.native import RtfModel",
+ "assert 'docvortex.analyzers.native.office.rtf.converter' not in sys.modules",
"pages = RtfModel().predict(__import__('io').BytesIO(b'{\\\\rtf1 ok}'))",
"assert pages == [[{'type': 'text', 'content': [{'type': 'text', 'content': 'ok'}]}]]",
"assert 'anydoc' not in sys.modules",
diff --git a/tests/unittest/test_flash_shared_helpers.py b/tests/unittest/test_flash_shared_helpers.py
index 6f515eea..2005190c 100644
--- a/tests/unittest/test_flash_shared_helpers.py
+++ b/tests/unittest/test_flash_shared_helpers.py
@@ -9,23 +9,23 @@ from PIL import Image
import pytest
from lxml import etree
-from docgale.analyzers.native._shared.hyperlink import OFFICE_EXTERNAL_HYPERLINK_SCHEMES
-from docgale.analyzers.native._shared.hyperlink import sanitize_hyperlink_target
-from docgale.analyzers.native._shared.image import image_to_b64str
-from docgale.analyzers.native._shared.image import image_to_bytes
-from docgale.analyzers.native._shared.mathml import mathml_to_latex
-from docgale.analyzers.native.office.doc import records as doc_records
-from docgale.analyzers.native.office.legacy.binary import bounded_slice
-from docgale.analyzers.native.office.legacy.binary import get_f64
-from docgale.analyzers.native.office.legacy.binary import get_i16
-from docgale.analyzers.native.office.legacy.binary import get_u16
-from docgale.analyzers.native.office.legacy.binary import get_u32
-from docgale.analyzers.native.office.opc import relationship_source_base_dir
-from docgale.analyzers.native.office.opc import write_zip_package
-from docgale.analyzers.native.office.ppt import records as ppt_records
-from docgale.analyzers.native.office.rich_text import OfficeRichTextSegment
-from docgale.analyzers.native.office.rich_text import build_rich_text_from_segments
-from docgale.analyzers.native.office.xls import records as xls_records
+from docvortex.analyzers.native._shared.hyperlink import OFFICE_EXTERNAL_HYPERLINK_SCHEMES
+from docvortex.analyzers.native._shared.hyperlink import sanitize_hyperlink_target
+from docvortex.analyzers.native._shared.image import image_to_b64str
+from docvortex.analyzers.native._shared.image import image_to_bytes
+from docvortex.analyzers.native._shared.mathml import mathml_to_latex
+from docvortex.analyzers.native.office.doc import records as doc_records
+from docvortex.analyzers.native.office.legacy.binary import bounded_slice
+from docvortex.analyzers.native.office.legacy.binary import get_f64
+from docvortex.analyzers.native.office.legacy.binary import get_i16
+from docvortex.analyzers.native.office.legacy.binary import get_u16
+from docvortex.analyzers.native.office.legacy.binary import get_u32
+from docvortex.analyzers.native.office.opc import relationship_source_base_dir
+from docvortex.analyzers.native.office.opc import write_zip_package
+from docvortex.analyzers.native.office.ppt import records as ppt_records
+from docvortex.analyzers.native.office.rich_text import OfficeRichTextSegment
+from docvortex.analyzers.native.office.rich_text import build_rich_text_from_segments
+from docvortex.analyzers.native.office.xls import records as xls_records
@pytest.mark.parametrize(
diff --git a/tests/unittest/test_flash_spreadsheet_projector.py b/tests/unittest/test_flash_spreadsheet_projector.py
index 19964ae4..0cd2ef3f 100644
--- a/tests/unittest/test_flash_spreadsheet_projector.py
+++ b/tests/unittest/test_flash_spreadsheet_projector.py
@@ -7,15 +7,15 @@ from openpyxl.cell.text import InlineFont
from openpyxl.worksheet.worksheet import Worksheet
import pytest
-from docgale.analyzers.native.office.spreadsheet.html import render_spreadsheet_table
-from docgale.analyzers.native.office.spreadsheet.models import AnchoredBlock
-from docgale.analyzers.native.office.spreadsheet.models import ExcelCell
-from docgale.analyzers.native.office.spreadsheet.models import ExcelTable
-from docgale.analyzers.native.office.spreadsheet.models import SheetImage
-from docgale.analyzers.native.office.spreadsheet.projector import SpreadsheetProjector
-from docgale.analyzers.native.office.xls.xls_converter import _XlsPageBuilder
-from docgale.analyzers.native.office.xlsx import xlsx_converter as xlsx_converter_module
-from docgale.analyzers.native.office.xlsx.xlsx_converter import XlsxConverter
+from docvortex.analyzers.native.office.spreadsheet.html import render_spreadsheet_table
+from docvortex.analyzers.native.office.spreadsheet.models import AnchoredBlock
+from docvortex.analyzers.native.office.spreadsheet.models import ExcelCell
+from docvortex.analyzers.native.office.spreadsheet.models import ExcelTable
+from docvortex.analyzers.native.office.spreadsheet.models import SheetImage
+from docvortex.analyzers.native.office.spreadsheet.projector import SpreadsheetProjector
+from docvortex.analyzers.native.office.xls.xls_converter import _XlsPageBuilder
+from docvortex.analyzers.native.office.xlsx import xlsx_converter as xlsx_converter_module
+from docvortex.analyzers.native.office.xlsx.xlsx_converter import XlsxConverter
from mineru.types import BlockType
from _span_test_utils import inline
diff --git a/tests/unittest/test_guess_suffix_ole2.py b/tests/unittest/test_guess_suffix_ole2.py
index 31f6a1d4..326b45b2 100644
--- a/tests/unittest/test_guess_suffix_ole2.py
+++ b/tests/unittest/test_guess_suffix_ole2.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.document.detection import (
+from docvortex.document.detection import (
_guess_ole2_suffix_by_bytes,
guess_suffix_by_bytes,
)
diff --git a/tests/unittest/test_html_render.py b/tests/unittest/test_html_render.py
index 3a8588e9..2f981c9b 100644
--- a/tests/unittest/test_html_render.py
+++ b/tests/unittest/test_html_render.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from _span_test_utils import inline as _inline
from copy import deepcopy
@@ -116,12 +116,12 @@ def test_public_contract_fragment_standalone_title_and_input_immutability() -> N
fragment = render_html(middle, standalone=False)
standalone = render_html(middle)
- assert fragment.startswith('<article class="docgale-document docgale-document--default" ')
- assert 'data-docgale-html-version="1" data-render-mode="default"' in fragment
+ assert fragment.startswith('<article class="docvortex-document docvortex-document--default" ')
+ assert 'data-docvortex-html-version="1" data-render-mode="default"' in fragment
assert fragment in standalone
assert '<html lang="und">' in standalone
assert "<title>Demo &lt;unsafe&gt;</title>" in standalone
- assert '<body class="docgale-html-body">' in standalone
+ assert '<body class="docvortex-html-body">' in standalone
assert "<style>" in standalone
assert "mathjax@" not in standalone
assert "prismjs@" not in standalone
@@ -157,14 +157,14 @@ def test_default_and_full_modes_preserve_their_page_contracts() -> None:
default = BeautifulSoup(render_html(middle, standalone=False), "html.parser")
full = BeautifulSoup(render_html(middle, mode=RenderMode.FULL, standalone=False), "html.parser")
- assert default.select_one(".docgale-text").get_text() == "international"
+ assert default.select_one(".docvortex-text").get_text() == "international"
assert default.select_one('[data-block-type="text"]')["data-page-idx"] == "0"
- assert not default.select(".docgale-page")
+ assert not default.select(".docvortex-page")
assert "HEADER" not in default.get_text()
- assert [section["data-page-idx"] for section in full.select(".docgale-page")] == ["0", "5", "9"]
- assert len(full.select(".docgale-page-break")) == 2
- assert [item.get_text() for item in full.select(".docgale-text")] == ["inter-", "national"]
+ assert [section["data-page-idx"] for section in full.select(".docvortex-page")] == ["0", "5", "9"]
+ assert len(full.select(".docvortex-page-break")) == 2
+ assert [item.get_text() for item in full.select(".docvortex-text")] == ["inter-", "national"]
assert "HEADER" in full.get_text() and "FOOTER" in full.get_text()
@@ -196,7 +196,7 @@ def test_default_and_full_html_link_to_visible_page_footnote_anchor() -> None:
assert default.select_one('a[href="#note-one"]') is not None
for output in (default, full):
- target = output.select_one("#note-one.docgale-page-footnote")
+ target = output.select_one("#note-one.docvortex-page-footnote")
assert target is not None
assert target["data-block-type"] == "page_footnote"
assert target.get_text() == "Footnote body."
@@ -216,17 +216,17 @@ def test_inline_html_escapes_plain_text_and_renders_styles_links_and_math() -> N
result = render_html(_middle(_page(0, TextBlock(type="text", index=0, content=content))))
soup = BeautifulSoup(result, "html.parser")
- paragraph = soup.select_one(".docgale-text")
+ paragraph = soup.select_one(".docvortex-text")
assert "p <0.05 <local_dir>" in paragraph.get_text()
assert paragraph.select_one("em strong u") is not None
- assert paragraph.select_one(".docgale-preserve-whitespace") is not None
+ assert paragraph.select_one(".docvortex-preserve-whitespace") is not None
assert paragraph.select_one('a[href="https://example.test/a%20b"]') is not None
assert "bad" in paragraph.get_text()
assert paragraph.select_one('a[href^="javascript:"]') is None
- assert paragraph.select_one(".docgale-math").get_text() == r"\(x < y & z\)"
+ assert paragraph.select_one(".docvortex-math").get_text() == r"\(x < y & z\)"
assert "[email protected]/tex-chtml.js" in result
assert "loader: {load: ['ui/safe']}" in result
- assert "ignoreHtmlClass: 'docgale-document'" in result
+ assert "ignoreHtmlClass: 'docvortex-document'" in result
assert "packages: {'[-]': ['require']}" in result
@@ -243,7 +243,7 @@ def test_plain_text_autolinks_mpe_style_urls_domains_and_email() -> None:
"html.parser",
)
- links = soup.select(".docgale-text a")
+ links = soup.select(".docvortex-text a")
assert [link["href"] for link in links] == [
"https://example.com/a_%28b%29",
"https://www.example.org/path?x=1",
@@ -262,7 +262,7 @@ def test_plain_text_autolinks_mpe_style_urls_domains_and_email() -> None:
"https://one.example/a",
"https://two.example/b",
]
- assert "docs。Email" in soup.select_one(".docgale-text").get_text()
+ assert "docs。Email" in soup.select_one(".docvortex-text").get_text()
@pytest.mark.parametrize(
@@ -313,7 +313,7 @@ def test_common_engineering_bare_domain_suffixes_linkify(tld: str) -> None:
"html.parser",
)
- link = soup.select_one(".docgale-text a")
+ link = soup.select_one(".docvortex-text a")
assert link["href"] == f"https://Project.Example.{tld}/docs?x=1#intro"
assert link.get_text() == content
@@ -341,8 +341,8 @@ def test_non_common_bare_domain_suffixes_remain_plain_text(content: str) -> None
"html.parser",
)
- assert soup.select_one(".docgale-text a") is None
- assert soup.select_one(".docgale-text").get_text() == content
+ assert soup.select_one(".docvortex-text a") is None
+ assert soup.select_one(".docvortex-text").get_text() == content
def test_strong_link_syntax_bypasses_bare_domain_suffix_allowlist() -> None:
@@ -353,7 +353,7 @@ def test_strong_link_syntax_bypasses_bare_domain_suffix_allowlist() -> None:
"html.parser",
)
- assert [link["href"] for link in soup.select(".docgale-text a")] == [
+ assert [link["href"] for link in soup.select(".docvortex-text a")] == [
"https://example.ch",
"https://www.example.ch",
@@ -406,10 +406,10 @@ def test_autolink_excludes_existing_links_code_math_algorithm_and_raw_html() ->
assert len(links) == 1
assert links[0]["href"] == "https://target.test"
assert links[0].get_text() == "example.com"
- assert soup.select_one(".docgale-math").get_text() == r"\(math.example.com\)"
- assert soup.select_one(".docgale-code").get_text() == "https://code.example.com"
- assert soup.select_one(".docgale-algorithm").get_text() == "visit algorithm.example.com"
- assert soup.select_one(".docgale-figure--chart p").get_text() == "raw.example.com"
+ assert soup.select_one(".docvortex-math").get_text() == r"\(math.example.com\)"
+ assert soup.select_one(".docvortex-code").get_text() == "https://code.example.com"
+ assert soup.select_one(".docvortex-algorithm").get_text() == "visit algorithm.example.com"
+ assert soup.select_one(".docvortex-figure--chart p").get_text() == "raw.example.com"
def test_formula_body_closing_delimiters_are_neutralized_before_mathjax_scanning() -> None:
@@ -427,8 +427,8 @@ def test_formula_body_closing_delimiters_are_neutralized_before_mathjax_scanning
)
soup = BeautifulSoup(render_html(middle, standalone=False), "html.parser")
- assert soup.select_one(".docgale-math--inline").get_text() == r"\(x\mathclose{)}y\)"
- assert soup.select_one(".docgale-math--block").get_text().replace("\n", "") == r"\[x\mathclose{]}y\]"
+ assert soup.select_one(".docvortex-math--inline").get_text() == r"\(x\mathclose{)}y\)"
+ assert soup.select_one(".docvortex-math--block").get_text().replace("\n", "") == r"\[x\mathclose{]}y\]"
def test_lists_cover_native_explicit_reference_nested_and_orphan_shapes() -> None:
@@ -472,21 +472,21 @@ def test_lists_cover_native_explicit_reference_nested_and_orphan_shapes() -> Non
assert ordered_html.find_all("li", recursive=False)[1]["value"] == "3"
assert ordered_html.get_text(" ", strip=True) == "first third"
assert soup.select_one('[data-block-index="1"] ol')["type"] == "a"
- assert [marker.get_text() for marker in soup.select('[data-block-index="2"] .docgale-list-marker')] == [
+ assert [marker.get_text() for marker in soup.select('[data-block-index="2"] .docvortex-list-marker')] == [
"(1)",
"[x]",
"",
]
assert "[1] first" in soup.select_one('[data-block-index="3"] li').get_text()
- parent_item = soup.select_one('[data-block-index="4"] > .docgale-list > li')
+ parent_item = soup.select_one('[data-block-index="4"] > .docvortex-list > li')
assert parent_item.find("ul", recursive=False) is not None
- assert soup.select_one('[data-block-index="5"] .docgale-list-item--orphan') is not None
- assert [marker.get_text() for marker in soup.select('[data-block-index="6"] .docgale-list-marker')] == [
+ assert soup.select_one('[data-block-index="5"] .docvortex-list-item--orphan') is not None
+ assert [marker.get_text() for marker in soup.select('[data-block-index="6"] .docvortex-list-marker')] == [
"1.",
"-",
"",
]
- assert soup.select_one('[data-block-index="7"] .docgale-list-item--markerless > ul') is not None
+ assert soup.select_one('[data-block-index="7"] .docvortex-list-item--markerless > ul') is not None
def test_index_uses_real_forward_anchor_and_omits_duplicate_ids() -> None:
@@ -508,10 +508,10 @@ def test_index_uses_real_forward_anchor_and_omits_duplicate_ids() -> None:
duplicate = ParagraphTitleBlock(type="paragraph_title", index=2, level=6, anchor="sec 1", content=_inline("Duplicate"))
soup = BeautifulSoup(render_html(_middle(_page(0, index, first, duplicate)), standalone=False), "html.parser")
- assert soup.select_one('.docgale-index a[href="#sec-1"]').get_text() == "Section"
- assert "3" not in soup.select_one(".docgale-index").get_text()
- assert soup.select_one(".docgale-index li ul") is not None
- assert soup.select_one(".docgale-index li ul a") is None
+ assert soup.select_one('.docvortex-index a[href="#sec-1"]').get_text() == "Section"
+ assert "3" not in soup.select_one(".docvortex-index").get_text()
+ assert soup.select_one(".docvortex-index li ul") is not None
+ assert soup.select_one(".docvortex-index li ul a") is None
assert len(soup.select('[id="sec-1"]')) == 1
assert soup.find("h6", attrs={"data-heading-level": "6"}).get_text() == "Duplicate"
@@ -541,7 +541,7 @@ def test_empty_title_does_not_create_a_broken_index_target_and_anchor_controls_a
"html.parser",
)
- links = soup.select(".docgale-index a")
+ links = soup.select(".docvortex-index a")
assert len(links) == 2
assert links[0]["href"] == "#bad%EF%BF%BDid"
assert links[1]["href"] == "#bad%EF%BF%BDid-2"
@@ -561,7 +561,7 @@ def test_empty_index_leaf_owns_its_following_nested_index() -> None:
],
)
soup = BeautifulSoup(render_html(_middle(_page(0, index)), standalone=False), "html.parser")
- top_items = soup.select(".docgale-index > ul > li")
+ top_items = soup.select(".docvortex-index > ul > li")
assert len(top_items) == 2
assert top_items[0].find("ul", recursive=False) is None
@@ -599,8 +599,8 @@ def test_visual_child_order_image_details_and_asset_precedence() -> None:
assert rendered.index("before") < rendered.index("images/a%20b.png") < rendered.index("after") < rendered.index("again")
assert soup.select_one("img")["src"] == "https://cdn.example/doc/images/a%20b.png"
assert "data:image" not in rendered
- assert soup.select_one("details .docgale-math") is not None
- assert len(soup.select(".docgale-caption")) == 2
+ assert soup.select_one("details .docvortex-math") is not None
+ assert len(soup.select(".docvortex-caption")) == 2
def test_mermaid_flowchart_uses_live_canvas_raster_fallback_and_safe_config() -> None:
@@ -611,14 +611,14 @@ def test_mermaid_flowchart_uses_live_canvas_raster_fallback_and_safe_config() ->
standalone = render_html(middle)
soup = BeautifulSoup(fragment, "html.parser")
- host = soup.select_one(".docgale-flowchart")
+ host = soup.select_one(".docvortex-flowchart")
assert host["data-mermaid-state"] == "pending"
- assert "docgale-flowchart--has-raster" in host["class"]
- assert host.select_one('.docgale-flowchart-canvas[role="img"]') is not None
- assert host.select_one(".docgale-flowchart-fallback")["src"].startswith("data:image/png")
+ assert "docvortex-flowchart--has-raster" in host["class"]
+ assert host.select_one('.docvortex-flowchart-canvas[role="img"]') is not None
+ assert host.select_one(".docvortex-flowchart-fallback")["src"].startswith("data:image/png")
details = host.find_next_sibling("details")
assert "open" not in details.attrs
- assert details.select_one(".docgale-flowchart-source code").get_text() == source_text
+ assert details.select_one(".docvortex-flowchart-source code").get_text() == source_text
assert soup.find("script") is None
assert "mermaid@" not in fragment
assert "[email protected]/dist/mermaid.min.js" in standalone
@@ -640,8 +640,8 @@ def test_mermaid_flowchart_without_raster_opens_source_fallback() -> None:
"html.parser",
)
- host = soup.select_one(".docgale-flowchart")
- assert "docgale-flowchart--has-raster" not in host.get("class", [])
+ host = soup.select_one(".docvortex-flowchart")
+ assert "docvortex-flowchart--has-raster" not in host.get("class", [])
assert host.select_one("img") is None
assert "open" in host.find_next_sibling("details").attrs
@@ -661,10 +661,10 @@ def test_invalid_or_out_of_scope_mermaid_keeps_existing_image_path(content: str)
rendered = render_html(_middle(_page(0, _flowchart(content))))
soup = BeautifulSoup(rendered, "html.parser")
- assert soup.select_one(".docgale-flowchart") is None
- assert soup.select_one(".docgale-image") is not None
- assert soup.select_one(".docgale-details") is not None
- assert soup.select_one(".docgale-details a") is None
+ assert soup.select_one(".docvortex-flowchart") is None
+ assert soup.select_one(".docvortex-image") is not None
+ assert soup.select_one(".docvortex-details") is not None
+ assert soup.select_one(".docvortex-details a") is None
assert "mermaid@" not in rendered
@@ -700,8 +700,8 @@ def test_table_keeps_safe_html_and_spatial_or_image_fallbacks() -> None:
cell = soup.select_one('[data-block-index="0"] td')
assert cell["rowspan"] == "2"
assert "onclick" not in cell.attrs and "border" not in soup.select_one("table").attrs
- assert cell.select_one(".docgale-math") is not None
- assert soup.select_one('[data-block-index="1"] .docgale-table-text').get_text() == "A < B\nC D"
+ assert cell.select_one(".docvortex-math") is not None
+ assert soup.select_one('[data-block-index="1"] .docvortex-table-text').get_text() == "A < B\nC D"
assert soup.select_one('[data-block-index="2"] img')["src"].startswith("data:image/png")
@@ -751,7 +751,7 @@ def test_discarded_invalid_table_math_does_not_load_mathjax() -> None:
)
rendered = render_html(_middle(_page(0, table)))
- assert BeautifulSoup(rendered, "html.parser").select_one("article .docgale-math") is None
+ assert BeautifulSoup(rendered, "html.parser").select_one("article .docvortex-math") is None
assert "mathjax@" not in rendered
assert "data:image/png" in rendered
@@ -808,23 +808,23 @@ def test_chart_gfm_details_code_prism_and_algorithm_html() -> None:
result = render_html(_middle(_page(0, chart, code, algorithm)))
soup = BeautifulSoup(result, "html.parser")
- assert soup.select_one("details .docgale-chart-table") is not None
- assert soup.select_one("th.docgale-align-left") is not None
- assert soup.select_one("th.docgale-align-right") is not None
+ assert soup.select_one("details .docvortex-chart-table") is not None
+ assert soup.select_one("th.docvortex-align-left") is not None
+ assert soup.select_one("th.docvortex-align-right") is not None
assert soup.select_one("pre.language-bash code.language-bash").get_text() == 'echo "<x>"\n'
assert "[email protected]/components/prism-core.min.js" in result
assert "[email protected]/plugins/autoloader/prism-autoloader.min.js" in result
assert "Prism.highlightAllUnder(root)" in result
assert "sha384-zLRFO4dw" in result and "sha384-Uq05+JLk" in result
- algorithm_html = soup.select_one(".docgale-algorithm")
+ algorithm_html = soup.select_one(".docvortex-algorithm")
assert "if a < b:" in algorithm_html.get_text()
assert algorithm_html.select_one("strong").get_text() == "bold"
assert algorithm_html.select_one("em").get_text() == "italic"
assert algorithm_html.select_one("s").get_text() == "strike"
assert algorithm_html.select_one("u").get_text() == "under"
- assert algorithm_html.select_one(".docgale-text-emphasis").get_text() == "dot"
+ assert algorithm_html.select_one(".docvortex-text-emphasis").get_text() == "dot"
assert algorithm_html.select_one("sub").get_text() == "q"
- assert len(algorithm_html.select(".docgale-math")) == 2
+ assert len(algorithm_html.select(".docvortex-math")) == 2
assert r"\(x\) \(y\)" in algorithm_html.get_text()
assert "<br" not in str(algorithm_html)
assert "if a &lt; b:\n " in str(algorithm_html)
@@ -857,7 +857,7 @@ def test_empty_code_and_literal_class_text_do_not_load_external_runtimes() -> No
middle = _middle(
_page(
0,
- TextBlock(type="text", index=0, content=_inline('class="docgale-math fake" class="language-python"')),
+ TextBlock(type="text", index=0, content=_inline('class="docvortex-math fake" class="language-python"')),
CodeBlock(
type="code",
index=1,
@@ -871,7 +871,7 @@ def test_empty_code_and_literal_class_text_do_not_load_external_runtimes() -> No
assert "mathjax@" not in rendered
assert "prismjs@" not in rendered
- assert '<pre class="docgale-code"><code></code></pre>' in rendered
+ assert '<pre class="docvortex-code"><code></code></pre>' in rendered
def test_crlf_and_cr_are_normalized_to_visible_line_breaks() -> None:
@@ -880,7 +880,7 @@ def test_crlf_and_cr_are_normalized_to_visible_line_breaks() -> None:
_middle(_page(0, TextBlock(type="text", index=0, content=_inline("one\r\ntwo\rthree")))),
standalone=False,
)
- paragraph = BeautifulSoup(rendered, "html.parser").select_one(".docgale-text")
+ paragraph = BeautifulSoup(rendered, "html.parser").select_one(".docvortex-text")
assert len(paragraph.find_all("br")) == 2
assert paragraph.get_text("|", strip=True) == "one|two|three"
@@ -932,8 +932,8 @@ def test_setext_heading_shape_is_not_misclassified_as_a_gfm_chart_table() -> Non
)
soup = BeautifulSoup(render_html(_middle(_page(0, chart)), standalone=False), "html.parser")
- assert soup.select_one(".docgale-chart-table") is None
- assert soup.select_one(".docgale-figure--chart").get_text(" ", strip=True) == "Title --- body"
+ assert soup.select_one(".docvortex-chart-table") is None
+ assert soup.select_one(".docvortex-figure--chart").get_text(" ", strip=True) == "Title --- body"
@pytest.mark.parametrize(
@@ -955,20 +955,20 @@ def test_chart_gfm_pipe_matches_markdown_it_backslash_decoding(slash_count: int,
)
soup = BeautifulSoup(render_html(_middle(_page(0, chart)), standalone=False), "html.parser")
- assert soup.select_one(".docgale-chart-table td").get_text() == expected
+ assert soup.select_one(".docvortex-chart-table td").get_text() == expected
def test_mineru_styles_are_minified_scoped_and_inlined_byte_exact() -> None:
"""验证独立样式产物体积、作用域及 standalone 的逐字内联契约。"""
- root = resources.files("docgale").joinpath("resources", "html")
- source = root.joinpath("docgale.css").read_text(encoding="utf-8")
- minified = root.joinpath("docgale.min.css").read_text(encoding="utf-8")
+ root = resources.files("docvortex").joinpath("resources", "html")
+ source = root.joinpath("docvortex.css").read_text(encoding="utf-8")
+ minified = root.joinpath("docvortex.min.css").read_text(encoding="utf-8")
standalone = render_html(_middle())
style = BeautifulSoup(standalone, "html.parser").style
assert len(minified.encode("utf-8")) <= 10 * 1024
assert "\n" not in minified and "/*" not in minified
- assert ".docgale-document" in source and ".docgale-html-body" in source
+ assert ".docvortex-document" in source and ".docvortex-html-body" in source
assert style is not None and style.string == minified
assert f"<style>{minified}</style>" in standalone
assert not root.joinpath("crossnote").is_dir()
@@ -980,8 +980,8 @@ def test_empty_document_and_equation_image_do_not_load_external_scripts() -> Non
image_equation = render_html(_middle(_page(0, EquationBlock(type="equation", index=0, content="", image_base64=_PNG_URI))))
assert (
- '<article class="docgale-document docgale-document--default" '
- 'data-docgale-html-version="1" data-render-mode="default">\n\n</article>'
+ '<article class="docvortex-document docvortex-document--default" '
+ 'data-docvortex-html-version="1" data-render-mode="default">\n\n</article>'
) in empty
assert "mathjax@" not in empty and "prismjs@" not in empty and "mermaid@" not in empty
assert "mathjax@" not in image_equation and "prismjs@" not in image_equation and "mermaid@" not in image_equation
diff --git a/tests/unittest/test_html_security.py b/tests/unittest/test_html_security.py
index 6e53eef7..31852429 100644
--- a/tests/unittest/test_html_security.py
+++ b/tests/unittest/test_html_security.py
@@ -6,11 +6,11 @@ from unittest.mock import Mock
import pytest
from bs4 import BeautifulSoup, Tag
-from docgale.render._internal.html.sanitizer import is_supported_html_markup
-from docgale.render._internal.html.sanitizer import sanitize_html_fragment
-from docgale.render._internal.html.sanitizer import sanitize_image_source
-from docgale.render._internal.html.sanitizer import sanitize_link_url
-from docgale.foundation import image_payload
+from docvortex.render._internal.html.sanitizer import is_supported_html_markup
+from docvortex.render._internal.html.sanitizer import sanitize_html_fragment
+from docvortex.render._internal.html.sanitizer import sanitize_image_source
+from docvortex.render._internal.html.sanitizer import sanitize_link_url
+from docvortex.foundation import image_payload
_SAFE_PNG_BASE64 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAusB9Wl2l9sAAAAASUVORK5CYII="
diff --git a/tests/unittest/test_kit_gradio.py b/tests/unittest/test_kit_gradio.py
index 032daf1e..1eb08a62 100644
--- a/tests/unittest/test_kit_gradio.py
+++ b/tests/unittest/test_kit_gradio.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
import asyncio
import io
diff --git a/tests/unittest/test_kit_gradio_page_range.py b/tests/unittest/test_kit_gradio_page_range.py
index e705c39b..ca12086d 100644
--- a/tests/unittest/test_kit_gradio_page_range.py
+++ b/tests/unittest/test_kit_gradio_page_range.py
@@ -21,7 +21,7 @@ from mineru.kit.gradio import app as gradio_app
from mineru.kit.gradio import page_range as ranges
from mineru.kit.gradio.client import V1ArtifactError, V1ServerCapabilities
from mineru.kit.main import app
-from docgale.document.pdf.pdfium import _pdfium_lock
+from docvortex.document.pdf.pdfium import _pdfium_lock
def _pdf(tmp_path: Path, page_count: int = 100, *, encrypted: bool = False) -> Path:
diff --git a/tests/unittest/test_latex_render.py b/tests/unittest/test_latex_render.py
index d49be914..53892ed0 100644
--- a/tests/unittest/test_latex_render.py
+++ b/tests/unittest/test_latex_render.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from _span_test_utils import inline as _inline
@@ -105,9 +105,9 @@ def test_latex_document_uses_tex_live_preamble_default_planner_and_escaping() ->
assert r"\documentclass[UTF8,fontset=fandol,11pt]{ctexart}" in rendered
assert "unicode-math" not in rendered and r"\setCJKmainfont" not in rendered
assert r"\hypersetup{pdftitle={Title \& Metadata}}" in rendered
- assert r"first\MinerULineBreak{}international 50\% \& x\_y \{\#\} \textbackslash{}path\par" in rendered
+ assert r"first\DocVortexLineBreak{}international 50\% \& x\_y \{\#\} \textbackslash{}path\par" in rendered
assert "HEADER" not in rendered
- assert "页面脚注" in rendered and r"\footnotesize\color{MinerUGray}" in rendered
+ assert "页面脚注" in rendered and r"\footnotesize\color{DocVortexGray}" in rendered
assert r"\write18" not in rendered and "minted" not in rendered and "shellesc" not in rendered.casefold()
assert rendered.endswith("\\end{document}\n")
assert rendered == render_latex(middle, document_title="Title & Metadata")
@@ -148,7 +148,7 @@ def test_latex_renders_inline_styles_formulas_links_and_safe_anchors() -> None:
assert r"\sout{ strike}" in rendered
assert r"\textsuperscript{2}" in rendered and r"\textsubscript{i}" in rendered
assert r"\texttt{a\_b\%\ \ c}" in rendered and r"\(x_1^2\)" in rendered
- assert r"\hypertarget{mineru-" in rendered and r"\hyperlink{mineru-" in rendered
+ assert r"\hypertarget{docvortex-" in rendered and r"\hyperlink{docvortex-" in rendered
assert r"\href{https://example.com/a\_b?q=1\&x=2}{external}" in rendered
assert "\\begin{equation*}\n\\frac{1}{1-x^2}\\tag{7}\n\\end{equation*}" in rendered
assert rendered.count(r"\begin{align}") == 1 and r"\begin{equation*}\begin{align}" not in rendered
@@ -190,7 +190,7 @@ def test_latex_renders_native_lists_and_linked_index() -> None:
assert r"\begin{description}[style=nextline,leftmargin=3em,nosep]" in rendered
assert r"\item[{[A]}] Alpha" in rendered and r"\item[{}] plain" in rendered
assert "Target 12" not in rendered
- assert r"\hyperlink{mineru-" in rendered and "{Target}" in rendered
+ assert r"\hyperlink{docvortex-" in rendered and "{Target}" in rendered
def test_latex_renders_visual_blocks_complex_tables_and_code_in_source_order() -> None:
@@ -235,7 +235,7 @@ def test_latex_renders_visual_blocks_complex_tables_and_code_in_source_order() -
sub_type="code",
guess_lang="python",
content=[
- CodeBodyBlock(type="code_body", index=3, content="print('x_y%')\n\\end{MinerUVerbatim1}"),
+ CodeBodyBlock(type="code_body", index=3, content="print('x_y%')\n\\end{DocVortexVerbatim1}"),
CodeAnnotationBlock(type="code_caption", content=_inline("Code caption")),
],
)
@@ -264,7 +264,7 @@ def test_latex_renders_visual_blocks_complex_tables_and_code_in_source_order() -
assert r"\begin{tabular}" in rendered and "Nested" in rendered and r"\(x^2\)" in rendered
assert r"\detokenize{document assets/images/chart.png}" in rendered and "Data" in rendered
assert "Table caption" in rendered and "Chart note" in rendered
- assert r"\DefineVerbatimEnvironment{MinerUVerbatim2}" in rendered
+ assert r"\DefineVerbatimEnvironment{DocVortexVerbatim2}" in rendered
assert "print('x_y%')" in rendered and "Code caption" in rendered
assert r"{\small\ttfamily Step \(x^2\)\par}" in rendered
diff --git a/tests/unittest/test_legacy_schema_adapter.py b/tests/unittest/test_legacy_schema_adapter.py
index 71efe997..47b57797 100644
--- a/tests/unittest/test_legacy_schema_adapter.py
+++ b/tests/unittest/test_legacy_schema_adapter.py
@@ -1,11 +1,11 @@
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from copy import deepcopy
import pytest
-from docgale.compat.legacy_schema_adapter import legacy_page_to_model_list
-from docgale.postprocess.pages import model_json_to_pages
+from docvortex.compat.legacy_schema_adapter import legacy_page_to_model_list
+from docvortex.postprocess.pages import model_json_to_pages
from mineru.doclib.background.compaction import _normalize_batch_pages
from mineru.types import BlockType, ModelJson
diff --git a/tests/unittest/test_llm_aided_postprocess.py b/tests/unittest/test_llm_aided_postprocess.py
index ddc33970..4ddca4ad 100644
--- a/tests/unittest/test_llm_aided_postprocess.py
+++ b/tests/unittest/test_llm_aided_postprocess.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from _span_test_utils import inline as _inline, inline_text
import asyncio
@@ -17,7 +17,7 @@ from mineru.backend.postprocess.llm_aided import apply_llm_aided_postprocess
from mineru.backend.postprocess.table_merge.llm_cell_merge import apply_llm_cross_page_cell_merge
from mineru.backend.postprocess.title_leveling import apply_llm_title_leveling
from mineru.config import LLMAidedConfig, LLMAidedFeaturesConfig
-from docgale.render._internal.common.planner import build_render_plan
+from docvortex.render._internal.common.planner import build_render_plan
from mineru.render.contracts import RenderMode
from mineru.types import (
BlockType,
diff --git a/tests/unittest/test_markdown_render.py b/tests/unittest/test_markdown_render.py
index 91b69ddb..250ccbad 100644
--- a/tests/unittest/test_markdown_render.py
+++ b/tests/unittest/test_markdown_render.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from _span_test_utils import inline as _inline
from copy import deepcopy
@@ -138,7 +138,7 @@ def test_render_modes_filter_merge_and_preserve_input() -> None:
default = render_markdown(middle)
full = render_markdown(middle, mode=RenderMode.FULL)
- note = '<small><span class="docgale-page-footnote" data-block-type="page_footnote" style="color:#6b7280">NOTE</span></small>'
+ note = '<small><span class="docvortex-page-footnote" data-block-type="page_footnote" style="color:#6b7280">NOTE</span></small>'
assert default == f"Hello world again\n\n![](images/a.png)\n\n{note}"
assert full == "\n\n---\n\n".join(
[
@@ -173,7 +173,7 @@ def test_page_footnote_is_styled_and_linkable_in_default_and_full_modes() -> Non
)
expected = (
- 'See [\\[1\\]](#note-one).\n\n<small><span id="note-one" class="docgale-page-footnote" '
+ 'See [\\[1\\]](#note-one).\n\n<small><span id="note-one" class="docvortex-page-footnote" '
'data-block-type="page_footnote" style="color:#6b7280">Footnote body.</span></small>'
)
assert render_markdown(middle) == expected
@@ -193,7 +193,7 @@ def test_page_footnote_does_not_interrupt_continued_text_rendering() -> None:
)
assert render_markdown(middle) == (
- 'international\n\n<small><span class="docgale-page-footnote" '
+ 'international\n\n<small><span class="docvortex-page-footnote" '
'data-block-type="page_footnote" style="color:#6b7280">NOTE</span></small>'
)
@@ -244,7 +244,7 @@ def test_ref_text_continuation_skips_merge_transparent_blocks_by_mode() -> None:
)
original = deepcopy(middle)
- note = '<small><span class="docgale-page-footnote" data-block-type="page_footnote" style="color:#6b7280">NOTE</span></small>'
+ note = '<small><span class="docvortex-page-footnote" data-block-type="page_footnote" style="color:#6b7280">NOTE</span></small>'
assert render_markdown(middle) == f"international continuation\n\n{note}"
assert render_markdown(middle, mode=RenderMode.FULL) == (f"inter-\n\n{note}\n\n---\n\nHEADER\n\nnational continuation")
assert middle == original
@@ -327,7 +327,7 @@ def test_ref_list_continuation_skips_merge_transparent_blocks_without_mutating_i
)
original = deepcopy(middle)
- note = '<small><span class="docgale-page-footnote" data-block-type="page_footnote" style="color:#6b7280">NOTE</span></small>'
+ note = '<small><span class="docvortex-page-footnote" data-block-type="page_footnote" style="color:#6b7280">NOTE</span></small>'
assert render_markdown(middle) == f"[1] first\n[2] second\n\n{note}"
assert render_markdown(middle, mode=RenderMode.FULL) == (f"[1] first\n\n{note}\n\n---\n\nHEADER\n\n2\n\n[2] second")
assert middle == original
@@ -349,7 +349,7 @@ def test_ordinary_list_continuation_does_not_skip_page_footnote() -> None:
)
assert render_markdown(middle) == (
- '- first\n\n<small><span class="docgale-page-footnote" data-block-type="page_footnote" '
+ '- first\n\n<small><span class="docvortex-page-footnote" data-block-type="page_footnote" '
'style="color:#6b7280">NOTE</span></small>\n\n- second'
)
@@ -811,7 +811,7 @@ def test_algorithm_preserves_whitespace_comparisons_scripts_and_formula() -> Non
rendered = render_markdown(_middle(_page(0, algorithm)))
- assert 'class="docgale-algorithm"' in rendered
+ assert 'class="docvortex-algorithm"' in rendered
assert (
"if a &lt; b and c * d:\n <strong>bold</strong> / <em>italic</em> / <s>strike</s> / "
'<u>under</u> / <span style="text-emphasis: dot; text-emphasis-position: under;">dot</span> '
diff --git a/tests/unittest/test_middle_json_block_models.py b/tests/unittest/test_middle_json_block_models.py
index 600d0c58..7cba1cdc 100644
--- a/tests/unittest/test_middle_json_block_models.py
+++ b/tests/unittest/test_middle_json_block_models.py
@@ -1,8 +1,8 @@
from __future__ import annotations
import json
-from docgale.codecs.json import load_middle
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.codecs.json import load_middle
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from _span_test_utils import inline as _inline
from copy import deepcopy
@@ -12,9 +12,9 @@ import pytest
from pydantic import ValidationError
import mineru.types as types_module
-from docgale.postprocess.pages import model_json_to_pages
-from docgale.content.inline import inline_plain_text
-from docgale.content.inline import normalize_inline_spans
+from docvortex.postprocess.pages import model_json_to_pages
+from docvortex.content.inline import inline_plain_text
+from docvortex.content.inline import normalize_inline_spans
from mineru.types import (
BLOCK_ADAPTER,
BLOCK_TYPES,
diff --git a/tests/unittest/test_middle_json_export.py b/tests/unittest/test_middle_json_export.py
index 2739b1e3..6cabd61e 100644
--- a/tests/unittest/test_middle_json_export.py
+++ b/tests/unittest/test_middle_json_export.py
@@ -1,9 +1,9 @@
from __future__ import annotations
import json
-from docgale.codecs.json import load_middle
-from docgale.export.middle import export_middle_json
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.codecs.json import load_middle
+from docvortex.export.middle import export_middle_json
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
import base64
import os
@@ -264,14 +264,14 @@ def test_export_restores_existing_files_after_commit_failure(
raise OSError("simulated commit failure")
original_replace(source, target)
- monkeypatch.setattr("docgale.export.middle.os.replace", fail_second_replace)
+ monkeypatch.setattr("docvortex.export.middle.os.replace", fail_second_replace)
with pytest.raises(OSError, match="simulated commit failure"):
export_middle_json(middle_json, tmp_path, overwrite=True)
assert image_path.read_bytes() == b"old-image"
assert json_path.read_bytes() == b"old-json"
- assert not list(tmp_path.rglob(".docgale-export-*"))
+ assert not list(tmp_path.rglob(".docvortex-export-*"))
@pytest.mark.parametrize("json_name", ["../middle.json", "/tmp/middle.json", "..\\middle.json"])
diff --git a/tests/unittest/test_model_json.py b/tests/unittest/test_model_json.py
index 2670ec25..46cd1f0d 100644
--- a/tests/unittest/test_model_json.py
+++ b/tests/unittest/test_model_json.py
@@ -1,9 +1,9 @@
from __future__ import annotations
import json
-from docgale.codecs.json import load_middle, load_model
-from docgale.schema import Producer
-from docgale.compat.mineru import from_mineru_model, from_mineru_middle, to_mineru_model, to_mineru_middle
-from mineru.integrations.docgale import build_metadata
+from docvortex.codecs.json import load_middle, load_model
+from docvortex.schema import Producer
+from docvortex.compat.mineru import from_mineru_model, from_mineru_middle, to_mineru_model, to_mineru_middle
+from mineru.integrations.docvortex import build_metadata
import pytest
from pydantic import ValidationError
diff --git a/tests/unittest/test_native_pdf_table.py b/tests/unittest/test_native_pdf_table.py
index d8dcedff..04dcd0fe 100644
--- a/tests/unittest/test_native_pdf_table.py
+++ b/tests/unittest/test_native_pdf_table.py
@@ -9,26 +9,26 @@ from io import BytesIO
import pytest
from reportlab.pdfgen.canvas import Canvas
-from docgale.analyzers.native.pdf.table_recovery import NativeTableCell
-from docgale.analyzers.native.pdf.table_recovery import NativeTableInput
-from docgale.analyzers.native.pdf.table_recovery import NativeTableRectangle
-from docgale.analyzers.native.pdf.table_recovery import NativeTableRule
-from docgale.analyzers.native.pdf.table_recovery import coerce_native_table_rectangles
-from docgale.analyzers.native.pdf.table_recovery import coerce_native_table_rules
-from docgale.analyzers.native.pdf.table_recovery import recover_native_pdf_table
-from docgale.analyzers.native.pdf.table_recovery.candidate import GridCellSpec
-from docgale.analyzers.native.pdf.table_recovery.candidate import build_candidate
-from docgale.analyzers.native.pdf.table_recovery.contracts import NativeTableCandidate
-from docgale.analyzers.native.pdf.table_recovery.contracts import NativeTableGlyph
-from docgale.analyzers.native.pdf.table_recovery.engine import _remove_undercounted_vector_candidates
-from docgale.analyzers.native.pdf.table_recovery.engine import _select_candidate
-from docgale.analyzers.native.pdf.table_recovery.engine import diagnose_native_pdf_table
-from docgale.analyzers.native.pdf.table_recovery.text import build_cell_text
-from docgale.analyzers.native.pdf.table_recovery.text import build_cell_text_parts
-from docgale.analyzers.native.pdf.table_recovery.text import build_native_table_text
-from docgale.analyzers.native.pdf.table_recovery.vector import MAX_PRIMITIVES_PER_TABLE
-from docgale.analyzers.native.pdf.table_recovery.vector import build_vector_candidates
-from docgale.document.pdf.document import PDFDocument
+from docvortex.analyzers.native.pdf.table_recovery import NativeTableCell
+from docvortex.analyzers.native.pdf.table_recovery import NativeTableInput
+from docvortex.analyzers.native.pdf.table_recovery import NativeTableRectangle
+from docvortex.analyzers.native.pdf.table_recovery import NativeTableRule
+from docvortex.analyzers.native.pdf.table_recovery import coerce_native_table_rectangles
+from docvortex.analyzers.native.pdf.table_recovery import coerce_native_table_rules
+from docvortex.analyzers.native.pdf.table_recovery import recover_native_pdf_table
+from docvortex.analyzers.native.pdf.table_recovery.candidate import GridCellSpec
+from docvortex.analyzers.native.pdf.table_recovery.candidate import build_candidate
+from docvortex.analyzers.native.pdf.table_recovery.contracts import NativeTableCandidate
+from docvortex.analyzers.native.pdf.table_recovery.contracts import NativeTableGlyph
+from docvortex.analyzers.native.pdf.table_recovery.engine import _remove_undercounted_vector_candidates
+from docvortex.analyzers.native.pdf.table_recovery.engine import _select_candidate
+from docvortex.analyzers.native.pdf.table_recovery.engine import diagnose_native_pdf_table
+from docvortex.analyzers.native.pdf.table_recovery.text import build_cell_text
+from docvortex.analyzers.native.pdf.table_recovery.text import build_cell_text_parts
+from docvortex.analyzers.native.pdf.table_recovery.text import build_native_table_text
+from docvortex.analyzers.native.pdf.table_recovery.vector import MAX_PRIMITIVES_PER_TABLE
+from docvortex.analyzers.native.pdf.table_recovery.vector import build_vector_candidates
+from docvortex.document.pdf.document import PDFDocument
def _char_items(
diff --git a/tests/unittest/test_native_pdf_table_pipeline.py b/tests/unittest/test_native_pdf_table_pipeline.py
index 4ed4b6f5..ea304025 100644
--- a/tests/unittest/test_native_pdf_table_pipeline.py
+++ b/tests/unittest/test_native_pdf_table_pipeline.py
@@ -16,10 +16,10 @@ from mineru.backend.analysis.pdf import formulas as pdf_formulas
from mineru.backend.analysis.pdf import layout as pdf_layout
from mineru.backend.analysis.pdf import tables as pdf_tables
from mineru.backend.analysis.pdf import window as pdf_window
-from docgale.analyzers.native.pdf import models as flash_models
-from docgale.analyzers.native.pdf import tables as flash_tables
-from docgale.document.pdf.document import PDFDocument
-from docgale.document.pdf.document import PDFPageTextGeometry
+from docvortex.analyzers.native.pdf import models as flash_models
+from docvortex.analyzers.native.pdf import tables as flash_tables
+from docvortex.document.pdf.document import PDFDocument
+from docvortex.document.pdf.document import PDFPageTextGeometry
from mineru.types import RAW_FORMULA_NUMBER, BlockType
@@ -322,7 +322,7 @@ def test_hybrid_native_table_priority_accepts_real_rotated_table(
) -> None:
"""验证真实 270 度表格在 Medium/High 中都能直接生成原生 HTML。"""
- # 仅保留此宿主集成用例需要的真值,完整表格清单归 DocGale 维护。
+ # 仅保留此宿主集成用例需要的真值,完整表格清单归 DocVortex 维护。
target = {"page_index": 4, "bbox": [0.117, 0.125, 0.431, 0.891], "angle": 270, "rows": 11}
pdf_path = _PROJECT_ROOT / "demo/pdfs/demo1.pdf"
with PDFDocument(pdf_path.read_bytes()) as document:
diff --git a/tests/unittest/test_parse_result_contract.py b/tests/unittest/test_parse_result_contract.py
index 7a786691..fa0c5b07 100644
--- a/tests/unittest/test_parse_result_contract.py
+++ b/tests/unittest/test_parse_result_contract.py
@@ -1,5 +1,5 @@
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from _span_test_utils import inline as _inline
from dataclasses import fields
import json
diff --git a/tests/unittest/test_parser_api_contract.py b/tests/unittest/test_parser_api_contract.py
index a782abdf..cb5e05f9 100644
--- a/tests/unittest/test_parser_api_contract.py
+++ b/tests/unittest/test_parser_api_contract.py
@@ -1,5 +1,5 @@
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
import asyncio
import base64
import importlib
diff --git a/tests/unittest/test_parser_api_status.py b/tests/unittest/test_parser_api_status.py
index 8d16d71c..e79b3ae1 100644
--- a/tests/unittest/test_parser_api_status.py
+++ b/tests/unittest/test_parser_api_status.py
@@ -1,7 +1,7 @@
"""同步和异步 V1 parser 的状态观察回调合同。"""
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
import asyncio
from pathlib import Path
diff --git a/tests/unittest/test_pdf_analyze_block_content.py b/tests/unittest/test_pdf_analyze_block_content.py
index e71f44b0..ac206633 100644
--- a/tests/unittest/test_pdf_analyze_block_content.py
+++ b/tests/unittest/test_pdf_analyze_block_content.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from unittest.mock import MagicMock
@@ -15,14 +15,14 @@ from mineru.backend.analysis.pdf import constants, layout, normalization, ocr, p
from mineru.backend.analysis.pdf.text import content as text_content
from mineru.backend.analysis.pdf.text.models import _AnalyzeLine, _AnalyzeSpan
from mineru.backend.postprocess import document as postprocess_document
-from docgale.document.pdf.document import PDFPageTextGeometry
+from docvortex.document.pdf.document import PDFPageTextGeometry
from mineru.types import RAW_ALGORITHM, RAW_CAPTION, RAW_FOOTNOTE
from mineru.backend.analysis.pdf.text.native import (
POST_OCR_FALLBACK_CONTENT_KEY,
POST_OCR_FALLBACK_SCORE_KEY,
)
-from docgale.analyzers.native.pdf.text_styles import PDF_NATIVE_SCRIPT_MARKUP_KEY
-from docgale.analyzers.native.pdf.text_styles import materialize_pdf_inline_spans
+from docvortex.analyzers.native.pdf.text_styles import PDF_NATIVE_SCRIPT_MARKUP_KEY
+from docvortex.analyzers.native.pdf.text_styles import materialize_pdf_inline_spans
from mineru.types import BlockType, ContentType, MiddleJson, ModelJson
from _span_test_utils import inline, inline_text
diff --git a/tests/unittest/test_pdf_analyze_visual_blocks.py b/tests/unittest/test_pdf_analyze_visual_blocks.py
index 1aff4156..fcc2fca8 100644
--- a/tests/unittest/test_pdf_analyze_visual_blocks.py
+++ b/tests/unittest/test_pdf_analyze_visual_blocks.py
@@ -1,6 +1,6 @@
from __future__ import annotations
import json
-from docgale.codecs.json import load_middle, load_model
+from docvortex.codecs.json import load_middle, load_model
import asyncio
import base64
@@ -22,7 +22,7 @@ from mineru.backend.analysis.pdf import formulas
from mineru.backend.analysis.pdf import normalization
from mineru.backend.analysis.pdf import pipeline
from mineru.backend.analysis.pdf import tables
-from docgale.document.pdf import visuals
+from docvortex.document.pdf import visuals
from mineru.backend.analysis.pdf import window
from mineru.types import RAW_ALGORITHM, RAW_CAPTION, RAW_FOOTNOTE, RAW_FORMULA_NUMBER, RAW_PHONETIC
from mineru.types import FILE_SUFFIXES, BlockType, FileSuffix, MiddleJson, ModelJson
@@ -1669,7 +1669,7 @@ def test_doc_analyze_flash_demo1_uses_canonical_equation_type() -> None:
def test_doc_analyze_flash_returns_complete_model_json_and_typed_middle_json(monkeypatch: pytest.MonkeyPatch) -> None:
"""验证 Flash 多窗口补充完整 raw pages,并返回严格 ModelJson 与 MiddleJson。"""
- from docgale.analyzers import native as flash_model
+ from docvortex.analyzers import native as flash_model
events: list[str] = []
source_model_list = [
@@ -1811,7 +1811,7 @@ def test_doc_analyze_flash_returns_complete_model_json_and_typed_middle_json(mon
def test_pdf_output_delegates_text_cleanup_after_span_and_metadata_processing(monkeypatch: pytest.MonkeyPatch) -> None:
- """宿主只负责协议清理和 Span 构造,可见英数统一交给 DocGale。"""
+ """宿主只负责协议清理和 Span 构造,可见英数统一交给 DocVortex。"""
original = normalization.normalize_pdf_model_text
calls = []
diff --git a/tests/unittest/test_pdf_native_script_detection.py b/tests/unittest/test_pdf_native_script_detection.py
index 40c30ff2..357e80f3 100644
--- a/tests/unittest/test_pdf_native_script_detection.py
+++ b/tests/unittest/test_pdf_native_script_detection.py
@@ -7,14 +7,14 @@ from dataclasses import dataclass
from pathlib import Path
import pytest
-from docgale.document.pdf.text.contracts import Bbox
-from docgale.document.pdf.text.contracts import Char
+from docvortex.document.pdf.text.contracts import Bbox
+from docvortex.document.pdf.text.contracts import Char
from mineru.backend.analysis.pdf.text import native
from mineru.backend.analysis.pdf.text.models import _AnalyzeSpan
-from docgale.document.pdf.document import PDFDocument
-from docgale.document.pdf.document import get_lines_from_chars
-from docgale.analyzers.native.pdf.text_styles import PDF_NATIVE_SCRIPT_MARKUP_KEY
+from docvortex.document.pdf.document import PDFDocument
+from docvortex.document.pdf.document import get_lines_from_chars
+from docvortex.analyzers.native.pdf.text_styles import PDF_NATIVE_SCRIPT_MARKUP_KEY
from mineru.types import BBox, ContentType
diff --git a/tests/unittest/test_pdf_render.py b/tests/unittest/test_pdf_render.py
index 0db343d5..a060a9de 100644
--- a/tests/unittest/test_pdf_render.py
+++ b/tests/unittest/test_pdf_render.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from concurrent.futures import ThreadPoolExecutor
from copy import deepcopy
@@ -17,12 +17,12 @@ import ziamath
from _span_test_utils import inline as _inline
from mineru.render import render_pdf
-from docgale.render._internal.pdf import assets as pdf_assets
-from docgale.render._internal.pdf import formula as formula_module
-from docgale.render._internal.pdf.formula import FormulaRenderer
-from docgale.render._internal.pdf.formula import FormulaVector
-from docgale.render._internal.pdf.formula import PdfFormulaError
-from docgale.render._internal.pdf.table import _html_cell_spans
+from docvortex.render._internal.pdf import assets as pdf_assets
+from docvortex.render._internal.pdf import formula as formula_module
+from docvortex.render._internal.pdf.formula import FormulaRenderer
+from docvortex.render._internal.pdf.formula import FormulaVector
+from docvortex.render._internal.pdf.formula import PdfFormulaError
+from docvortex.render._internal.pdf.table import _html_cell_spans
from mineru.types import (
AlgorithmBodyBlock,
ChartAnnotationBlock,
diff --git a/tests/unittest/test_pdf_render_diagnostics.py b/tests/unittest/test_pdf_render_diagnostics.py
index 97312cde..3f3054fc 100644
--- a/tests/unittest/test_pdf_render_diagnostics.py
+++ b/tests/unittest/test_pdf_render_diagnostics.py
@@ -6,7 +6,7 @@ from typing import Any, cast
import pytest
from loguru import logger
-from docgale.document.pdf import images as pdf_image_tools
+from docvortex.document.pdf import images as pdf_image_tools
class _FakeProcess:
@@ -82,7 +82,7 @@ def test_pdf_render_parent_exit_watcher_is_daemon(monkeypatch: pytest.MonkeyPatc
assert events == [
(
pdf_image_tools._exit_pdf_render_worker_when_parent_exits,
- "docgale-pdf-render-parent-exit-watcher",
+ "docvortex-pdf-render-parent-exit-watcher",
True,
),
"start",
diff --git a/tests/unittest/test_pdf_text_styles.py b/tests/unittest/test_pdf_text_styles.py
index c27e0b5f..2cac3c3b 100644
--- a/tests/unittest/test_pdf_text_styles.py
+++ b/tests/unittest/test_pdf_text_styles.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
import html
import math
@@ -17,12 +17,12 @@ from mineru.backend.analysis.pdf.text import content as text_content
from mineru.backend.analysis.pdf.text import styles as text_style_enrichment
from mineru.backend.analysis.pdf.text.models import _AnalyzeLine, _AnalyzeSpan
from mineru.backend.analysis.pdf.text.native import txt_spans_extract
-from docgale.postprocess.pages import model_json_to_pages
-from docgale.analyzers.native import PdfModel
-from docgale.analyzers.native.pdf.inline import matching as inline_matching
-from docgale.analyzers.native.pdf import models
-from docgale.analyzers.native.pdf import native_text
-from docgale.analyzers.native.pdf import text_styles as flash_text_styles
+from docvortex.postprocess.pages import model_json_to_pages
+from docvortex.analyzers.native import PdfModel
+from docvortex.analyzers.native.pdf.inline import matching as inline_matching
+from docvortex.analyzers.native.pdf import models
+from docvortex.analyzers.native.pdf import native_text
+from docvortex.analyzers.native.pdf import text_styles as flash_text_styles
from mineru.render import render_docx, render_html, render_markdown
from mineru.types import (
RAW_CAPTION,
@@ -32,25 +32,25 @@ from mineru.types import (
MiddleJson,
ModelJson,
)
-from docgale.document.pdf.document import PDFDocument
-from docgale.document.pdf.document import PDFLinkAnnotation
-from docgale.document.pdf.document import PDFPageTextGeometry
-from docgale.analyzers.native.pdf.text_styles import PDF_FONT_FORCE_BOLD_FLAG
-from docgale.analyzers.native.pdf.text_styles import PDF_FONT_ITALIC_FLAG
-from docgale.analyzers.native.pdf.text_styles import PDF_NATIVE_SCRIPT_MARKUP_KEY
-from docgale.analyzers.native.pdf.text_styles import PDFTextLinkLine
-from docgale.analyzers.native.pdf.text_styles import PDFTextLinkRange
-from docgale.analyzers.native.pdf.text_styles import PDFTextScriptLine
-from docgale.analyzers.native.pdf.text_styles import PDFTextScriptRange
-from docgale.analyzers.native.pdf.text_styles import PDFTextStyleLine
-from docgale.analyzers.native.pdf.text_styles import PDFTextStyleRange
-from docgale.analyzers.native.pdf.text_styles import apply_pdf_text_links as _apply_pdf_text_links
-from docgale.analyzers.native.pdf.text_styles import apply_pdf_text_styles as _apply_pdf_text_styles
-from docgale.analyzers.native.pdf.text_styles import detect_pdf_text_link_lines
-from docgale.analyzers.native.pdf.text_styles import detect_pdf_text_style_lines
-from docgale.analyzers.native.pdf.text_styles import materialize_pdf_inline_spans
-from docgale.analyzers.native.pdf.text_styles import _partition_resplit_text_evidence
-from docgale.analyzers.native.pdf.text_styles import _realign_repaired_text_evidence
+from docvortex.document.pdf.document import PDFDocument
+from docvortex.document.pdf.document import PDFLinkAnnotation
+from docvortex.document.pdf.document import PDFPageTextGeometry
+from docvortex.analyzers.native.pdf.text_styles import PDF_FONT_FORCE_BOLD_FLAG
+from docvortex.analyzers.native.pdf.text_styles import PDF_FONT_ITALIC_FLAG
+from docvortex.analyzers.native.pdf.text_styles import PDF_NATIVE_SCRIPT_MARKUP_KEY
+from docvortex.analyzers.native.pdf.text_styles import PDFTextLinkLine
+from docvortex.analyzers.native.pdf.text_styles import PDFTextLinkRange
+from docvortex.analyzers.native.pdf.text_styles import PDFTextScriptLine
+from docvortex.analyzers.native.pdf.text_styles import PDFTextScriptRange
+from docvortex.analyzers.native.pdf.text_styles import PDFTextStyleLine
+from docvortex.analyzers.native.pdf.text_styles import PDFTextStyleRange
+from docvortex.analyzers.native.pdf.text_styles import apply_pdf_text_links as _apply_pdf_text_links
+from docvortex.analyzers.native.pdf.text_styles import apply_pdf_text_styles as _apply_pdf_text_styles
+from docvortex.analyzers.native.pdf.text_styles import detect_pdf_text_link_lines
+from docvortex.analyzers.native.pdf.text_styles import detect_pdf_text_style_lines
+from docvortex.analyzers.native.pdf.text_styles import materialize_pdf_inline_spans
+from docvortex.analyzers.native.pdf.text_styles import _partition_resplit_text_evidence
+from docvortex.analyzers.native.pdf.text_styles import _realign_repaired_text_evidence
from _span_test_utils import inline_text
diff --git a/tests/unittest/test_postprocess_page_blocks.py b/tests/unittest/test_postprocess_page_blocks.py
index cab906c2..378d451d 100644
--- a/tests/unittest/test_postprocess_page_blocks.py
+++ b/tests/unittest/test_postprocess_page_blocks.py
@@ -1,7 +1,7 @@
from __future__ import annotations
-from docgale.postprocess.lists import fix_pdf_list_blocks
-from docgale.postprocess.page_blocks import process_page_blocks
+from docvortex.postprocess.lists import fix_pdf_list_blocks
+from docvortex.postprocess.page_blocks import process_page_blocks
from mineru.types import BlockType
from _span_test_utils import inline as _inline
diff --git a/tests/unittest/test_postprocess_pages.py b/tests/unittest/test_postprocess_pages.py
index 7fe9d221..e21c939a 100644
--- a/tests/unittest/test_postprocess_pages.py
+++ b/tests/unittest/test_postprocess_pages.py
@@ -1,11 +1,11 @@
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from copy import deepcopy
from typing import Any
-from docgale.postprocess import pages as pages_module
-from docgale.postprocess.lists import fix_office_list_blocks
-from docgale.postprocess.pages import model_json_to_pages
+from docvortex.postprocess import pages as pages_module
+from docvortex.postprocess.lists import fix_office_list_blocks
+from docvortex.postprocess.pages import model_json_to_pages
from mineru.types import (
ChartBlock,
DocTitleBlock,
diff --git a/tests/unittest/test_postprocess_paragraphs.py b/tests/unittest/test_postprocess_paragraphs.py
index db96233a..43bf32e9 100644
--- a/tests/unittest/test_postprocess_paragraphs.py
+++ b/tests/unittest/test_postprocess_paragraphs.py
@@ -4,9 +4,9 @@ from copy import deepcopy
import pytest
-from docgale.postprocess.paragraphs import can_auto_merge_ref_text_blocks
-from docgale.postprocess.paragraphs import can_auto_merge_text_blocks
-from docgale.postprocess.paragraphs import merge_para_text_blocks
+from docvortex.postprocess.paragraphs import can_auto_merge_ref_text_blocks
+from docvortex.postprocess.paragraphs import can_auto_merge_text_blocks
+from docvortex.postprocess.paragraphs import merge_para_text_blocks
from mineru.types import BlockType
from _span_test_utils import inline as _inline, inline_text
diff --git a/tests/unittest/test_postprocess_visual.py b/tests/unittest/test_postprocess_visual.py
index f36c22a3..4e43f508 100644
--- a/tests/unittest/test_postprocess_visual.py
+++ b/tests/unittest/test_postprocess_visual.py
@@ -2,14 +2,14 @@
from __future__ import annotations
-from docgale.postprocess.visual import VISUAL_MAIN_TYPES
-from docgale.postprocess.visual import _bbox_for_calculation
-from docgale.postprocess.visual import fallback_inline_caption_fragments
-from docgale.postprocess.visual import fallback_leading_table_continuation_captions
-from docgale.postprocess.visual import fallback_no_bbox_caption_fragments
-from docgale.postprocess.visual import find_best_visual_parent
-from docgale.postprocess.visual import is_block_outside_visual_gap
-from docgale.postprocess.visual import regroup_visual_blocks
+from docvortex.postprocess.visual import VISUAL_MAIN_TYPES
+from docvortex.postprocess.visual import _bbox_for_calculation
+from docvortex.postprocess.visual import fallback_inline_caption_fragments
+from docvortex.postprocess.visual import fallback_leading_table_continuation_captions
+from docvortex.postprocess.visual import fallback_no_bbox_caption_fragments
+from docvortex.postprocess.visual import find_best_visual_parent
+from docvortex.postprocess.visual import is_block_outside_visual_gap
+from docvortex.postprocess.visual import regroup_visual_blocks
from mineru.types import RAW_CAPTION, RAW_FOOTNOTE
from mineru.types import BlockType
diff --git a/tests/unittest/test_render_api.py b/tests/unittest/test_render_api.py
index de85ab5b..ad9cca1c 100644
--- a/tests/unittest/test_render_api.py
+++ b/tests/unittest/test_render_api.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from _span_test_utils import inline as _inline
from copy import deepcopy
@@ -168,8 +168,8 @@ def test_unified_render_forwards_format_specific_options() -> None:
original_list_v2 = render(middle, RenderFormat.CONTENT_LIST_V2)
assert "\n\n---\n\n" in markdown
- assert html.startswith('<article class="docgale-document docgale-document--full" ')
- assert 'data-docgale-html-version="1" data-render-mode="full"' in html
+ assert html.startswith('<article class="docvortex-document docvortex-document--full" ')
+ assert 'data-docvortex-html-version="1" data-render-mode="full"' in html
assert "<!doctype html>" not in html
assert structured_content["pages"][0]["blocks"][0]["image_source"] == ("https://cdn.example/doc/images/a%20b.png")
assert content_list[0]["img_path"] == "https://cdn.example/doc/images/a%20b.png"
diff --git a/tests/unittest/test_render_html_table.py b/tests/unittest/test_render_html_table.py
index dbd34320..0348a7b8 100644
--- a/tests/unittest/test_render_html_table.py
+++ b/tests/unittest/test_render_html_table.py
@@ -2,8 +2,8 @@ import markdown
from bs4 import BeautifulSoup
from mineru.config import LatexDelimitersConfig
-from docgale.render._internal.markdown.table import format_embedded_html
-from docgale.render._internal.markdown.table import render_html_table
+from docvortex.render._internal.markdown.table import format_embedded_html
+from docvortex.render._internal.markdown.table import render_html_table
DELIMITERS = LatexDelimitersConfig()
diff --git a/tests/unittest/test_render_image_renderer.py b/tests/unittest/test_render_image_renderer.py
index 12a0a5cd..9f175b1e 100644
--- a/tests/unittest/test_render_image_renderer.py
+++ b/tests/unittest/test_render_image_renderer.py
@@ -7,7 +7,7 @@ import pytest
from mineru.config import LatexDelimitersConfig, config
from mineru.render import ImageRenderer
-from docgale.render._internal.markdown.blocks import render_single_block
+from docvortex.render._internal.markdown.blocks import render_single_block
from mineru.types import (
BlockBase,
BlockType,
diff --git a/tests/unittest/test_render_list_index_utils.py b/tests/unittest/test_render_list_index_utils.py
index 705ce690..5b989ef8 100644
--- a/tests/unittest/test_render_list_index_utils.py
+++ b/tests/unittest/test_render_list_index_utils.py
@@ -3,12 +3,12 @@ from _span_test_utils import inline as _inline
import pytest
-from docgale.content.inline import inline_plain_text
-from docgale.render._internal.common.index import looks_like_index_page_token
-from docgale.render._internal.common.index import strip_index_page_tail
-from docgale.render._internal.common.list_items import has_markdown_unordered_marker
-from docgale.render._internal.common.list_items import parse_list_item_marker
-from docgale.render._internal.common.list_items import reference_list_needs_bullets
+from docvortex.content.inline import inline_plain_text
+from docvortex.render._internal.common.index import looks_like_index_page_token
+from docvortex.render._internal.common.index import strip_index_page_tail
+from docvortex.render._internal.common.list_items import has_markdown_unordered_marker
+from docvortex.render._internal.common.list_items import parse_list_item_marker
+from docvortex.render._internal.common.list_items import reference_list_needs_bullets
from mineru.types import ListBlock, RefTextBlock, TextBlock
diff --git a/tests/unittest/test_structured_content_render.py b/tests/unittest/test_structured_content_render.py
index 3309c576..cb64b5c9 100644
--- a/tests/unittest/test_structured_content_render.py
+++ b/tests/unittest/test_structured_content_render.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from _span_test_utils import inline as _inline
import json
diff --git a/tests/unittest/test_text_block_anchor.py b/tests/unittest/test_text_block_anchor.py
index 4aedc3d2..6bc55e84 100644
--- a/tests/unittest/test_text_block_anchor.py
+++ b/tests/unittest/test_text_block_anchor.py
@@ -1,6 +1,6 @@
from __future__ import annotations
-from docgale.schema import Producer
-from mineru.integrations.docgale import build_metadata
+from docvortex.schema import Producer
+from mineru.integrations.docvortex import build_metadata
from datetime import datetime, timezone
from io import BytesIO
@@ -23,7 +23,7 @@ from mineru.render import (
render_pdf,
render_structured_content,
)
-from docgale.render._internal.common.planner import build_render_plan
+from docvortex.render._internal.common.planner import build_render_plan
from mineru.types import IndexBlock, MiddleJson, PageInfo, RefTextBlock, TextBlock
@@ -120,7 +120,7 @@ def test_text_anchor_markdown_html_and_html_wire_roundtrip() -> None:
rendered_html = render_html(middle)
soup = BeautifulSoup(rendered_html, "html.parser")
- target_wrapper = soup.select_one('.docgale-block[data-block-type="text"][data-anchor="body target"]')
+ target_wrapper = soup.select_one('.docvortex-block[data-block-type="text"][data-anchor="body target"]')
assert target_wrapper is not None
assert target_wrapper.find("p")["id"] == "body-target"
assert soup.select_one('[data-block-type="index"] a')["href"] == "#body-target"
diff --git a/tests/unittest/test_text_utils.py b/tests/unittest/test_text_utils.py
index ecfa63f2..a2ded572 100644
--- a/tests/unittest/test_text_utils.py
+++ b/tests/unittest/test_text_utils.py
@@ -1,7 +1,7 @@
import pytest
-from docgale.foundation.text import merge_text_line_contents
-from docgale.foundation.text import resolve_text_line_boundary
+from docvortex.foundation.text import merge_text_line_contents
+from docvortex.foundation.text import resolve_text_line_boundary
@pytest.mark.parametrize(