Demo page details
Page source code: index.rst
1{% set page="index.rst" %}
2{% include "demo_page_header.rst" with context %}
3
4
5π§° Basic Example
6================
7
8Sphinx-Needs objects
9--------------------
10
11.. req:: Example Requirement
12 :id: EX_REQ_001
13 :tags: security
14 :status: open
15
16 A simple requirement used as example.
17 The content supports all kind of Sphinx features, like:
18
19 **Bold** or *italic* text
20
21 Web links, like this `google <https://google.com>`__ link.
22
23 Or even images:
24
25 .. image:: /_images/sphinx-needs-logo.png
26 :width: 50px
27
28.. spec:: Example Specification
29 :id: EX_SPEC_001
30 :links: EX_REQ_001
31 :tags: security, safety
32 :status: closed
33
34
35 But also features from integated Sphinx exentions can be used, like this PlantUML generated image from this code
36
37 .. grid:: 2
38
39 .. grid-item::
40
41 .. code-block:: rst
42
43 .. uml::
44
45 node A
46 node B
47 A --> B
48
49 .. grid-item::
50
51 .. uml::
52
53 node A
54 node B
55 A --> B
56
57This example test cases also links against an external need:
58
59.. test:: Example Test case
60 :id: EX_TEST_001
61 :links: EX_SPEC_001, REQ_1_1_ext
62 :status: passed
63
64 And for sure also all features from Sphinx-Needs, like this needflow:
65
66 .. needflow::
67 :filter: docname is not None and "basic_example" in docname
68
69Sphinx-Needs filtering
70----------------------
71
72.. code-block:: rst
73
74 .. needtable::
75 :filter: docname is not None and "basic_example" in docname
76
77.. needtable::
78 :filter: docname is not None and "basic_example" in docname
79
80
81.. code-block:: rst
82
83 .. needflow::
84 :filter: docname is not None and "basic_example" in docname
85
86.. needflow::
87 :filter: docname is not None and "basic_example" in docname
88
89
90Sphinx-Needs debuging
91---------------------
92
93A Sphinx-Needs object using the ``debug`` layout to show all set and internal values, which can also be used in all filter strings.
94
95Sphinx-Needs collect and assigns a lot of data automatically for the specific needs, like their location or the headlines, under which
96it is presented.
97
98.. req:: Example Requirement with debug view
99 :id: EX_REQ_002
100 :status: open
101 :tags: debug
102 :layout: debug
103
104 Some content
105
106Imported needs
107--------------
108
109.. needimport:: imported_project
110
111External needs
112--------------
113
114Here are some needs that are external to the documentation,
115but can still be linked by other needs in this documentation:
116
117- :need:`REQ_1_1_ext` (this is linked in this documentation by :need:`EX_TEST_001`)
118- :need:`REQ_1_2_ext`
119- :need:`SPEC_1_1_ext`
120- :need:`SPEC_1_2_ext`
π§° Basic ExampleΒΆ
Sphinx-Needs objectsΒΆ
A simple requirement used as example. The content supports all kind of Sphinx features, like: Bold or italic text Web links, like this google link. Or even images:
|
But also features from integated Sphinx exentions can be used, like this PlantUML generated image from this code .. uml::
node A
node B
A --> B
|
This example test cases also links against an external need:
And for sure also all features from Sphinx-Needs, like this needflow:
|
Sphinx-Needs filteringΒΆ
.. needtable::
:filter: docname is not None and "basic_example" in docname
ID |
Title |
Status |
Type |
Outgoing |
Tags |
|---|---|---|---|---|---|
Example Requirement |
open |
req |
security |
||
Example Requirement with debug view |
open |
req |
debug |
||
Example Specification |
closed |
spec |
security; safety |
||
Example Test case |
passed |
test |
|||
Requirement page 1 nr 1 |
approved |
req |
|||
Requirement page 1 nr 2 |
approved |
req |
|||
Specification page 1 nr 1 |
spec |
||||
Specification page 1 nr 2 |
spec |
.. needflow::
:filter: docname is not None and "basic_example" in docname
Sphinx-Needs debugingΒΆ
A Sphinx-Needs object using the debug layout to show all set and internal values, which can also be used in all filter strings.
Sphinx-Needs collect and assigns a lot of data automatically for the specific needs, like their location or the headlines, under which it is presented.
EX_REQ_002 Example Requirement with debug view
|
Some content |
Imported needsΒΆ
External needsΒΆ
Here are some needs that are external to the documentation, but can still be linked by other needs in this documentation:
REQ_1_1_ext (this is linked in this documentation by Example Test case (EX_TEST_001))