matelab-python-sdk 0.2.0a3__tar.gz → 0.2.0a4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/.github/workflows/release.yml +1 -1
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/AGENTS.md +10 -10
- matelab_python_sdk-0.2.0a4/PKG-INFO +69 -0
- matelab_python_sdk-0.2.0a4/README.md +41 -0
- matelab_python_sdk-0.2.0a4/docs/agent-workflows.md +100 -0
- matelab_python_sdk-0.2.0a3/README.md → matelab_python_sdk-0.2.0a4/docs/api.md +11 -149
- matelab_python_sdk-0.2.0a4/docs/development.md +68 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/docs/operation-coverage.yaml +1 -1
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/pyproject.toml +14 -13
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/scripts/check_release.py +0 -1
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_release.py +2 -2
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/uv.lock +12 -12
- matelab_python_sdk-0.2.0a3/CHANGELOG.md +0 -470
- matelab_python_sdk-0.2.0a3/PKG-INFO +0 -26
- matelab_python_sdk-0.2.0a3/docs/agent-workflows.md +0 -129
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/.env.example +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/.gitignore +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/CONTEXT.md +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/LICENSE +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/NOTICE +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/contracts/matelab-integration-v1.lock.json +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/contracts/matelab-integration-v1.openapi.yaml +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/docs/agent-architecture.md +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/scripts/check_installed_package.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/scripts/generate_models.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/__init__.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/_generated/__init__.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/_generated/models.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/_hashes.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/_transport.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/_wire_validation.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/client.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/domains/__init__.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/domains/_attachment_content.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/domains/cloud_drive.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/domains/groups.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/domains/literature.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/domains/notebooks.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/domains/records.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/domains/templates.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/domains/uploads.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/domains/users.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/errors.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/py.typed +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/session.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/src/matelab/streaming.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/conftest.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/provider/test_provider_smoke.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_async_attachment_upload.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_client.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_cloud_drive.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_comments_and_downloads.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_consumer_smoke.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_errors.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_extended_records.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_generation.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_groups.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_notebook_lifecycle.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_notebooks.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_operation_coverage.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_record_lifecycle.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_record_mutations.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_records.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_streaming.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_template_lifecycle.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_templates.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_transport.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_uploads_and_literature.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/test_users.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/typing/consumer.py +0 -0
- {matelab_python_sdk-0.2.0a3 → matelab_python_sdk-0.2.0a4}/tests/typing/pyproject.toml +0 -0
|
@@ -84,7 +84,7 @@ jobs:
|
|
|
84
84
|
uv pip install \
|
|
85
85
|
--python "${RUNNER_TEMP}/matelab-consumer/bin/python" \
|
|
86
86
|
dist/release/*.whl \
|
|
87
|
-
"basedpyright
|
|
87
|
+
"basedpyright>=1.40.1" \
|
|
88
88
|
"nodejs-wheel-binaries==22.20.0"
|
|
89
89
|
"${RUNNER_TEMP}/matelab-consumer/bin/python" scripts/check_installed_package.py
|
|
90
90
|
"${RUNNER_TEMP}/matelab-consumer/bin/basedpyright" \
|
|
@@ -4,14 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
## 维护顺序
|
|
6
6
|
|
|
7
|
-
1. **定界**:先读 `git status`
|
|
7
|
+
1. **定界**:先读 `git status` 和适用权威,确定任务范围、用户现有改动和所需权限。
|
|
8
8
|
2. **查证**:涉及 SDK 行为或 Contract 时,沿 public intent → wire operation → Provider evidence 核对受影响
|
|
9
9
|
operation 的 request、response、security、examples、成功码及 PVD/PCG,明确报告 Contract 缺口。文档、排版和
|
|
10
10
|
工具配置修改只核对相关权威。
|
|
11
11
|
3. **收敛**:只修改任务必需的层,检查 public、adapter、generated、tests、coverage 和 docs 中受影响的内容。
|
|
12
|
-
4.
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
4. **验证**:按变更类型执行 [delivery gate](docs/agent-workflows.md#delivery-gate),复用仍覆盖当前变更的有效结果。
|
|
13
|
+
5. **交付**:复核最终 diff 和状态,报告结果、验证证据、限制及未执行项。
|
|
14
|
+
|
|
15
|
+
本地仅为打包配置、构建元数据、发布脚本变化或制品故障按需构建。正式可复现构建、制品审计和安装后消费由
|
|
16
|
+
发布 CI 执行,本地无需重复构建或保留历史 `dist/` 产物。
|
|
15
17
|
|
|
16
18
|
## 分支指针
|
|
17
19
|
|
|
@@ -23,8 +25,6 @@
|
|
|
23
25
|
[`docs/agent-workflows.md#contract-adoption`](docs/agent-workflows.md#contract-adoption)。
|
|
24
26
|
- **Configuration and dependencies**:修改 `pyproject.toml`、依赖范围、lock 或对应 CI 配置时读
|
|
25
27
|
[`docs/agent-workflows.md#configuration-and-dependencies`](docs/agent-workflows.md#configuration-and-dependencies)。
|
|
26
|
-
- **Delivery gate**:交付前按变更类型执行
|
|
27
|
-
[`docs/agent-workflows.md#delivery-gate`](docs/agent-workflows.md#delivery-gate)。
|
|
28
28
|
- **Provider validation**:任何实时 Provider smoke、读取或 mutation 前执行
|
|
29
29
|
[`docs/agent-workflows.md#provider-validation`](docs/agent-workflows.md#provider-validation)。
|
|
30
30
|
- **Release**:准备版本或发布制品时执行;普通 commit/push 只应用其中的授权与 diff 审查要求
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
|
|
35
35
|
| 权威 | 负责内容 |
|
|
36
36
|
| --- | --- |
|
|
37
|
-
| `README.md` |
|
|
37
|
+
| `README.md` | 项目介绍、安装及快速入门 |
|
|
38
|
+
| `docs/api.md` | 当前 public interface、集成语义、完整示例和 Provider 限制 |
|
|
39
|
+
| `docs/development.md` | 开发、验证、版本与构建流程 |
|
|
38
40
|
| `CONTEXT.md` | public 类型和命名采用的领域词汇 |
|
|
39
|
-
| `CHANGELOG.md` | SDK 版本变化与迁移影响;不定义当前接口 |
|
|
40
41
|
| `docs/operation-coverage.yaml` | operation 状态、公开入口、稳定性和已知问题 |
|
|
41
42
|
| `pyproject.toml` | SDK 版本、依赖范围、构建与工具配置;`uv.lock` 只锁定本仓库环境 |
|
|
42
43
|
| Contract lock 与 snapshot | Contract pin 与 wire schema |
|
|
43
44
|
| `src/matelab/__init__.py::__all__` | 公开导入边界 |
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
接口、coverage 或 Contract 权威。
|
|
46
|
+
机器权威变化时,同一变更同步受影响的当前态文档。测试提供行为证据,不替代接口、coverage 或 Contract 权威。
|
|
47
47
|
|
|
48
48
|
## 范围与授权
|
|
49
49
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: matelab-python-sdk
|
|
3
|
+
Version: 0.2.0a4
|
|
4
|
+
Summary: Reusable async Python client for the Matelab Integration Contract
|
|
5
|
+
Author: CMPDC, Institute of Physics, Chinese Academy of Sciences
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
License-File: NOTICE
|
|
9
|
+
Keywords: asyncio,electronic-lab-notebook,eln,matelab,sdk
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Framework :: AsyncIO
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: httpx2>=2.13.1
|
|
24
|
+
Requires-Dist: jsonschema>=4.26.0
|
|
25
|
+
Requires-Dist: pydantic>=2.13.5
|
|
26
|
+
Requires-Dist: typing-extensions>=4.16.0
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# matelab-python-sdk
|
|
30
|
+
|
|
31
|
+
Async Python client for the Matelab Integration Contract, with typed interfaces for authentication,
|
|
32
|
+
notebooks, records, attachments, cloud files, templates, and literature. Requires Python 3.11 or newer.
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
uv add matelab-python-sdk
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or use `python -m pip install matelab-python-sdk`.
|
|
41
|
+
|
|
42
|
+
## Quick start
|
|
43
|
+
|
|
44
|
+
Replace the example credentials with your own:
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
import asyncio
|
|
48
|
+
|
|
49
|
+
from matelab import AsyncMatelab
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
async def main() -> None:
|
|
53
|
+
async with AsyncMatelab() as client:
|
|
54
|
+
await client.authenticate("user@example.org", "password")
|
|
55
|
+
notebooks = await client.notebooks.list()
|
|
56
|
+
for notebook in notebooks.owned:
|
|
57
|
+
print(notebook.ref)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
asyncio.run(main())
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`AsyncMatelab()` uses `https://matelab.iphy.ac.cn/api` by default. Pass another API root as its first argument.
|
|
64
|
+
|
|
65
|
+
## Documentation
|
|
66
|
+
|
|
67
|
+
- [API reference](https://github.com/tiannianzhu/matelab-python-sdk/blob/main/docs/api.md): Session persistence, errors, examples, and Provider limits.
|
|
68
|
+
- [Operation coverage](https://github.com/tiannianzhu/matelab-python-sdk/blob/main/docs/operation-coverage.yaml): supported operations.
|
|
69
|
+
- [Development and releases](https://github.com/tiannianzhu/matelab-python-sdk/blob/main/docs/development.md): checks, Provider smoke, versioning, and builds.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# matelab-python-sdk
|
|
2
|
+
|
|
3
|
+
Async Python client for the Matelab Integration Contract, with typed interfaces for authentication,
|
|
4
|
+
notebooks, records, attachments, cloud files, templates, and literature. Requires Python 3.11 or newer.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
uv add matelab-python-sdk
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Or use `python -m pip install matelab-python-sdk`.
|
|
13
|
+
|
|
14
|
+
## Quick start
|
|
15
|
+
|
|
16
|
+
Replace the example credentials with your own:
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
import asyncio
|
|
20
|
+
|
|
21
|
+
from matelab import AsyncMatelab
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
async def main() -> None:
|
|
25
|
+
async with AsyncMatelab() as client:
|
|
26
|
+
await client.authenticate("user@example.org", "password")
|
|
27
|
+
notebooks = await client.notebooks.list()
|
|
28
|
+
for notebook in notebooks.owned:
|
|
29
|
+
print(notebook.ref)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
asyncio.run(main())
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`AsyncMatelab()` uses `https://matelab.iphy.ac.cn/api` by default. Pass another API root as its first argument.
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
- [API reference](https://github.com/tiannianzhu/matelab-python-sdk/blob/main/docs/api.md): Session persistence, errors, examples, and Provider limits.
|
|
40
|
+
- [Operation coverage](https://github.com/tiannianzhu/matelab-python-sdk/blob/main/docs/operation-coverage.yaml): supported operations.
|
|
41
|
+
- [Development and releases](https://github.com/tiannianzhu/matelab-python-sdk/blob/main/docs/development.md): checks, Provider smoke, versioning, and builds.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Agent Maintenance Workflows
|
|
2
|
+
|
|
3
|
+
本文件只在对应分支触发时加载。机器值始终从仓库读取;这里记录顺序、授权边界和完成标准。
|
|
4
|
+
|
|
5
|
+
## Contract adoption
|
|
6
|
+
|
|
7
|
+
1. 读取 Contract lock 和远端 release refs。只选择新的 annotated tag;移动分支和改写后的旧
|
|
8
|
+
snapshot 不能成为 SDK pin。记录 tag object、peeled commit、OpenAPI path 与 SHA-256。完成标准:四者固定且
|
|
9
|
+
互相一致。
|
|
10
|
+
2. 比较当前 snapshot 与 release commit。逐项核对 operation request、response、security、examples、成功码、
|
|
11
|
+
Provider evidence 及 PVD/PCG。完成标准:每个 schema/operation 差异都分类为 generated-only、adapter、public
|
|
12
|
+
interface、test、coverage 或 docs 影响。
|
|
13
|
+
3. request/response 均由生成 wire model 校验,adapter 只映射 public Python 名称与 wire 字段。required nullable
|
|
14
|
+
使用无默认值的 `T | None`;request 拒绝未知字段,response 接受新增字段。若专用 schema、顶层 request 或
|
|
15
|
+
Provider evidence 相互矛盾,保留当前安全边界并报告缺口。
|
|
16
|
+
4. 从 release commit 复制 OpenAPI snapshot;同一变更更新 lock 的 tag、commit、snapshot path 和 SHA-256,运行
|
|
17
|
+
生成脚本并审查完整 generated diff。`_generated` 只由生成脚本修改;projection 只补偿生成器表达能力并保留
|
|
18
|
+
inherited required、`if/then`、`oneOf`、`anyOf` 和 `not`。完成标准:snapshot hash 与 lock 相等,生成差异
|
|
19
|
+
全部可由 OpenAPI 差异解释,`--check` 确定、非写入且能发现 stale output。
|
|
20
|
+
5. 同步 runtime、测试、operation coverage、README、`docs/api.md`、`docs/development.md`、`pyproject.toml` 与 `uv.lock`
|
|
21
|
+
中受影响的当前态。
|
|
22
|
+
完成标准:每个 Contract 差异都有实现或明确 containment,当前文档与采用后的 Contract 一致。
|
|
23
|
+
6. 执行 [delivery gate](#delivery-gate)。
|
|
24
|
+
|
|
25
|
+
## Configuration and dependencies
|
|
26
|
+
|
|
27
|
+
配置值以 `pyproject.toml` 为准,`uv.lock` 固定本仓库的解析环境,不反向定义发布依赖范围。
|
|
28
|
+
|
|
29
|
+
- `[project]` 字段依次为 `name`、`version`、`description`、`requires-python`、`keywords`、`authors`、
|
|
30
|
+
`dependencies`,其他字段放在其后。
|
|
31
|
+
- `[tool.basedpyright]` 字段依次为 `pythonVersion`、`typeCheckingMode`、`include`、`exclude`、
|
|
32
|
+
`reportUnannotatedClassAttribute`、`reportIncompatibleUnannotatedOverride`,其他设置放在其后。沿用 SDK 的目标
|
|
33
|
+
Python 版本与检查路径,不照搬其他项目的值。
|
|
34
|
+
- runtime、build 和 dev 依赖仅声明已验证的 `>=` 下限;`nodejs-wheel-binaries` 保留系统所需的精确版本。
|
|
35
|
+
更新声明时同步 lock 和安装后消费检查使用的 CI requirement。
|
|
36
|
+
- 构建后端依赖和 wheel package 显式配置;metadata 与制品检查从这些声明推导预期值。
|
|
37
|
+
|
|
38
|
+
完成标准:配置可解析、声明与 lock 一致、受影响 CI 使用同一约束;字段重排不改变配置含义。
|
|
39
|
+
|
|
40
|
+
## Delivery gate
|
|
41
|
+
|
|
42
|
+
按本次变更选择验证范围:
|
|
43
|
+
|
|
44
|
+
- 纯文档修改检查相关事实、本地路径和 Markdown 引用;示例或接口说明变化要对照当前 public interface。
|
|
45
|
+
- 字段重排或显式写出既有默认值,检查语法与有效配置一致性。工具配置的有效设置变化运行对应工具。
|
|
46
|
+
- SDK 代码、测试行为、Contract、依赖范围或影响制品的构建元数据变化,先跑聚焦测试,再完成下列完整门槛。
|
|
47
|
+
|
|
48
|
+
### SDK test scope
|
|
49
|
+
|
|
50
|
+
SDK 测试覆盖 public interface 到 wire adapter 的映射、认证与 Session、错误与重试、stream/上传生命周期及
|
|
51
|
+
分发制品;Provider 的逐路由原始 HTTP conformance 由 `matelab-spec` 负责。
|
|
52
|
+
|
|
53
|
+
新增或修改 operation 覆盖 method/path/encoding、认证、成功映射及适用的空结果、
|
|
54
|
+
required nullable 和 additive response fields;operation coverage 与 pinned OpenAPI exact match,implemented
|
|
55
|
+
operation 同时具备 public interface、wire adapter 和测试。删除或收紧 public interface 时同步移除过时测试,
|
|
56
|
+
不保留无承诺的墓碑 alias。生成测试覆盖 metadata/checksum、schema、required/nullable、extra policy、确定性和
|
|
57
|
+
stale detection。
|
|
58
|
+
|
|
59
|
+
优先使用 pinned sanitized examples 或小型受控 fixture 验证稳定行为。operation 数量从 pinned Contract 推导,
|
|
60
|
+
不固定当前数量;当前服务地址和依赖版本值不作为回归断言,除非它们本身就是明确的稳定契约。
|
|
61
|
+
配置值变化只验证语法、约束及相关行为,不另加冻结新值或重复实现逻辑的测试。
|
|
62
|
+
|
|
63
|
+
Ruff/Basedpyright 诊断通过修复代码或精确 ignore 解决,不缩小检查范围;Basedpyright 目标为 0 errors / 0 warnings。
|
|
64
|
+
|
|
65
|
+
### Full gate
|
|
66
|
+
|
|
67
|
+
完整命令见 [开发文档](development.md#development)。离线验证不配置 Provider 连接变量;实时 smoke 按
|
|
68
|
+
[Provider validation](#provider-validation) 执行。
|
|
69
|
+
|
|
70
|
+
检查因权限失败或无进展时,先查看输出和自己启动的进程,区分普通失败与文件、socket、网络或子进程限制。
|
|
71
|
+
有沙箱阻塞证据后停止自己启动的停滞测试,通过工具审批机制申请最小范围重试;保留配置,不改权限、凭证或测试
|
|
72
|
+
行为来绕过限制。超时本身不是沙箱拒绝的证据;无法升级或被拒绝时报告阻塞。
|
|
73
|
+
|
|
74
|
+
完成标准:必需检查退出为零,`git diff --check` 无错误;skip 报告测试名称和原因,deselected 说明筛选范围。
|
|
75
|
+
|
|
76
|
+
## Provider validation
|
|
77
|
+
|
|
78
|
+
1. 实时验证仅在任务需要且会话授权覆盖目标及副作用时执行;连接设置和 smoke 命令见
|
|
79
|
+
[开发文档](development.md#opt-in-provider-consumer-smoke)。
|
|
80
|
+
2. 执行前确认目标是隔离服务、`.env.test` 处于 Git ignore、命令显式加载该文件,并列出 authentication、refresh、
|
|
81
|
+
mutation 或带写痕迹读取的副作用。
|
|
82
|
+
3. mutation 场景在写前记录 fixture,在写后回读,并尽力清理。完成标准:目标、Provider commit、命令、通过数、
|
|
83
|
+
skip/failure 和清理结果均可追溯;凭证及敏感 payload 未进入输出或提交。
|
|
84
|
+
|
|
85
|
+
## Release
|
|
86
|
+
|
|
87
|
+
普通 commit/push 只处理已授权的 diff,不自动改版本、建 tag 或发布。发布准备完成但缺少外部操作授权时,
|
|
88
|
+
先交付可审查结果,再请求执行授权。以下步骤适用于实际发布:
|
|
89
|
+
|
|
90
|
+
1. 按 [版本规则](development.md#versioning) 选择 SDK 版本,读取 `[project].version`,确认待发布版本未发布
|
|
91
|
+
且 Contract pin 完整。公开接口删除、重命名、类型收紧或不兼容行为变化按 breaking change 处理。
|
|
92
|
+
完成标准:版本、当前文档和 tag 名 `v{version}` 一致。
|
|
93
|
+
2. 提交前同步受影响的当前文档,完成 [delivery gate](#delivery-gate)。构建元数据或发布流程变化时,核对
|
|
94
|
+
metadata 版本与固定的 PyPI 发布 Action 是否兼容;需要本地制品证据时使用
|
|
95
|
+
[手工构建命令](development.md#reproducible-release-build)。创建已审查、已授权的 release commit。
|
|
96
|
+
3. 创建指向 release commit 的 annotated `v{version}` tag。先推送 `origin` 的 main/tag,再推送 GitHub mirror 的
|
|
97
|
+
main/tag;只有与项目版本完全匹配的 tag 触发 Trusted Publishing workflow,第三方 Action 固定 immutable
|
|
98
|
+
commit SHA。
|
|
99
|
+
4. 跟踪 [发布 CI](../.github/workflows/release.yml) 的测试、可复现构建、制品审计、安装后消费和 PyPI publish。
|
|
100
|
+
完成标准:两个远端 main/tag 对应 release commit,CI 全部通过,PyPI 对应版本可读取。
|
|
@@ -1,69 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# API reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Current public interface, integration semantics, examples, and Provider capability limits.
|
|
4
|
+
See the [README](../README.md) for installation and quick start and [CONTEXT.md](../CONTEXT.md) for domain terminology.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
[CONTEXT.md](CONTEXT.md) for domain terminology, [CHANGELOG.md](CHANGELOG.md) for version deltas,
|
|
7
|
-
[AGENTS.md](AGENTS.md) for durable maintenance rules, and `docs/operation-coverage.yaml` for the machine-readable
|
|
8
|
-
operation inventory.
|
|
9
|
-
|
|
10
|
-
The current alpha is `0.2.0a3`. `[project].version` in `pyproject.toml` is the sole SDK version source;
|
|
11
|
-
`uv.lock` only mirrors that source.
|
|
6
|
+
## Contract
|
|
12
7
|
|
|
13
8
|
The SDK is pinned to the immutable `matelab-spec v2026.10.1` Contract Release. The sole pin,
|
|
14
|
-
|
|
15
|
-
source `openapi/matelab-integration-v1.openapi.yaml`, the local snapshot path,
|
|
16
|
-
`a07997128c1df17a03724c5af8e11b45a34166f9d6e15558e66e0a301f2e0813`. The annotated tag object is
|
|
9
|
+
[contracts/matelab-integration-v1.lock.json](../contracts/matelab-integration-v1.lock.json), records peeled commit
|
|
10
|
+
`9941e2d623a1c2633adb459b823d78d4e62d3802`, source `openapi/matelab-integration-v1.openapi.yaml`, the local snapshot path,
|
|
11
|
+
and SHA-256 `a07997128c1df17a03724c5af8e11b45a34166f9d6e15558e66e0a301f2e0813`. The annotated tag object is
|
|
17
12
|
`ae8098e1b5178b69706bddd8b70c1b4cfe3e09ba`.
|
|
18
13
|
|
|
19
|
-
## Installation
|
|
20
|
-
|
|
21
|
-
Python 3.11 or newer is required. Install the alpha from a package index with either:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
uv add matelab-python-sdk
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
python -m pip install matelab-python-sdk
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Development installs use the locked checkout:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
uv sync --frozen
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
To test the same artifact a downstream Consumer will install, build and install the wheel:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
uv build --no-build-isolation --out-dir dist/release
|
|
41
|
-
python -m pip install dist/release/matelab_python_sdk-0.2.0a3-py3-none-any.whl
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Do not infer Provider compatibility from the SDK version alone. A release is also bound to the Contract
|
|
45
|
-
tag, commit, and checksum recorded below.
|
|
46
|
-
|
|
47
14
|
The Contract uses Provider source evidence from `3f39d47b7ad43bed618b029a7d9cc51fab852eb6`; v2026.10.1 validation ran
|
|
48
|
-
against an isolated test instance and does not establish production behavior. The
|
|
49
|
-
|
|
50
|
-
interface. Provider limitations that remain relevant to integrations are documented alongside the affected interfaces
|
|
51
|
-
below.
|
|
52
|
-
|
|
53
|
-
Contract releases now use calendar versions to identify Provider-specific snapshots. This snapshot covers the
|
|
54
|
-
Workerman runtime with the `localhost` data-server branch for ELN records and attachments; remote data-server
|
|
55
|
-
forwarding is outside its verified callable scope (PVD-049).
|
|
56
|
-
|
|
57
|
-
## Versioning
|
|
15
|
+
against an isolated test instance and does not establish production behavior. The Front Consumer evidence
|
|
16
|
+
`0c985f5b6da8e8ef4627ca7065cea85e408ae981` informs cross-Consumer capability review but does not define the SDK interface.
|
|
58
17
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
the minor version. From `1.0.0`, compatible fixes advance patch, compatible additions advance minor, and incompatible
|
|
62
|
-
changes advance major. Successive candidates for the same target version use `aN`, `bN`, or `rcN`.
|
|
63
|
-
|
|
64
|
-
Contract calendar versions identify Provider wire snapshots independently. Each SDK release records its exact
|
|
65
|
-
Contract tag, commit and checksum in the lock; multiple SDK fixes can use the same Contract release. Adopting a new
|
|
66
|
-
Contract changes the SDK version according to its public impact. See [CHANGELOG.md](CHANGELOG.md) for migration details.
|
|
18
|
+
This snapshot covers the Workerman runtime with the `localhost` data-server branch for ELN records and attachments;
|
|
19
|
+
remote data-server forwarding is outside its verified callable scope (PVD-049).
|
|
67
20
|
|
|
68
21
|
## Design
|
|
69
22
|
|
|
@@ -868,94 +821,3 @@ Errors are separated into semantic Provider errors, authentication errors, HTTP/
|
|
|
868
821
|
Integration Contract response errors, and client-side usage errors. Semantic Provider errors retain only the
|
|
869
822
|
Contract-defined top-level code plus an SDK-owned safe summary; Provider-authored messages, response bodies, legacy
|
|
870
823
|
aliases, and unrelated fields do not enter exceptions.
|
|
871
|
-
|
|
872
|
-
## Development
|
|
873
|
-
|
|
874
|
-
```bash
|
|
875
|
-
uv sync --frozen
|
|
876
|
-
uv run python scripts/generate_models.py --check
|
|
877
|
-
uv run ruff check .
|
|
878
|
-
uv run ruff format --check .
|
|
879
|
-
uv run basedpyright
|
|
880
|
-
uv run pytest -m 'not provider'
|
|
881
|
-
uv build --no-build-isolation
|
|
882
|
-
```
|
|
883
|
-
|
|
884
|
-
This gate checks the SDK with offline fixtures and excludes the real Provider smoke. Run focused tests first when
|
|
885
|
-
changing code; documentation and configuration-only edits use the relevant checks described in
|
|
886
|
-
[the maintenance workflows](docs/agent-workflows.md#delivery-gate). Contract or generator changes regenerate the
|
|
887
|
-
private models with `uv run python scripts/generate_models.py` before running the gate.
|
|
888
|
-
|
|
889
|
-
The generator first verifies the contract lock, OpenAPI release metadata, and snapshot digest. It then
|
|
890
|
-
creates a temporary OpenAPI 3.1 generation projection, resolves references without network access, and
|
|
891
|
-
generates private component, operation-response, and parameter models. Generator emission uses its built-in formatter;
|
|
892
|
-
the checked-in output is then normalized using the repository `pyproject.toml` as the sole Ruff configuration. The
|
|
893
|
-
projection flattens pure
|
|
894
|
-
object inheritance and preserves constraints the model generator cannot express as self-contained JSON Schema
|
|
895
|
-
2020-12 metadata; the checked-in release snapshot remains unchanged. `--check` performs the same validation and
|
|
896
|
-
deterministic generation without writing the checked-in models. `WireModel` applies that metadata with the standard
|
|
897
|
-
`jsonschema` Draft 2020-12 validator; the SDK does not maintain a second hand-written schema interpreter.
|
|
898
|
-
|
|
899
|
-
`pyproject.toml` declares runtime, build, and development compatibility ranges; `uv.lock` fixes the exact environment
|
|
900
|
-
for development and release builds. Runtime and build lower bounds are verified against the complete test suite on
|
|
901
|
-
the supported Python boundary versions. The sole exact development requirement is `nodejs-wheel-binaries`, retained
|
|
902
|
-
for system compatibility. The `0.x` generator and Ruff ranges allow patch updates within their current minor versions.
|
|
903
|
-
|
|
904
|
-
## Opt-in Provider consumer smoke
|
|
905
|
-
|
|
906
|
-
`tests/provider/test_provider_smoke.py` exercises the consumer flow through only the public SDK interface. Its base
|
|
907
|
-
scenario covers credential authentication, persistence of the complete returned Session, restoration through a new
|
|
908
|
-
`AsyncMatelab` instance, refresh with identity preservation, and notebook discovery. The development gate excludes it;
|
|
909
|
-
a direct pytest run skips it if any of its three connection variables are missing.
|
|
910
|
-
|
|
911
|
-
Raw Provider conformance remains the responsibility of `matelab-spec`, which sends direct HTTP requests and validates
|
|
912
|
-
the unmodified responses. The SDK does not repeat its route-by-route, cross-account, sharing, or attachment-isolation
|
|
913
|
-
verification. Representative SDK adapter tests instead feed the pinned OpenAPI's sanitized response examples through
|
|
914
|
-
`MockTransport` and assert the resulting public values; synthetic fixtures remain where SDK-specific encoding,
|
|
915
|
-
error, retry, and compatibility boundaries require evidence beyond those examples.
|
|
916
|
-
|
|
917
|
-
Provider smoke is restricted to the confirmed isolated test service. Authentication and refresh persist Provider
|
|
918
|
-
token state. This side effect is inherent to the tested Provider operations; it cannot be disabled by a test setting.
|
|
919
|
-
Explicitly loading `.env.test` and selecting the `provider` marker is the opt-in for this flow.
|
|
920
|
-
|
|
921
|
-
SDK smoke can use the same isolated `matelab-test` service as `matelab-spec`. Each repository keeps its own test
|
|
922
|
-
configuration: the SDK uses `.env.test`, and spec keeps its existing `.env`.
|
|
923
|
-
|
|
924
|
-
Copy this repository's `.env.example` to the git-ignored local `.env.test`, then fill in the SDK connection settings:
|
|
925
|
-
|
|
926
|
-
- `MATELAB_PROVIDER_BASE_URL`
|
|
927
|
-
- `MATELAB_PROVIDER_USERNAME`
|
|
928
|
-
- `MATELAB_PROVIDER_PASSWORD`
|
|
929
|
-
|
|
930
|
-
These names intentionally match `matelab-spec` Provider Verification. Refreshing the restored Session must preserve
|
|
931
|
-
its authenticated identity. With the SDK environment prepared, run the public-interface smoke:
|
|
932
|
-
|
|
933
|
-
```bash
|
|
934
|
-
uv run --env-file .env.test pytest -m provider tests/provider/test_provider_smoke.py
|
|
935
|
-
```
|
|
936
|
-
|
|
937
|
-
This command runs only the SDK public-interface smoke; Provider Verification is maintained in
|
|
938
|
-
`matelab-spec` with its own configuration and run instructions.
|
|
939
|
-
SDK tests do not load `.env.test` implicitly; without Provider environment variables, the real smoke remains skipped.
|
|
940
|
-
Offline SDK tests continue to use `MockTransport`. Do not use the smoke flow against production, and never commit
|
|
941
|
-
Provider credentials.
|
|
942
|
-
|
|
943
|
-
## Reproducible release build
|
|
944
|
-
|
|
945
|
-
Build from a clean release commit (or its tag) and set the archive timestamp to that commit's
|
|
946
|
-
committer timestamp. `pyproject.toml` declares the supported Hatchling range, while `uv.lock` supplies the
|
|
947
|
-
exact version used by the frozen, no-build-isolation release environment:
|
|
948
|
-
|
|
949
|
-
```bash
|
|
950
|
-
export SOURCE_DATE_EPOCH="$(git show -s --format=%ct HEAD)"
|
|
951
|
-
uv sync --frozen
|
|
952
|
-
uv run python scripts/generate_models.py --check
|
|
953
|
-
uv build --no-build-isolation --out-dir dist/release
|
|
954
|
-
uv run python scripts/check_release.py dist/release/*.whl dist/release/*.tar.gz
|
|
955
|
-
(cd dist/release && sha256sum *.whl *.tar.gz > SHA256SUMS)
|
|
956
|
-
```
|
|
957
|
-
|
|
958
|
-
Rebuilding the same commit with the same locked environment and `SOURCE_DATE_EPOCH` must produce
|
|
959
|
-
byte-identical wheel and source distribution hashes. The SDK Contract pin is immutable `matelab-spec v2026.10.1`, commit
|
|
960
|
-
`9941e2d623a1c2633adb459b823d78d4e62d3802`, and OpenAPI SHA-256
|
|
961
|
-
`a07997128c1df17a03724c5af8e11b45a34166f9d6e15558e66e0a301f2e0813`.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Development and releases
|
|
2
|
+
|
|
3
|
+
Development, testing, versioning, and build procedures. See the [README](../README.md) for installation and quick start.
|
|
4
|
+
|
|
5
|
+
## Versioning
|
|
6
|
+
|
|
7
|
+
SDK versions describe public Python compatibility. During `0.x`, incompatible changes advance the minor version.
|
|
8
|
+
From `1.0.0`, compatible fixes advance patch, compatible additions advance minor, and incompatible changes advance major.
|
|
9
|
+
PEP 440 prereleases use `aN`, `bN`, or `rcN`; counters increase within each phase and restart at 1 for a new target version.
|
|
10
|
+
`[project].version` in `pyproject.toml` is the sole SDK version source.
|
|
11
|
+
|
|
12
|
+
Contract calendar versions identify wire snapshots independently. Each SDK release records its exact pin in the
|
|
13
|
+
Contract lock. Multiple SDK releases can share a Contract pin; adopting a new Contract changes the SDK version
|
|
14
|
+
according to its public impact.
|
|
15
|
+
|
|
16
|
+
## Development
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
uv sync --frozen
|
|
20
|
+
uv run python scripts/generate_models.py --check
|
|
21
|
+
uv run ruff check .
|
|
22
|
+
uv run ruff format --check .
|
|
23
|
+
uv run basedpyright
|
|
24
|
+
uv run pytest
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Choose checks by change type using the
|
|
28
|
+
[maintenance workflows](agent-workflows.md#delivery-gate).
|
|
29
|
+
Contract or generator changes regenerate private models with `uv run python scripts/generate_models.py` before checking.
|
|
30
|
+
`pyproject.toml` declares dependency minimums; `uv.lock` fixes the development and release environment.
|
|
31
|
+
|
|
32
|
+
## Opt-in Provider consumer smoke
|
|
33
|
+
|
|
34
|
+
The smoke checks authentication, complete Session persistence and restoration, refresh with identity preservation,
|
|
35
|
+
and notebook discovery through the SDK. Raw HTTP conformance remains in `matelab-spec`.
|
|
36
|
+
Both repositories can use the same isolated `matelab-test` service, with separate configuration files:
|
|
37
|
+
SDK `.env.test` and spec's existing `.env`.
|
|
38
|
+
|
|
39
|
+
Copy [.env.example](../.env.example) to the git-ignored SDK
|
|
40
|
+
`.env.test` and fill in `MATELAB_PROVIDER_BASE_URL`, `MATELAB_PROVIDER_USERNAME`, and `MATELAB_PROVIDER_PASSWORD`.
|
|
41
|
+
Tests read process environment variables; they do not load environment files implicitly. Ordinary `pytest` skips the
|
|
42
|
+
smoke when any variable is missing and runs it when all are set.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
uv run --env-file .env.test pytest -m provider tests/provider/test_provider_smoke.py
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Authentication and refresh persist Provider token state. Follow
|
|
49
|
+
[Provider validation](agent-workflows.md#provider-validation)
|
|
50
|
+
for target authorization and keep credentials out of Git.
|
|
51
|
+
|
|
52
|
+
## Reproducible release build
|
|
53
|
+
|
|
54
|
+
A `v*` release tag pushed to GitHub triggers CI to build twice, compare wheel/sdist bytes, audit artifacts, verify an
|
|
55
|
+
installed-wheel consumer, and publish to PyPI. Preparation follows the
|
|
56
|
+
[release workflow](agent-workflows.md#release).
|
|
57
|
+
|
|
58
|
+
Local builds are only needed for packaging changes or artifact diagnostics. To reproduce CI artifacts, use the release
|
|
59
|
+
tag's checkout and committer timestamp, the locked environment, and a temporary output directory:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
export SOURCE_DATE_EPOCH="$(git show -s --format=%ct HEAD)"
|
|
63
|
+
sdk_release_build_dir="$(mktemp -d)"
|
|
64
|
+
uv sync --frozen
|
|
65
|
+
uv build --no-build-isolation --out-dir "$sdk_release_build_dir"
|
|
66
|
+
uv run python scripts/check_release.py "$sdk_release_build_dir"/*.whl "$sdk_release_build_dir"/*.tar.gz
|
|
67
|
+
(cd "$sdk_release_build_dir" && sha256sum *.whl *.tar.gz > SHA256SUMS)
|
|
68
|
+
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Machine-readable operation inventory only.
|
|
1
|
+
# Machine-readable operation inventory only. Full interface documentation belongs in docs/api.md,
|
|
2
2
|
# and durable maintenance policy in AGENTS.md.
|
|
3
3
|
schema_version: 1
|
|
4
4
|
contract:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["hatchling>=1.32.4
|
|
2
|
+
requires = ["hatchling>=1.32.4"]
|
|
3
3
|
build-backend = "hatchling.build"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "matelab-python-sdk"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.0a4"
|
|
8
8
|
description = "Reusable async Python client for the Matelab Integration Contract"
|
|
9
9
|
requires-python = ">=3.11"
|
|
10
10
|
keywords = ["matelab", "electronic-lab-notebook", "eln", "asyncio", "sdk"]
|
|
@@ -12,11 +12,12 @@ authors = [
|
|
|
12
12
|
{ name = "CMPDC, Institute of Physics, Chinese Academy of Sciences" },
|
|
13
13
|
]
|
|
14
14
|
dependencies = [
|
|
15
|
-
"httpx2>=2.13.1
|
|
16
|
-
"jsonschema>=4.26.0
|
|
17
|
-
"pydantic>=2.13.5
|
|
18
|
-
"typing-extensions>=4.16.0
|
|
15
|
+
"httpx2>=2.13.1",
|
|
16
|
+
"jsonschema>=4.26.0",
|
|
17
|
+
"pydantic>=2.13.5",
|
|
18
|
+
"typing-extensions>=4.16.0",
|
|
19
19
|
]
|
|
20
|
+
readme = "README.md"
|
|
20
21
|
license = "Apache-2.0"
|
|
21
22
|
license-files = ["LICENSE", "NOTICE"]
|
|
22
23
|
classifiers = [
|
|
@@ -36,14 +37,14 @@ classifiers = [
|
|
|
36
37
|
|
|
37
38
|
[dependency-groups]
|
|
38
39
|
dev = [
|
|
39
|
-
"basedpyright>=1.40.1
|
|
40
|
+
"basedpyright>=1.40.1",
|
|
40
41
|
"nodejs-wheel-binaries==22.20.0",
|
|
41
|
-
"datamodel-code-generator>=0.83.0
|
|
42
|
-
"hatchling>=1.32.4
|
|
43
|
-
"pytest>=9.1.1
|
|
44
|
-
"pytest-asyncio>=1.4.0
|
|
45
|
-
"pyyaml>=6.0.3
|
|
46
|
-
"ruff>=0.16.10
|
|
42
|
+
"datamodel-code-generator>=0.83.0",
|
|
43
|
+
"hatchling>=1.32.4",
|
|
44
|
+
"pytest>=9.1.1",
|
|
45
|
+
"pytest-asyncio>=1.4.0",
|
|
46
|
+
"pyyaml>=6.0.3",
|
|
47
|
+
"ruff>=0.16.10",
|
|
47
48
|
]
|
|
48
49
|
|
|
49
50
|
[tool.ruff]
|
|
@@ -147,7 +147,6 @@ def _audit_sdist(path: Path) -> None:
|
|
|
147
147
|
if root != expected_root or path.name != f"{root}.tar.gz":
|
|
148
148
|
raise ValueError(f"{path.name} contains an unexpected source-distribution root")
|
|
149
149
|
required = {
|
|
150
|
-
f"{root}/CHANGELOG.md",
|
|
151
150
|
f"{root}/LICENSE",
|
|
152
151
|
f"{root}/NOTICE",
|
|
153
152
|
f"{root}/PKG-INFO",
|
|
@@ -113,7 +113,7 @@ def test_lockfile_mirrors_project_version() -> None:
|
|
|
113
113
|
assert sdk_packages[0]["version"] == project["version"]
|
|
114
114
|
|
|
115
115
|
|
|
116
|
-
def
|
|
116
|
+
def test_release_dependencies_publish_minimum_versions() -> None:
|
|
117
117
|
pyproject = tomllib.loads((_ROOT / "pyproject.toml").read_text())
|
|
118
118
|
build_system = cast(dict[str, object], pyproject["build-system"])
|
|
119
119
|
project = cast(dict[str, object], pyproject["project"])
|
|
@@ -124,7 +124,7 @@ def test_release_dependencies_publish_verified_compatibility_ranges() -> None:
|
|
|
124
124
|
dev = {requirement.name: requirement for requirement in map(Requirement, dependency_groups["dev"])}
|
|
125
125
|
assert all(requirement.specifier and requirement.url is None for requirement in (*runtime, *build, *dev.values()))
|
|
126
126
|
ranged = (*runtime, *build, *(requirement for name, requirement in dev.items() if name != "nodejs-wheel-binaries"))
|
|
127
|
-
assert all({bound.operator for bound in requirement.specifier} == {">="
|
|
127
|
+
assert all({bound.operator for bound in requirement.specifier} == {">="} for requirement in ranged)
|
|
128
128
|
assert {bound.operator for bound in dev["nodejs-wheel-binaries"].specifier} == {"=="}
|
|
129
129
|
assert build == [dev["hatchling"]]
|
|
130
130
|
assert project["license"] == "Apache-2.0"
|
|
@@ -362,7 +362,7 @@ wheels = [
|
|
|
362
362
|
|
|
363
363
|
[[package]]
|
|
364
364
|
name = "matelab-python-sdk"
|
|
365
|
-
version = "0.2.
|
|
365
|
+
version = "0.2.0a4"
|
|
366
366
|
source = { editable = "." }
|
|
367
367
|
dependencies = [
|
|
368
368
|
{ name = "httpx2" },
|
|
@@ -385,22 +385,22 @@ dev = [
|
|
|
385
385
|
|
|
386
386
|
[package.metadata]
|
|
387
387
|
requires-dist = [
|
|
388
|
-
{ name = "httpx2", specifier = ">=2.13.1
|
|
389
|
-
{ name = "jsonschema", specifier = ">=4.26.0
|
|
390
|
-
{ name = "pydantic", specifier = ">=2.13.5
|
|
391
|
-
{ name = "typing-extensions", specifier = ">=4.16.0
|
|
388
|
+
{ name = "httpx2", specifier = ">=2.13.1" },
|
|
389
|
+
{ name = "jsonschema", specifier = ">=4.26.0" },
|
|
390
|
+
{ name = "pydantic", specifier = ">=2.13.5" },
|
|
391
|
+
{ name = "typing-extensions", specifier = ">=4.16.0" },
|
|
392
392
|
]
|
|
393
393
|
|
|
394
394
|
[package.metadata.requires-dev]
|
|
395
395
|
dev = [
|
|
396
|
-
{ name = "basedpyright", specifier = ">=1.40.1
|
|
397
|
-
{ name = "datamodel-code-generator", specifier = ">=0.83.0
|
|
398
|
-
{ name = "hatchling", specifier = ">=1.32.4
|
|
396
|
+
{ name = "basedpyright", specifier = ">=1.40.1" },
|
|
397
|
+
{ name = "datamodel-code-generator", specifier = ">=0.83.0" },
|
|
398
|
+
{ name = "hatchling", specifier = ">=1.32.4" },
|
|
399
399
|
{ name = "nodejs-wheel-binaries", specifier = "==22.20.0" },
|
|
400
|
-
{ name = "pytest", specifier = ">=9.1.1
|
|
401
|
-
{ name = "pytest-asyncio", specifier = ">=1.4.0
|
|
402
|
-
{ name = "pyyaml", specifier = ">=6.0.3
|
|
403
|
-
{ name = "ruff", specifier = ">=0.16.10
|
|
400
|
+
{ name = "pytest", specifier = ">=9.1.1" },
|
|
401
|
+
{ name = "pytest-asyncio", specifier = ">=1.4.0" },
|
|
402
|
+
{ name = "pyyaml", specifier = ">=6.0.3" },
|
|
403
|
+
{ name = "ruff", specifier = ">=0.16.10" },
|
|
404
404
|
]
|
|
405
405
|
|
|
406
406
|
[[package]]
|