matelab-python-sdk 0.1.0a24__tar.gz → 0.2.0a3__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/.env.example +7 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/.github/workflows/release.yml +2 -2
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/AGENTS.md +14 -9
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/CHANGELOG.md +55 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/CONTEXT.md +5 -0
- matelab_python_sdk-0.2.0a3/PKG-INFO +26 -0
- matelab_python_sdk-0.1.0a24/PKG-INFO → matelab_python_sdk-0.2.0a3/README.md +100 -89
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/contracts/matelab-integration-v1.lock.json +3 -3
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/contracts/matelab-integration-v1.openapi.yaml +465 -140
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/docs/agent-architecture.md +2 -1
- matelab_python_sdk-0.2.0a3/docs/agent-workflows.md +129 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/docs/operation-coverage.yaml +22 -22
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/pyproject.toml +21 -22
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/scripts/check_release.py +6 -9
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/scripts/generate_models.py +11 -1
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/__init__.py +2 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/_generated/models.py +489 -170
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/_transport.py +7 -4
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/domains/cloud_drive.py +1 -1
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/domains/groups.py +6 -2
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/domains/literature.py +11 -1
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/domains/notebooks.py +4 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/domains/records.py +70 -33
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/streaming.py +1 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_async_attachment_upload.py +1 -18
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_client.py +4 -1
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_cloud_drive.py +10 -5
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_comments_and_downloads.py +62 -1
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_extended_records.py +32 -4
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_generation.py +48 -20
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_groups.py +4 -1
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_notebook_lifecycle.py +33 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_operation_coverage.py +0 -2
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_record_lifecycle.py +1 -15
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_record_mutations.py +172 -2
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_records.py +75 -4
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_release.py +34 -42
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_streaming.py +93 -8
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_transport.py +12 -15
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_uploads_and_literature.py +87 -0
- matelab_python_sdk-0.2.0a3/uv.lock +940 -0
- matelab_python_sdk-0.1.0a24/.env.example +0 -14
- matelab_python_sdk-0.1.0a24/README.md +0 -922
- matelab_python_sdk-0.1.0a24/docs/agent-workflows.md +0 -76
- matelab_python_sdk-0.1.0a24/uv.lock +0 -921
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/.gitignore +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/LICENSE +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/NOTICE +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/scripts/check_installed_package.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/_generated/__init__.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/_hashes.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/_wire_validation.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/client.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/domains/__init__.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/domains/_attachment_content.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/domains/templates.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/domains/uploads.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/domains/users.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/errors.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/py.typed +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/src/matelab/session.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/conftest.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/provider/test_provider_smoke.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_consumer_smoke.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_errors.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_notebooks.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_template_lifecycle.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_templates.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/test_users.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/typing/consumer.py +0 -0
- {matelab_python_sdk-0.1.0a24 → matelab_python_sdk-0.2.0a3}/tests/typing/pyproject.toml +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# SDK Provider smoke targets the confirmed isolated test service.
|
|
2
|
+
# Configure this repository's .env.test independently of matelab-spec.
|
|
3
|
+
# Authentication and external-token refresh persist Provider token state.
|
|
4
|
+
# Keep these names aligned with matelab-spec Provider Verification.
|
|
5
|
+
MATELAB_PROVIDER_BASE_URL=
|
|
6
|
+
MATELAB_PROVIDER_USERNAME=
|
|
7
|
+
MATELAB_PROVIDER_PASSWORD=
|
|
@@ -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<2,>=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" \
|
|
@@ -116,4 +116,4 @@ jobs:
|
|
|
116
116
|
name: python-package-distributions
|
|
117
117
|
path: dist
|
|
118
118
|
- name: Publish distributions
|
|
119
|
-
uses: pypa/gh-action-pypi-publish@
|
|
119
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
## 维护顺序
|
|
6
6
|
|
|
7
7
|
1. **定界**:先读 `git status` 和适用权威;完成标准是任务范围、用户现有改动和所需外部权限均已识别。
|
|
8
|
-
2.
|
|
9
|
-
request、response、security、examples、成功码及 PVD/PCG
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
4.
|
|
8
|
+
2. **查证**:涉及 SDK 行为或 Contract 时,沿 public intent → wire operation → Provider evidence 核对受影响
|
|
9
|
+
operation 的 request、response、security、examples、成功码及 PVD/PCG,明确报告 Contract 缺口。文档、排版和
|
|
10
|
+
工具配置修改只核对相关权威。
|
|
11
|
+
3. **收敛**:只修改任务必需的层,检查 public、adapter、generated、tests、coverage 和 docs 中受影响的内容。
|
|
12
|
+
4. **验证**:按变更类型选择 [delivery gate](docs/agent-workflows.md#delivery-gate),先运行相关检查;代码变更先跑
|
|
13
|
+
聚焦测试,再跑完整门槛。完成标准是必需命令全部退出为零,skip 和 deselected 分别说明。
|
|
13
14
|
5. **交付**:复核最终 diff、状态和验证证据;完成标准是结果、限制和未执行项都可由用户独立核对。
|
|
14
15
|
|
|
15
16
|
## 分支指针
|
|
@@ -20,11 +21,13 @@
|
|
|
20
21
|
[`docs/agent-architecture.md#transport-session-and-errors`](docs/agent-architecture.md#transport-session-and-errors)。
|
|
21
22
|
- **Contract adoption**:同步 spec tag、snapshot、lock 或生成模型时执行
|
|
22
23
|
[`docs/agent-workflows.md#contract-adoption`](docs/agent-workflows.md#contract-adoption)。
|
|
23
|
-
- **
|
|
24
|
+
- **Configuration and dependencies**:修改 `pyproject.toml`、依赖范围、lock 或对应 CI 配置时读
|
|
25
|
+
[`docs/agent-workflows.md#configuration-and-dependencies`](docs/agent-workflows.md#configuration-and-dependencies)。
|
|
26
|
+
- **Delivery gate**:交付前按变更类型执行
|
|
24
27
|
[`docs/agent-workflows.md#delivery-gate`](docs/agent-workflows.md#delivery-gate)。
|
|
25
28
|
- **Provider validation**:任何实时 Provider smoke、读取或 mutation 前执行
|
|
26
29
|
[`docs/agent-workflows.md#provider-validation`](docs/agent-workflows.md#provider-validation)。
|
|
27
|
-
- **Release
|
|
30
|
+
- **Release**:准备版本或发布制品时执行;普通 commit/push 只应用其中的授权与 diff 审查要求
|
|
28
31
|
[`docs/agent-workflows.md#release`](docs/agent-workflows.md#release)。
|
|
29
32
|
|
|
30
33
|
## 权威
|
|
@@ -48,5 +51,7 @@
|
|
|
48
51
|
仓库只作只读证据来源。
|
|
49
52
|
- `/home/tnzhu/projects/matelab-spec` 定义 Wire Contract、兼容策略及 Provider 问题;`matelab-server` 是 Provider
|
|
50
53
|
实现,`matelab-mcp` 只提供 Consumer evidence,均不能反向定义 SDK interface。
|
|
51
|
-
-
|
|
52
|
-
|
|
54
|
+
- SDK 与 spec 可以使用同一个 Docker 测试服务,各自维护环境配置和测试职责;修改 SDK 不授权修改邻接仓库或
|
|
55
|
+
运行 spec 测试。
|
|
56
|
+
- commit、push、tag、publish、生产访问和真实 Provider mutation 需要用户对目标及副作用的明确授权。沿用会话中
|
|
57
|
+
已有的有效授权;只在目标、副作用超出授权或必要信息缺失时再询问。
|
|
@@ -3,6 +3,61 @@
|
|
|
3
3
|
This file records release-to-release changes and migration impact. It is not the authority for the current interface;
|
|
4
4
|
see [README.md](README.md) for current behavior and [AGENTS.md](AGENTS.md) for maintenance policy.
|
|
5
5
|
|
|
6
|
+
## 0.2.0a3 - 2026-10-02
|
|
7
|
+
|
|
8
|
+
- Updates the pinned PyPI publishing action to v1.14.2, whose Twine 7 supports the Core Metadata 2.5 emitted by
|
|
9
|
+
Hatchling 1.32.4. Publishes the changes recorded under `0.2.0a2`; that candidate passed SDK and artifact checks but
|
|
10
|
+
was not uploaded to PyPI because the previous publisher rejected its metadata version.
|
|
11
|
+
|
|
12
|
+
## 0.2.0a2 - 2026-10-02
|
|
13
|
+
|
|
14
|
+
- Raises runtime and build dependency lower bounds to validated stable releases and uses compatible
|
|
15
|
+
development tool ranges, retaining `nodejs-wheel-binaries==22.20.0` as the sole system-specific exact pin. Refreshes
|
|
16
|
+
the lock against PyPI and aligns the installed-wheel CI checker with the declared Basedpyright range.
|
|
17
|
+
- Release artifact auditing compares dependency metadata with `pyproject.toml`, and release tests verify version
|
|
18
|
+
constraints and CI consistency without freezing dependency update values.
|
|
19
|
+
- Sets the distribution author to CMPDC, Institute of Physics, Chinese Academy of Sciences.
|
|
20
|
+
- Documents that SDK smoke can use the same isolated test service as spec while each repository keeps its own test
|
|
21
|
+
configuration; limits the SDK environment template to its smoke connection settings. Clarifies maintenance
|
|
22
|
+
validation by change type, keeps the default gate offline, and records the project and Basedpyright field order.
|
|
23
|
+
- Fixes rich-text and comment attachment markers whose names share a prefix, preserving exact attachment bindings
|
|
24
|
+
regardless of mapping order.
|
|
25
|
+
- Keeps download rejection errors within the public SDK error boundary when response cleanup fails.
|
|
26
|
+
- Consolidates duplicate attachment tests and removes documentation, formatting, and current operation-count
|
|
27
|
+
assertions. Strengthens SDK stream lifecycle and upload metadata validation coverage with controlled offline fixtures.
|
|
28
|
+
|
|
29
|
+
## 0.2.0a1 - 2026-10-02
|
|
30
|
+
|
|
31
|
+
- Establishes the `0.x` versioning rule: incompatible public changes advance the SDK minor version; alpha/beta/RC
|
|
32
|
+
counters identify successive candidates for the same target version. SDK and Contract versions remain independent.
|
|
33
|
+
- Adopts immutable `matelab-spec v2026.10.1` at commit `9941e2d623a1c2633adb459b823d78d4e62d3802`
|
|
34
|
+
(annotated tag object `ae8098e1b5178b69706bddd8b70c1b4cfe3e09ba`) and OpenAPI SHA-256
|
|
35
|
+
`a07997128c1df17a03724c5af8e11b45a34166f9d6e15558e66e0a301f2e0813`, aligned with Provider evidence
|
|
36
|
+
`3f39d47b7ad43bed618b029a7d9cc51fab852eb6`. The Contract's calendar version identifies a Provider-specific
|
|
37
|
+
snapshot verified on an isolated Workerman instance with local data servers.
|
|
38
|
+
- Breaking: record JSON operations accept business code `0` only; Provider-internal forwarding code `10` is outside
|
|
39
|
+
the verified callable scope and raises `MatelabProtocolError` (PVD-049). Search aliases additionally reserve
|
|
40
|
+
`eln_id`, `title`, and `eln_name`; extraction paths reject numeric strings, negative indices and a numeric fourth
|
|
41
|
+
segment before HTTP. Generation retains these referenced scalar and positional JSON Schema constraints.
|
|
42
|
+
- Adds `Record.encrypted_modules` and public `EncryptedRecordModules`, preserving ciphertext and additive fields
|
|
43
|
+
without decryption. Encrypted reads have no plaintext modules or attachment refs. State-dependent updates reject
|
|
44
|
+
encrypted content locally; stateless module changes retain the Provider's pre-write password check. Unresolved
|
|
45
|
+
author descriptors map to `author_name=None` while remaining validated in the private wire layer (PVD-044).
|
|
46
|
+
- Restores `RecordFilesAttachmentAppend.folder_path` after the dedicated shape became valid within the top-level
|
|
47
|
+
update request. A non-empty path uses the staged-name finalizer, validates safe segments and requires an exclusive
|
|
48
|
+
mutation; reuse and ambiguous-finalization protections remain in effect (PVD-030). Inline base64 file input remains
|
|
49
|
+
outside the public write boundary (PVD-042).
|
|
50
|
+
- Breaking: `GroupSummary.ref` can be `None` for a dangling membership (PVD-048), and `CloudFile.modified_at` is now
|
|
51
|
+
a required string because stored null timestamps fail before a successful Provider row is returned (PVD-047).
|
|
52
|
+
Notebook reads accept non-null JSON type settings, but metadata updates reject settings or extraction requests that
|
|
53
|
+
cannot be preserved within the write Contract before mutation (PVD-046).
|
|
54
|
+
- Literature metadata extraction maps nested Provider errors to the usual safe SDK errors. Empty or opaque lists
|
|
55
|
+
raise `MatelabProtocolError` instead of being presented as publication candidates (PVD-045).
|
|
56
|
+
- Allows zero-byte comment attachment discovery/downloads and documents the 4097-byte cap on local open ranges
|
|
57
|
+
beginning at zero. Download metadata remains available for explicit continuation; no automatic replay is added.
|
|
58
|
+
- Retains the existing read-only missing table-attachment timestamp containment and the unexposed password,
|
|
59
|
+
signing, record-title-update and structured-error-detail capabilities.
|
|
60
|
+
|
|
6
61
|
## 0.1.0a24 - 2026-09-26
|
|
7
62
|
|
|
8
63
|
- Adopts immutable `matelab-spec v0.5.0` at commit `4f2959472933da47d1ea3e275552884d51d4fdd9`
|
|
@@ -85,6 +85,11 @@ A template-shaped value composed of JSON-compatible scalars and containers, with
|
|
|
85
85
|
allowed wherever the template expects a file.
|
|
86
86
|
_Avoid_: Arbitrary object, stored record module, Provider attachment reference
|
|
87
87
|
|
|
88
|
+
**Encrypted record modules**:
|
|
89
|
+
Stored ciphertext returned without decryption, separate from a record's available plaintext modules and attachments.
|
|
90
|
+
The encrypted descriptor is read evidence; it does not provide a decryption or password management interface.
|
|
91
|
+
_Avoid_: Empty record content, decrypted modules
|
|
92
|
+
|
|
88
93
|
**Staged attachment**:
|
|
89
94
|
An upload prepared in a selected notebook for one later record import or update; uploading does not choose the target
|
|
90
95
|
record.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: matelab-python-sdk
|
|
3
|
+
Version: 0.2.0a3
|
|
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<3,>=2.13.1
|
|
24
|
+
Requires-Dist: jsonschema<5,>=4.26.0
|
|
25
|
+
Requires-Dist: pydantic<3,>=2.13.5
|
|
26
|
+
Requires-Dist: typing-extensions<5,>=4.16.0
|
|
@@ -1,31 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: matelab-python-sdk
|
|
3
|
-
Version: 0.1.0a24
|
|
4
|
-
Summary: Reusable async Python client for the Matelab Integration Contract
|
|
5
|
-
Author-email: 朱天念 <zhutiannian@gmail.com>
|
|
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<3,>=2.9.1
|
|
24
|
-
Requires-Dist: jsonschema<5,>=4.26
|
|
25
|
-
Requires-Dist: pydantic<3,>=2.13.4
|
|
26
|
-
Requires-Dist: typing-extensions<5,>=4.14.1
|
|
27
|
-
Description-Content-Type: text/markdown
|
|
28
|
-
|
|
29
1
|
# matelab-python-sdk
|
|
30
2
|
|
|
31
3
|
Reusable async Python client for the Matelab Integration Contract.
|
|
@@ -35,14 +7,14 @@ This README describes the current SDK interface, integration semantics, examples
|
|
|
35
7
|
[AGENTS.md](AGENTS.md) for durable maintenance rules, and `docs/operation-coverage.yaml` for the machine-readable
|
|
36
8
|
operation inventory.
|
|
37
9
|
|
|
38
|
-
The current alpha is `0.
|
|
10
|
+
The current alpha is `0.2.0a3`. `[project].version` in `pyproject.toml` is the sole SDK version source;
|
|
39
11
|
`uv.lock` only mirrors that source.
|
|
40
12
|
|
|
41
|
-
The SDK is pinned to the immutable `matelab-spec
|
|
42
|
-
`contracts/matelab-integration-v1.lock.json`, records peeled commit `
|
|
13
|
+
The SDK is pinned to the immutable `matelab-spec v2026.10.1` Contract Release. The sole pin,
|
|
14
|
+
`contracts/matelab-integration-v1.lock.json`, records peeled commit `9941e2d623a1c2633adb459b823d78d4e62d3802`,
|
|
43
15
|
source `openapi/matelab-integration-v1.openapi.yaml`, the local snapshot path, and SHA-256
|
|
44
|
-
`
|
|
45
|
-
`
|
|
16
|
+
`a07997128c1df17a03724c5af8e11b45a34166f9d6e15558e66e0a301f2e0813`. The annotated tag object is
|
|
17
|
+
`ae8098e1b5178b69706bddd8b70c1b4cfe3e09ba`.
|
|
46
18
|
|
|
47
19
|
## Installation
|
|
48
20
|
|
|
@@ -66,18 +38,33 @@ To test the same artifact a downstream Consumer will install, build and install
|
|
|
66
38
|
|
|
67
39
|
```bash
|
|
68
40
|
uv build --no-build-isolation --out-dir dist/release
|
|
69
|
-
python -m pip install dist/release/matelab_python_sdk-0.
|
|
41
|
+
python -m pip install dist/release/matelab_python_sdk-0.2.0a3-py3-none-any.whl
|
|
70
42
|
```
|
|
71
43
|
|
|
72
44
|
Do not infer Provider compatibility from the SDK version alone. A release is also bound to the Contract
|
|
73
45
|
tag, commit, and checksum recorded below.
|
|
74
46
|
|
|
75
|
-
The Contract uses Provider source evidence from `
|
|
47
|
+
The Contract uses Provider source evidence from `3f39d47b7ad43bed618b029a7d9cc51fab852eb6`; v2026.10.1 validation ran
|
|
76
48
|
against an isolated test instance and does not establish production behavior. The corresponding Front Consumer evidence
|
|
77
49
|
is `0c985f5b6da8e8ef4627ca7065cea85e408ae981`; it informs cross-Consumer capability review but does not define the SDK
|
|
78
50
|
interface. Provider limitations that remain relevant to integrations are documented alongside the affected interfaces
|
|
79
51
|
below.
|
|
80
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
|
|
58
|
+
|
|
59
|
+
SDK versions express compatibility of the public Python interface and behavior. Python prerelease spelling follows
|
|
60
|
+
PEP 440: `0.2.0a3` is the third alpha candidate for `0.2.0`. During `0.x` development, incompatible changes advance
|
|
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.
|
|
67
|
+
|
|
81
68
|
## Design
|
|
82
69
|
|
|
83
70
|
The public module is intentionally small:
|
|
@@ -111,7 +98,7 @@ category:
|
|
|
111
98
|
| `MatelabUsageError` | `VALIDATION` | No | The call cannot be represented safely; correct its arguments. |
|
|
112
99
|
| `MatelabProviderError` | `BUSINESS`, `VALIDATION`, or `UPSTREAM` | No | The Provider rejected the request; record `provider_code` and route recovery by `category`; `provider_message` is an SDK-owned safe summary. |
|
|
113
100
|
| `MatelabTransportError` | `UPSTREAM` | No | The HTTP exchange failed; `status_code` is present for HTTP failures, and a mutation outcome may be unknown. |
|
|
114
|
-
| `MatelabProtocolError` | `UPSTREAM` | No | The response violates the pinned Contract;
|
|
101
|
+
| `MatelabProtocolError` | `UPSTREAM` | No | The response violates the pinned Contract or cannot supply the structured result required by the SDK operation; inspect the Provider result or SDK boundary. |
|
|
115
102
|
|
|
116
103
|
For `MatelabProviderError`, the SDK maps Provider wire code `2` to `BUSINESS`, `4` to `VALIDATION`, and `3` or an
|
|
117
104
|
unknown code to `UPSTREAM`. `provider_code` is diagnostic metadata, not a stable routing identifier, and integrations
|
|
@@ -120,12 +107,12 @@ selected from the code mapping; they do not reproduce Provider-authored text. Au
|
|
|
120
107
|
`MatelabAuthenticationError`; code `5`
|
|
121
108
|
triggers at most one refresh and replay only for authenticated operations that explicitly enable
|
|
122
109
|
`retry_on_access_expired`, otherwise codes `1` and `5` raise `MatelabAuthenticationError` directly.
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
Record operations accept business code `0`. Provider-internal forwarding code `10` is outside the pinned
|
|
111
|
+
callable Contract and raises `MatelabProtocolError` rather than assigning an error category.
|
|
125
112
|
`MatelabTransportError.status_code` remains available for HTTP failures. Provider response bodies, top-level `msg`,
|
|
126
113
|
legacy `errmsg`, opaque `errs`, uncontracted debug fields, and request payloads are not attached to exceptions because
|
|
127
114
|
Provider-authored diagnostics may contain stack traces, credentials, or submitted values.
|
|
128
|
-
The pinned
|
|
115
|
+
The pinned v2026.10.1 Contract also declares optional code-4 `errs`, but PVD-029 and PCG-010 record opaque array/object
|
|
129
116
|
containers and insufficient evidence for requiredness, cardinality, or exclusion from other codes. The SDK
|
|
130
117
|
therefore keeps those diagnostics wire-only and does not expose `errs` as stable public metadata. A typed detail
|
|
131
118
|
interface remains blocked until a future Contract release can define one from stronger Provider evidence. `retryable`
|
|
@@ -319,11 +306,10 @@ These three operations use the Provider's staged-name finalizer and must be the
|
|
|
319
306
|
supports one file column. A locally rejected target does not spend the handle; once transport starts, an ambiguous
|
|
320
307
|
result cannot be retried through the same client.
|
|
321
308
|
|
|
322
|
-
Files-module append and table/files replacement
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
until that wire-schema conflict is resolved (PVD-030):
|
|
309
|
+
Files-module append at the module root and table/files replacement may be combined with other non-conflicting record
|
|
310
|
+
changes. `RecordFilesAttachmentAppend.folder_path` optionally selects folders within the files module. A non-empty
|
|
311
|
+
path uses the staged-name finalizer and must be the only mutation in its update request; the SDK validates every
|
|
312
|
+
segment before writing to avoid the Provider's malformed-path fallback to the module root (PVD-030):
|
|
327
313
|
|
|
328
314
|
```python
|
|
329
315
|
from matelab import RecordAttachmentReplacement, RecordFilesAttachmentAppend, RecordValueUpdate
|
|
@@ -337,6 +323,15 @@ await client.records.update(
|
|
|
337
323
|
)
|
|
338
324
|
```
|
|
339
325
|
|
|
326
|
+
To append within a folder, use a fresh upload in a separate update:
|
|
327
|
+
|
|
328
|
+
```python
|
|
329
|
+
await client.records.update(
|
|
330
|
+
source,
|
|
331
|
+
(RecordFilesAttachmentAppend(module="Files", attachment=folder_uploaded, folder_path=("Evidence", "Raw Data")),),
|
|
332
|
+
)
|
|
333
|
+
```
|
|
334
|
+
|
|
340
335
|
For `RecordModuleCreation(module_type="code", language="json", style="echarts")`, omitted, null, and empty `data` all
|
|
341
336
|
produce an empty string; explicit `"0"` stays `"0"`. Send the desired initial chart configuration as a JSON code string.
|
|
342
337
|
Richtext/code module creation defaults missing `data` to `""`; form/table/files creation ignores it and initializes
|
|
@@ -480,6 +475,8 @@ rather than repeated as a constant result field. The Provider's members for an u
|
|
|
480
475
|
group order is unstable and user search is unpaged, unordered and not field-minimized (PVD-017, PVD-025).
|
|
481
476
|
`GroupSummary.notebook_creation_available` expresses whether the group can currently host notebook creation without
|
|
482
477
|
exposing the Provider's data-server routing value.
|
|
478
|
+
An observed dangling group membership has `GroupSummary.ref=None` and no usable group identity. If such a membership
|
|
479
|
+
is selected as the Provider's first group, the whole request can fail with a Provider error (PVD-048).
|
|
483
480
|
|
|
484
481
|
Notebook create and direct sharing use the Provider acknowledgement without an automatic follow-up read:
|
|
485
482
|
|
|
@@ -505,6 +502,9 @@ is reused by record pages instead of maintaining a second nearly identical permi
|
|
|
505
502
|
have implicit read access even when every optional permission is false (PVD-037).
|
|
506
503
|
`provider_signing_allowed` only represents Provider policy, not an SDK signing operation. Share-list order remains
|
|
507
504
|
unspecified.
|
|
505
|
+
Stored notebook type configuration may decode to any non-null JSON value, but metadata writes accept arrays only.
|
|
506
|
+
If the stored configuration or display extraction requests cannot be preserved within the write Contract, update
|
|
507
|
+
raises `MatelabProtocolError` before sending a mutation instead of silently replacing them (PVD-046).
|
|
508
508
|
|
|
509
509
|
Template discovery keeps a template database identity separate from direct-share, market-acquisition, and group
|
|
510
510
|
relation identities:
|
|
@@ -574,6 +574,9 @@ relations = await client.records.relations(source)
|
|
|
574
574
|
as `modules`; it is not the template-shaped `RecordImportItem.data` accepted by record import.
|
|
575
575
|
`records.search()` maps each requested field name to a stored record path. A match exposes only Provider-returned
|
|
576
576
|
entries in `values`, so key membership distinguishes an absent result from an explicit JSON `null`.
|
|
577
|
+
Extraction aliases cannot use `id`, `uid`, `eln_id`, `title`, or `eln_name`, which would overwrite result metadata
|
|
578
|
+
(PVD-043). Paths contain one to four segments: the first three accept non-empty, non-numeric names or non-negative
|
|
579
|
+
integer indices; a fourth segment must be a non-numeric property name. Numeric strings are rejected before HTTP.
|
|
577
580
|
The current Provider excludes encrypted records from search (PVD-041); an empty search result therefore does
|
|
578
581
|
not prove that no matching encrypted record exists.
|
|
579
582
|
|
|
@@ -597,8 +600,7 @@ Public summaries keep source notebook attribution but omit the Provider's unused
|
|
|
597
600
|
email; their `notebook_title` follows the same naming used by export and search results. Relation refs retain only the
|
|
598
601
|
stored relation row and declared target IDs; nullable JOIN previews and resolved target identity stay wire-only.
|
|
599
602
|
Search and relation order remain unspecified, and no continuation token is invented. Export and search return tuples
|
|
600
|
-
directly
|
|
601
|
-
shape.
|
|
603
|
+
directly. Remote data-server forwarding code `10` is rejected because only local data-server results are covered.
|
|
602
604
|
`DeletedRecordPage` does not repeat its input notebook.
|
|
603
605
|
|
|
604
606
|
Record creation keeps blank creation and structured import as separate capabilities:
|
|
@@ -643,11 +645,16 @@ ordinary module creation and deletion rely on the Provider's own canonical updat
|
|
|
643
645
|
returns the acknowledgement classification
|
|
644
646
|
`"persisted"`, `"pending"`, or `"unknown"`; it does not
|
|
645
647
|
issue a post-write read. Database, active-browser, and unclassified acknowledgements remain distinct, and mutation
|
|
646
|
-
retries stay disabled.
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
648
|
+
retries stay disabled. Business code `0` alone does not distinguish persisted data from a browser collaboration
|
|
649
|
+
broadcast; the classification uses the observed Provider acknowledgement and supplies no revision or atomicity
|
|
650
|
+
guarantee. Current collaboration peers must be browsers viewing the same notebook and record.
|
|
651
|
+
Encrypted reads return `Record.encrypted_modules` as an `EncryptedRecordModules` containing the ciphertext,
|
|
652
|
+
algorithm and additive fields; `modules` and `attachments` are empty because no plaintext is available. Plaintext
|
|
653
|
+
reads have `encrypted_modules=None`. State-dependent updates reject encrypted content before mutation, while
|
|
654
|
+
ordinary module changes rely on the Provider's password validation before any write. The password and decryption
|
|
655
|
+
lifecycle remain unexposed. The list-level `RecordSummary.encrypted` flag remains available for discovery.
|
|
656
|
+
Unresolved author lookup descriptors remain wire-only and map to `author_name=None` on records and comments (PVD-044).
|
|
657
|
+
A staged attachment is indeterminate once the write has started.
|
|
651
658
|
|
|
652
659
|
Relation addition reads both endpoints and checks their resolved data server before writing; this reduces PVD-009
|
|
653
660
|
risk but is not an atomic Provider authorization guarantee. It does not list relations merely to inspect the
|
|
@@ -687,6 +694,9 @@ async with await client.records.download_comment_attachment(
|
|
|
687
694
|
|
|
688
695
|
`DownloadStream` exposes status, content type, length, range, and disposition metadata without buffering the
|
|
689
696
|
complete file. Streams are not automatically replayed. `ByteRange` deliberately rejects `bytes=0-0` (PVD-015).
|
|
697
|
+
For local files, `ByteRange.from_start(0)` returns at most the first 4097 bytes. Inspect `content_range` and request
|
|
698
|
+
the next range starting at its end plus one, use a positive explicit end, or omit `byte_range` for the full file.
|
|
699
|
+
Zero-byte comment attachments can be discovered and downloaded without a range.
|
|
690
700
|
Comment attachment refs contain only file identity. Pass the parent comment ref returned by the same read when
|
|
691
701
|
downloading; current Providers do not verify that association (PVD-006).
|
|
692
702
|
|
|
@@ -741,6 +751,10 @@ returns a `PublicationMetadataCandidate`: unstored, rich publication evidence ra
|
|
|
741
751
|
a literature item. Its structured authors are `PublicationAuthorCandidate` values. Extraction accepts a DOI, a
|
|
742
752
|
completed staged PDF, or both; a supplied DOI takes precedence over the staged PDF. A non-empty DOI must match
|
|
743
753
|
`^10\.[0-9]+/\S+$`; the generated request model rejects other values before sending them to the Provider (PVD-040).
|
|
754
|
+
The Provider can wrap an error inside an outer successful extraction response. The SDK maps that nested error to
|
|
755
|
+
its usual safe Provider/authentication error. Empty or opaque backend lists raise `MatelabProtocolError` because they
|
|
756
|
+
provide no structured `PublicationMetadataCandidate`; an outer success code does not promise extracted metadata
|
|
757
|
+
(PVD-045).
|
|
744
758
|
Literature list
|
|
745
759
|
results likewise exclude Provider-generated citation HTML and author-highlight fragments; Consumers receive the
|
|
746
760
|
underlying citation fields instead of presentation markup. `LiteratureDetail.metadata` is `None` when invalid legacy
|
|
@@ -797,8 +811,8 @@ snapshot and quota usage; pagination applies only to `files`, while request page
|
|
|
797
811
|
metadata and permissions are synthetic/fixed for this Contract line and remain wire-only. File rows omit the constant
|
|
798
812
|
caller owner fields and do not invent a folder location that the Provider fails to return for root-wide searches.
|
|
799
813
|
Listings likewise omit search/order/direction request echoes. Ordering has no stable ID tie-breaker (PCG-011, PVD-038).
|
|
800
|
-
|
|
801
|
-
time
|
|
814
|
+
`CloudFile.modified_at` contains the stored modification timestamp as a non-null string. A stored null causes a
|
|
815
|
+
Provider error before a successful file row can be returned (PVD-047). Display-formatted date and time remain wire-only.
|
|
802
816
|
|
|
803
817
|
Folder create returns a `CloudFolderRef` built from the Provider ID. Other folder and file mutations return `None`
|
|
804
818
|
after acknowledgement and do not automatically list the drive. Staged finalize accepts a completed `StagedFile`;
|
|
@@ -832,8 +846,9 @@ names or groups, so those fields are `None`. Public summary and creation time re
|
|
|
832
846
|
Contract, while the unified model uses the wider owned/shared nullable types.
|
|
833
847
|
|
|
834
848
|
Provider `types`, `display`, and `requests` fields configure its notebook-list UI rather than notebook domain data.
|
|
835
|
-
`types`
|
|
836
|
-
fields are
|
|
849
|
+
`types` normally holds classification tags used by the Provider frontend for client-side filtering; legacy stored JSON
|
|
850
|
+
can have another non-null shape. These fields are absent from `NotebookSummary` and from create/update inputs;
|
|
851
|
+
the SDK handles their update-time
|
|
837
852
|
preservation only as an internal Provider compatibility detail.
|
|
838
853
|
|
|
839
854
|
Template render metadata is also excluded from template summaries and record reads. A `Record` has one
|
|
@@ -857,16 +872,20 @@ aliases, and unrelated fields do not enter exceptions.
|
|
|
857
872
|
## Development
|
|
858
873
|
|
|
859
874
|
```bash
|
|
860
|
-
uv sync
|
|
861
|
-
uv run python scripts/generate_models.py
|
|
875
|
+
uv sync --frozen
|
|
862
876
|
uv run python scripts/generate_models.py --check
|
|
863
877
|
uv run ruff check .
|
|
864
878
|
uv run ruff format --check .
|
|
865
879
|
uv run basedpyright
|
|
866
|
-
uv run pytest
|
|
867
|
-
uv build
|
|
880
|
+
uv run pytest -m 'not provider'
|
|
881
|
+
uv build --no-build-isolation
|
|
868
882
|
```
|
|
869
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
|
+
|
|
870
889
|
The generator first verifies the contract lock, OpenAPI release metadata, and snapshot digest. It then
|
|
871
890
|
creates a temporary OpenAPI 3.1 generation projection, resolves references without network access, and
|
|
872
891
|
generates private component, operation-response, and parameter models. Generator emission uses its built-in formatter;
|
|
@@ -875,23 +894,19 @@ projection flattens pure
|
|
|
875
894
|
object inheritance and preserves constraints the model generator cannot express as self-contained JSON Schema
|
|
876
895
|
2020-12 metadata; the checked-in release snapshot remains unchanged. `--check` performs the same validation and
|
|
877
896
|
deterministic generation without writing the checked-in models. `WireModel` applies that metadata with the standard
|
|
878
|
-
`jsonschema` Draft 2020-12 validator; the SDK does not maintain a second hand-written schema interpreter.
|
|
879
|
-
|
|
880
|
-
`
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
`
|
|
884
|
-
against the complete test suite on the supported Python boundary versions rather than inferred from
|
|
885
|
-
`uv.lock`. The exact toolchain remains locked for development and release builds. Basedpyright and its
|
|
886
|
-
Node wheel retain the compatible exact pair `basedpyright==1.39.9` and
|
|
887
|
-
`nodejs-wheel-binaries==22.20.0`.
|
|
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.
|
|
888
903
|
|
|
889
904
|
## Opt-in Provider consumer smoke
|
|
890
905
|
|
|
891
906
|
`tests/provider/test_provider_smoke.py` exercises the consumer flow through only the public SDK interface. Its base
|
|
892
907
|
scenario covers credential authentication, persistence of the complete returned Session, restoration through a new
|
|
893
|
-
`AsyncMatelab` instance, refresh with identity preservation, and notebook discovery.
|
|
894
|
-
|
|
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.
|
|
895
910
|
|
|
896
911
|
Raw Provider conformance remains the responsibility of `matelab-spec`, which sends direct HTTP requests and validates
|
|
897
912
|
the unmodified responses. The SDK does not repeat its route-by-route, cross-account, sharing, or attachment-isolation
|
|
@@ -903,31 +918,27 @@ Provider smoke is restricted to the confirmed isolated test service. Authenticat
|
|
|
903
918
|
token state. This side effect is inherent to the tested Provider operations; it cannot be disabled by a test setting.
|
|
904
919
|
Explicitly loading `.env.test` and selecting the `provider` marker is the opt-in for this flow.
|
|
905
920
|
|
|
906
|
-
|
|
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:
|
|
907
925
|
|
|
908
926
|
- `MATELAB_PROVIDER_BASE_URL`
|
|
909
927
|
- `MATELAB_PROVIDER_USERNAME`
|
|
910
928
|
- `MATELAB_PROVIDER_PASSWORD`
|
|
911
929
|
|
|
912
|
-
These names intentionally match `matelab-spec` Provider Verification.
|
|
913
|
-
|
|
914
|
-
With the environment prepared:
|
|
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:
|
|
915
932
|
|
|
916
933
|
```bash
|
|
917
934
|
uv run --env-file .env.test pytest -m provider tests/provider/test_provider_smoke.py
|
|
918
935
|
```
|
|
919
936
|
|
|
920
|
-
This command runs only the SDK public-interface smoke;
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
cd ../matelab-spec
|
|
926
|
-
uv run --env-file ../matelab-python-sdk/.env.test pytest
|
|
927
|
-
```
|
|
928
|
-
|
|
929
|
-
The files are never loaded implicitly, so normal test runs remain safely skipped. Do not use either flow against
|
|
930
|
-
production, and never commit Provider credentials.
|
|
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.
|
|
931
942
|
|
|
932
943
|
## Reproducible release build
|
|
933
944
|
|
|
@@ -945,6 +956,6 @@ uv run python scripts/check_release.py dist/release/*.whl dist/release/*.tar.gz
|
|
|
945
956
|
```
|
|
946
957
|
|
|
947
958
|
Rebuilding the same commit with the same locked environment and `SOURCE_DATE_EPOCH` must produce
|
|
948
|
-
byte-identical wheel and source distribution hashes. The SDK Contract pin is immutable `matelab-spec
|
|
949
|
-
`
|
|
950
|
-
`
|
|
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`.
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"contract_line": "integration-v1",
|
|
4
4
|
"release": {
|
|
5
|
-
"tag": "
|
|
6
|
-
"commit": "
|
|
5
|
+
"tag": "v2026.10.1",
|
|
6
|
+
"commit": "9941e2d623a1c2633adb459b823d78d4e62d3802"
|
|
7
7
|
},
|
|
8
8
|
"openapi": {
|
|
9
9
|
"source_path": "openapi/matelab-integration-v1.openapi.yaml",
|
|
10
10
|
"snapshot": "matelab-integration-v1.openapi.yaml",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "a07997128c1df17a03724c5af8e11b45a34166f9d6e15558e66e0a301f2e0813"
|
|
12
12
|
}
|
|
13
13
|
}
|