loomweave-plugin-python
The Python language plugin for Loomweave. Extracts Python entities from source files and serves them to the Loomweave core over the JSON-RPC protocol defined in WP2 L4.
Status: Python structural extractor. It emits modules, classes, functions,
contains, calls, references, imports, and versioned entity signatures
for Stable Entity Identity (SEI) matching. It also reads Wardline's NG-25
trust-vocabulary descriptor without importing Wardline and emits source-observed
Wardline decorator metadata/tags on decorated entities when a descriptor is
available.
Install (development)
python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
This places loomweave-plugin-python on your $PATH and installs the
dev-time toolchain (ruff, mypy, pytest, pytest-cov, pre-commit).
ADR-023 tooling gates
Every commit must pass all four:
ruff check plugins/python
ruff format --check plugins/python
mypy --strict plugins/python
pytest plugins/python
CI runs the same four gates in the python-plugin job.
Interpreter discovery
pyright-langserver type-checks against whatever python it finds — the
plugin points it at the project's own interpreter deterministically, rather
than trusting whatever happened to be first on the launching process's
PATH (clarion-5cf9643de9). discover_project_interpreter
(src/loomweave_plugin_python/interpreter.py) walks a fixed order and stops
at the first usable candidate — a regular file (Path.is_file()) that
passes os.access(path, os.X_OK):
| Rung | Source | Pinned? |
|---|---|---|
| 1 | LOOMWEAVE_PYTHON_INTERPRETER env var names an executable file |
yes |
| 2 | <project_root>/.venv/bin/python |
yes |
| 3 | $VIRTUAL_ENV/bin/python |
yes |
| 4 | $CONDA_PREFIX/bin/python |
yes |
| 5 | first python / python3 on PATH |
no |
| 6 | nothing found | no |
An empty env value counts as unset at every rung. The returned path is
absolute and lexically normalised but never symlink-resolved — a venv's
bin/python is typically a symlink to the base interpreter, and pyright
needs the symlink path to stay inside the venv's site-packages.
This order is a cross-language contract shared with the Rust host
(crates/loomweave-core/src/plugin/interpreter.rs); the host runs the same
discovery and, for a [capabilities.runtime.pyright] plugin, exports its
pinned answer to the child as LOOMWEAVE_PYTHON_INTERPRETER (unless the
operator already set it). The plugin's own discovery therefore sees the
host's choice at rung 1 whenever the host found one.
When discovery lands on rung 5 or 6 (no project-owned interpreter), an
otherwise-complete calls/references facet is honestly demoted to
degraded with reason interpreter_unpinned — cross-module call/reference
targets may be missing because pyright resolved against a guessed
interpreter, even though nothing else went wrong. Fix it by creating
.venv in the project root or setting LOOMWEAVE_PYTHON_INTERPRETER to the
project's interpreter. See
ADR-058
for the full design and the interpreter_unpinned coverage semantics.
Design references
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file loomweave_plugin_python-1.6.1.tar.gz.
File metadata
- Download URL: loomweave_plugin_python-1.6.1.tar.gz
- Upload date:
- Size: 222.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5704284de6ce698d9c9331245dd06d94fc877b73738557101374fa49eb8d0e75
|
|
| MD5 |
32889eff387117c0ef5e24b61d9fc7bf
|
|
| BLAKE2b-256 |
8b459e8d8be0436c3165ef1f6cac8be18df5fb49198f715cd890b681c07bc228
|
Provenance
The following attestation bundles were made for loomweave_plugin_python-1.6.1.tar.gz:
Publisher:
release.yml on foundryside-dev/loomweave
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loomweave_plugin_python-1.6.1.tar.gz -
Subject digest:
5704284de6ce698d9c9331245dd06d94fc877b73738557101374fa49eb8d0e75 - Sigstore transparency entry: 2680426354
- Sigstore integration time:
-
Permalink:
foundryside-dev/loomweave@da9abdf8d6a3cbb3580467b982553ca0e7a3609e -
Branch / Tag:
refs/tags/v1.6.1 - Owner: https://github.com/foundryside-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@da9abdf8d6a3cbb3580467b982553ca0e7a3609e -
Trigger Event:
push
-
Statement type:
File details
Details for the file loomweave_plugin_python-1.6.1-py3-none-any.whl.
File metadata
- Download URL: loomweave_plugin_python-1.6.1-py3-none-any.whl
- Upload date:
- Size: 86.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b42657987ff4d0ac17a4c2eb133740d17b3d73af29449e65a6228ab704ff5e6
|
|
| MD5 |
6c5bd0aedee977079ac90f526b2bd1da
|
|
| BLAKE2b-256 |
fd01ba6522d57078c9bd86481c132b9c26e184ca2173fddba661c81bc20ee8cb
|
Provenance
The following attestation bundles were made for loomweave_plugin_python-1.6.1-py3-none-any.whl:
Publisher:
release.yml on foundryside-dev/loomweave
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loomweave_plugin_python-1.6.1-py3-none-any.whl -
Subject digest:
3b42657987ff4d0ac17a4c2eb133740d17b3d73af29449e65a6228ab704ff5e6 - Sigstore transparency entry: 2680426451
- Sigstore integration time:
-
Permalink:
foundryside-dev/loomweave@da9abdf8d6a3cbb3580467b982553ca0e7a3609e -
Branch / Tag:
refs/tags/v1.6.1 - Owner: https://github.com/foundryside-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@da9abdf8d6a3cbb3580467b982553ca0e7a3609e -
Trigger Event:
push
-
Statement type: