Demo page details

Page source code: requirements.rst

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
{% set page="requirements.rst" %}
{% include "demo_page_header.rst" with context %}

πŸ™‡ Requirements Granny
======================

.. include:: /demo_hints/constraints.rst

Please look into :ref:`req_teen`, which contains currently much more data.

.. req:: First requirement
   :id: GRANNY_EXAMPLE
   :tags: granny, example
   :author: ROBERT
   :status: open

   Just a first example requirement.

πŸ™‡ Requirements GrannyΒΆ

Demo feature hint: Constraints

For requirements two constraints are defined, which check if the status is set correctly and if a release is linked.

If these constraints are not fulfilled, the need object gets a colored right border and the footer contains the reason why a constraint is not fulfilled.

Constraints can be defined in the conf.py file:

needs_constraints = {
   "status_set": {
      "check_0": "status is not None and status in ['open', 'in progress', 'closed']",
      "severity": "LOW",
      "error_message": "Status is invalid or not set!"
   },
   "release_set": {
      "check_0": "len(release)>0",
      "severity": "CRITICAL",
      "error_message": "Requirement is not planned for any release!"
   },
}

Depending on the severity, the build is stopped or a warning gets printed:

/sphinx-needs-demo/docs/granny_car/requirements.rst:20: WARNING: Constraint len(release)>0 for need GRANNY_EXAMPLE FAILED! severity: CRITICAL Requirement is not planned for any release! [needs.constraint]

Docs: needs_constraints by Sphinx-Needs.

Please look into πŸ™‡ Requirements Teen, which contains currently much more data.

Object traceability details: First requirement

@startuml

' Nodes definition 

node "<size:12>Requirement</size>\n**First**\n**requirement**\n<size:10>GRANNY_EXAMPLE</size>" as GRANNY_EXAMPLE [[../granny_car/requirements.html#GRANNY_EXAMPLE]] #BFD8D2
actor "<size:12>Person</size>\n**Robert Right**\n<size:10>ROBERT</size>" as ROBERT [[../persons.html#ROBERT]] #DCB239

' Connection definition 

GRANNY_EXAMPLE --> ROBERT

@enduml

ID

Title

Type

Author

GRANNY_EXAMPLE

First requirement

req

ROBERT

ROBERT

Robert Right

person