Sphinx extension to enable modeling and set constraints for sphinx-needs
Project description
Complete documentation: http://sphinx-modeling.readthedocs.io/en/latest/
Introduction
Sphinx-Modeling allows the definition of models and constraints for objects defined with Sphinx-Needs. They can be validated during the Sphinx build.
pydantic is used under the hood to validate all models.
Arbitrary constraints can be enforced such as:
value constraints for need options
multiplicity of need link options
typed fields (string, regex, int, enums)
allow or disallow additional options
outgoing links must target specific need types or union of types
need type must be nested within another need type (via parent_need)
need type must be part of a specific document or chapter/section
custom validators
Motivation
Requirements management with Sphinx-Needs and docs-as-code traditionally comes at the cost of complete freedom for developers. need_types, needs_extra_options and needs_extra_links are global and all need_types can use all needs_extra_options/needs_extra_links by default.
This is a problem for organizations that want to enforce well defined (UML) standards on objects. Especially when migrating parts of the requirements management system to Sphinx-Needs it is crucial to be consistent with existing solutions. Doing so enables technological interoperability.
Planned features
Generation of the following Sphinx-Needs configurations from a model configuration:
needs_types
needs_extra_options
needs_extra_links
Installation
Using poetry
poetry add sphinx-modeling
Using pip
pip install sphinx-modeling
Using sources
git clone https://github.com/useblocks/sphinx-modeling cd sphinx-modeling pip install .
Activation
Add sphinx_modeling to your extensions:
extensions = ["sphinx_needs", "sphinx_modeling", ]
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
Hashes for sphinx_modeling-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17b5ce599b4131305340ef1cf74d7dc2b8dfa298e8fce948d05639db7b26d2de |
|
MD5 | 7e14549b60bbd6243d749664b990412e |
|
BLAKE2b-256 | 7b41a33e0f210bcfb818a665bd59d32a3d75f43f004f8a56808abbd3de7fb31d |