TheoWorks core — byte-stable sphinx-needs round-trip, schema, validation, and traceability (pure-Python, no runtime dependencies)
Project description
theoworks-core
Core library for TheoWorks — a byte-stable, round-trip toolkit for sphinx-needs requirements projects.
theoworks-core is pure Python with no runtime dependencies. It provides:
- Byte-stable RST round-trip — parse and re-serialize
.. <type>::need directives (and surrounding prose) with minimal, clean diffs. - Schema model — load a project's need types, fields, and links from
conf.py, a pack manifest, or observed usage. - Validation — check needs against the resolved schema and summarize findings (errors / warnings).
- Traceability — compute link coverage and gaps across a needs graph.
- Packs — starter project templates (
default,blank,aspice,vmodel) used to scaffold a new project.
Install
pip install theoworks-core
Usage
from theoworks_core import parse_document, serialize_document
doc = parse_document(open("docs/index.rst", encoding="utf-8").read())
for block in doc.blocks:
print(block)
# Round-trips byte-for-byte:
assert serialize_document(doc) == open("docs/index.rst", encoding="utf-8").read()
Scaffold a new project:
from theoworks_core import scaffold_project
scaffold_project("my-project", name="My Project", pack="aspice")
Related packages
theoworks-sphinx— the Sphinx extension that emits the needs graph (needs.json).theoworks-cli— thetheoworkscommand-line interface.
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
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 theoworks_core-0.1.0.tar.gz.
File metadata
- Download URL: theoworks_core-0.1.0.tar.gz
- Upload date:
- Size: 70.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4371fec8a8e30292db598bb0b60f6ebc0b945939f9bb4731158e0ffd01e30bf4
|
|
| MD5 |
d05b1a0d5a5a05b22a0a2043f7622bdd
|
|
| BLAKE2b-256 |
a3da194b228dc9cd1cf2e97eb107ddcbad3f802ada2ac566ce245aae5e8ecd84
|
File details
Details for the file theoworks_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: theoworks_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 50.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9febbdb4224c5d88417bf68eb6dae294b2c0e8c2483abdc9baa5a0dc251de5e2
|
|
| MD5 |
eae855d9efd84e64a2286c4fcf512a2d
|
|
| BLAKE2b-256 |
d640513a8cd45c6963e8fdc0deb95bd30421e9b19de085b9bcd97a686a2e59d1
|