Skip to main content

OCR SDK 发布测试副本

本仓库是 SDK 当前工作区内容的独立副本,用于验证正式 PyPI 的打包、安装和自动发布流程。

  • PyPI 安装名:ocr-sdk-sandbox-17d2ad54。
  • Python 导入名和命令行:minicpmvocr。
  • 版本:0.3.0,由 minicpmvocr/_version.py 提供。
  • Python 要求:3.10 或更新版本。
  • 许可证:保留原 SDK 的 Apache-2.0 许可证。

测试包与原 SDK 提供相同的 Python 导入目录和命令行入口,请使用独立虚拟环境。 临时名称用于隔离发布测试;包内仍包含原 SDK 代码。

本地构建

python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip build twine pytest ".[crosspage]"
python -m pytest -q tests/test_public_api.py tests/test_reference_config.py tests/test_cli_overrides.py tests/test_parse_quickstart.py
python -m build
python -m twine check dist/*

测试会检查 API、随包配置和使用模拟后端的快速解析接口,不会启动模型或执行 GPU 推理。

自动发布

工作流:.github/workflows/release.yml。

发布对应版本的 GitHub Release 后,Actions 会构建并检查 wheel 和源码包, 在独立环境验证 wheel 安装,再通过 Trusted Publishing 上传到正式 PyPI。 工作流的手动运行仅执行构建和验证。

首次使用前,在 PyPI Publishing 登记 Pending Publisher:

字段 填写值
PyPI Project Name ocr-sdk-sandbox-17d2ad54
Owner LongkunHao
Repository name ocr-sdk-sandbox-17d2ad54
Workflow name release.yml
Environment name pypi

GitHub 仓库使用 pypi 环境,限定 v* tag;手动发布 GitHub Release 是上传包的触发入口。 当前私有仓库的 GitHub 套餐不支持环境审批人规则。 无需在 GitHub 保存 PyPI API token。

后续发布时更新 minicpmvocr/_version.py,提交并推送,再创建对应 tag 和 Release:

git tag -a v0.3.0 -m "Release 0.3.0"
git push origin v0.3.0

在 GitHub Releases 发布 Release, 检查 Actions 的构建和上传结果。 后续版本需使用新的版本号和 tag。

从 PyPI 验证安装

首次发布成功后,在另一终端和独立虚拟环境中执行:

python3 -m venv .venv-verify
source .venv-verify/bin/activate
python -m pip install ocr-sdk-sandbox-17d2ad54==0.3.0
python -c "import minicpmvocr; print(minicpmvocr.__version__)"
minicpmvocr --help

安装 [all] 时会启用 SDK 的可选依赖。需要的模型、推理服务及 Paddle GPU 环境仍需另行配置。

Metadata

Release files for ocr-sdk-sandbox-17d2ad54 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ocr-sdk-sandbox-17d2ad54 0.3.0
File Size Uploaded Provenance
ocr_sdk_sandbox_17d2ad54-0.3.0.tar.gz 114.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ocr-sdk-sandbox-17d2ad54 0.3.0
File Interpreter ABI Platform
ocr_sdk_sandbox_17d2ad54-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 211.0 kB

Release files / ocr_sdk_sandbox_17d2ad54-0.3.0.tar.gz

Download URL ocr_sdk_sandbox_17d2ad54-0.3.0.tar.gz
Size 114.9 kB
Tags Source
SHA-256 checksum
How to use checksums
528a45f2a7d4b4ea26fc2348098ccfdf13cf270cb04466b5dc0f3199e43d0e89
BLAKE2b-256 checksum
How to use checksums
60c1e314cc00219a59b77f32d957e5bf77f328e113977370def8c6592379e2e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / ocr_sdk_sandbox_17d2ad54-0.3.0-py3-none-any.whl

Download URL ocr_sdk_sandbox_17d2ad54-0.3.0-py3-none-any.whl
Size 96.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa4ae6c3c08713edc3609ee4ef95f8d578e82ac10170395e32ce21873c032c72
BLAKE2b-256 checksum
How to use checksums
04c1a07dd0fa91f6e5e37e504fd0757853aa14461ed2d58dd4454dde243ca1db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for ocr-sdk-sandbox-17d2ad54 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ocr_sdk_sandbox_17d2ad54-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page