python-change
Implement or review a change to the Python package, its stub, its tests or the console script with the stubtest, pytest and wheel-smoke evidence the invariants require.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- python-change
- description
- Implement or review a change to the Python package, its stub, its tests or the console script with the stubtest, pytest and wheel-smoke evidence the invariants require.
03 SKILL.md 正文
Change the Python surface
- Read
AGENTS.mdandcrates/alliumpy/python/alliumpy/_alliumpy.pyifirst. The stub is the canonical description of the Python API; what it does not describe does not exist to a user of the extension. - Decide where the change lands: a conversion or a constant belongs in the core
(
rust-change); a class, function or exception exposed to Python belongs incrates/alliumpy/src/lib.rs; a re-export belongs in__init__.py; the console script is_cli.py. Its behaviour is upstream's (invariant 1), so a change there is a parity change and goes throughjust parity. - For an exposed API change, change the three artefacts together: the stub, the Rust
binding and the pytest case under
crates/alliumpy/tests/. Write the pytest case first and watch it fail against a rebuilt extension. The bindings crate has no Rust tests; the core's unit tests and doctests stay in the core. - Every class is
#[pyclass(frozen, eq, hash)]andSend + Sync, with a__repr__intickets/CONVENTIONS.md§9's form: forDiagnostic, every field in order,Diagnostic(line=1, col=2, severity='error', message='...', code=None), with severity, message and code written as Python reprs. Every error reaches Python asAlliumErrorwith the stableDisplaytext (invariant 3). Nothing derives__version__fromALLIUM_VERSION_STRINGor the reverse (decision 0010): package metadata supplies the wheel's version, while upstream supplies the command's string. - Run
just py-lint,just py-typecheck,just py-test,just py-stubtest,just wheel-smokeandjust version-check, in that order, thenjust check. A stubtest failure is a disagreement to resolve, never an allowlist entry without a reason beside it.just py-testrebuilds the extension before running pytest. - Report by
file:line: what changed in the stub, binding and test, and which upstream behaviour it reproduces.
04 同仓库更多 Skills
rust-change
Implement or review a change to the core or the bindings crate with the layering, tests and documentation evidence the invariants require.
review-docs
Add or revise a handbook page so it satisfies the documentation contract and stays reachable.
review-change
Review a change in this repository against its invariants, specifications, tests, and documentation contract.
python-change
Implement or review a change to the Python package, its stub, its tests or the console script with the stubtest, pytest and wheel-smoke evidence the invariants require.
project-check
Bring a workspace to a state where the full gate runs, and interpret what it reports.
plan-change
Plan a change when the scope, affected specifications, risks, or validation need evidence before any code is written.