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.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ocr_sdk_sandbox_17d2ad54-0.5.0.tar.gz | 124.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ocr_sdk_sandbox_17d2ad54-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 227.2 kB
Release files / ocr_sdk_sandbox_17d2ad54-0.5.0.tar.gz
| Download URL | ocr_sdk_sandbox_17d2ad54-0.5.0.tar.gz |
|---|---|
| Size | 124.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0418839f0a88257fcdf199ceb505ff759b02db7648241edd086c42f98bf046ca
|
|
BLAKE2b-256 checksum How to use checksums |
24dd873cd83f00c7f377892b1cf058ea1eae4e2c650a6de913d80ba742af39a5
|
| 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 logRelease files / ocr_sdk_sandbox_17d2ad54-0.5.0-py3-none-any.whl
| Download URL | ocr_sdk_sandbox_17d2ad54-0.5.0-py3-none-any.whl |
|---|---|
| Size | 102.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8369f178869e25bc37059c80bbefc7f0cac27db587d4712d067a2f720e4362d
|
|
BLAKE2b-256 checksum How to use checksums |
83ecac54d051e3ae3bd3f9bc128a842c786793bc34e76cf83e58bf563fdb8c45
|
| 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 logSecurity for ocr-sdk-sandbox-17d2ad54 0.5.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.
Attestation for ocr_sdk_sandbox_17d2ad54-0.5.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 logA 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.