Replies: 1 comment 1 reply
-
He @HughG, LevelsLevels sound for me like additional options. As it looks like the possible level names are always the same: .. req:: My Planguage requirement
:id: REQ_001
:wish: 20
:fail: 10
:past: 12
:trend: 15
A requirement with levels Would you like to do something with these levels? Via templates, you can also add them to the representation of the content and add units and other information, so that they may become more meaningful. QualifiersI agree that a feature to see all available variants would be nice. However, I have never seen something like your Qualifiers in docs. But I like the idea behind it. It feels a little bit like the filter-strings, which are also statements and get executed in the context of a need and can have access also to globally defined values. If the statement is
The statement could be any Python code. So it will be quite powerful, but not so structured as the given example in Qualifiers But for sure, it would be a new feature for Sphinx-Needs. Does this also already goes in the right direction? |
Beta Was this translation helpful? Give feedback.
-
Hi folks, I'm a principal engineer who went to a training course by Tom Gilb about 10 years ago, and have been vaguely hoping for free-ish tooling to enable us to use Planguage for requirements -- rather than the mish-mash of poorly-organised Confluence pages and after-the-fact design docs we have now. Sphinx-Needs could well be it, specially given the VSCode extension, so thanks for this fantastic set of tools :-)
The basics of the Planguage fit Sphinx-Needs nicely, but a couple of things are more tricky. I'm trying to figure out how I might implement them, and whether it would need changes to Sphinx-Needs, or custom directives, filter functions, or what. This is not a clear-cut question, rather I'm looking for inspiration for design/implementation approaches.
Levels
Quality Requirements in Planguage are requirements on scalar values related to a particular function, e.g., latency. They have a Unit, a Meter (statement of how you can measure them), and a value for some/all of a set Levels. There's a set of logical levels defined by default (e.g., Past, Survival, Wish, Goal) but a given project could add its own.
Maybe these could be need-parts within a need (option value or content), where the part-id is the level name, and the part content is the value. Or maybe some custom inline role within an (option value or content)? However, I'm not sure how I'd apply Qualifiers -- see next.
Qualifiers
One or more Qualifiers can be attached to a various things: a requirement (to qualify the entire requirement), a level (to state that the Goal Level for a Quality Requirement is different in different releases, deployments, market segments, etc.), a link (e.g., to state that a function only has some particular sub-function or quality requirement in certain deployments etc.), and maybe other things.
Qualifiers can be expressed as inline shorthand (a conjunction of boolean expressions) or by reference to a separate defined document entry with its own ID (so, in Sphinx-Needs, a custom type of need).
That sounds sort-of like a blend of variants and filter functions, and/or possibly use of needextend to replace the Level values for a Quality Requirement (if it were possible to apply needextend conditionally). However, my (very inexperienced) assumption about how qualifiers should appear in rendered documents is that we ought to see all of the qualified alternative values, rather than only the ones which are currently "selected" by some build process. That allows you to, e.g., look at the spec for a function and realise that it also needs to have some kind of build-time or runtime config, because it needs to be on/off in different deployments. (It might also be nice to be able to build the same doc with some set of qualifiers "baked in", as with the way variants are applied just now in Sphinx-Needs (1.3.0) but that's not the main idea).
Beta Was this translation helpful? Give feedback.
All reactions