Skip to content

Commit 44e3c84

Browse files
committed
添加发布工作流,更新 README 和 pyproject.toml,删除不必要的示例,调整工具调用基准测试路径
1 parent 4e92bd3 commit 44e3c84

17 files changed

Lines changed: 93 additions & 834 deletions

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.12"
17+
- name: Install build tooling
18+
run: |
19+
python -m pip install --upgrade pip
20+
python -m pip install build twine
21+
- name: Build distributions
22+
run: python -m build
23+
- name: Validate distributions
24+
run: python -m twine check dist/*
25+
- uses: actions/upload-artifact@v4
26+
with:
27+
name: python-package-distributions
28+
path: dist/
29+
30+
publish:
31+
needs: build
32+
runs-on: ubuntu-latest
33+
permissions:
34+
id-token: write
35+
environment:
36+
name: pypi
37+
steps:
38+
- uses: actions/download-artifact@v4
39+
with:
40+
name: python-package-distributions
41+
path: dist/
42+
- uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ node_modules/
1212
.next/
1313
benchmark_reports/checkpoints/
1414
benchmark_reports/**/checkpoints/
15+
dist/
16+
build/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ It serves two goals at the same time:
1010
- remain compatible with MCP-facing integrations through stdio, streamable
1111
HTTP, and WebSocket surfaces
1212

13-
The public Python package remains:
13+
The public Python surface remains:
1414

15-
- package name: `zcp`
15+
- distribution name: `zero-context-protocol-sdk`
1616
- import path: `import zcp`
1717

1818
The companion protocol and documentation repository lives in

RELEASING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Releasing The Python SDK
2+
3+
## Local Validation
4+
5+
```bash
6+
python -m pip install -e ".[dev,openai,mcp]"
7+
python -m ruff check src tests examples tools
8+
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest -q
9+
python -m build
10+
python -m twine check dist/*
11+
```
12+
13+
## GitHub Release Flow
14+
15+
The repository includes a trusted-publisher release workflow at
16+
`.github/workflows/release.yml`.
17+
18+
To use it for the `zero-context-protocol-sdk` distribution:
19+
20+
1. configure this GitHub repository as a trusted publisher in PyPI
21+
2. push a tag like `v0.2.0a0`
22+
3. let the workflow build and publish the package
23+
24+
## Manual Publishing
25+
26+
If you prefer local publishing:
27+
28+
```bash
29+
python -m build
30+
python -m twine upload dist/*
31+
```
32+
33+
That path requires a configured PyPI token or `.pypirc`.

examples/README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Examples
22

3-
The public examples are grouped by intent so new users can find the right entry
4-
point quickly.
3+
This directory intentionally keeps only the public entrypoints that are useful
4+
to new users.
55

66
## Minimal
77

@@ -12,21 +12,10 @@ point quickly.
1212

1313
- `run_zcp_api_server.py`: ASGI host exposing `/zcp`, `/mcp`, and `/ws`
1414
- `zcp_server_template.py`: reference service template for a real backend
15-
- `zcp_mcp_gateway_demo.py`: gateway demo for MCP compatibility layering
16-
17-
## Migration / Comparison
18-
19-
- `mcp_weather_server.py`: official MCP-style baseline
20-
- `real_sdk_mcp_server.py`: MCP baseline server used in benchmark harnesses
21-
- `compare_mcp_zcp_profiles.py`: static payload/profile comparison
2215

2316
## Benchmarks
2417

2518
- `compare_zcp_mcp_tool_call_benchmark.py`: official compact tool-call token benchmark
2619
- `compare_excel_client_protocol_benchmark.py`: official Excel LLM token benchmark
27-
- `run_mcp_tool_call_benchmark.py`: MCP-only benchmark entrypoint
28-
- `run_zcp_tool_call_benchmark.py`: ZCP-only benchmark entrypoint
29-
30-
## Provider-specific diagnostics
3120

32-
- `deepseek_chat_tool_call_example.py`: DeepSeek/OpenAI-compatible adapter trace example
21+
Internal benchmark baselines and helpers now live under `tools/`.

0 commit comments

Comments
 (0)