Skip to main content

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

License

Apache-2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

theoworks_core-0.1.0.tar.gz (70.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

theoworks_core-0.1.0-py3-none-any.whl (50.9 kB view details)

Uploaded Python 3

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

Hashes for theoworks_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4371fec8a8e30292db598bb0b60f6ebc0b945939f9bb4731158e0ffd01e30bf4
MD5 d05b1a0d5a5a05b22a0a2043f7622bdd
BLAKE2b-256 a3da194b228dc9cd1cf2e97eb107ddcbad3f802ada2ac566ce245aae5e8ecd84

See more details on using hashes here.

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

Hashes for theoworks_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9febbdb4224c5d88417bf68eb6dae294b2c0e8c2483abdc9baa5a0dc251de5e2
MD5 eae855d9efd84e64a2286c4fcf512a2d
BLAKE2b-256 d640513a8cd45c6963e8fdc0deb95bd30421e9b19de085b9bcd97a686a2e59d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page