33Builders
44========
55
6- .. _ needs_builder :
6+ .. _ `needs_builder` :
77
88needs
99-----
10+
1011.. versionadded :: 0.1.30
1112
1213The **needs ** builder exports all found needs and selected filter results to a single json file.
1819
1920.. code-block :: bash
2021
21- sphinx-build -b needs source_dir build_dir
22-
22+ sphinx-build -b needs source_dir build_dir
2323
2424 .. hint ::
2525
@@ -35,10 +35,11 @@ If a **needs.json** is imported (see :ref:`needs_file`) and you raise the docume
3535version(s) inside the **needs.json **.
3636
3737.. hint ::
38+
3839 If you generate and store/archive (e.g. in git) the **needs.json ** file
3940 every time you raise your documentation version, you will get a nice history data.
4041
41- .. _ needs_builder_format :
42+ .. _ `needs_builder_format` :
4243
4344Format
4445++++++
@@ -54,106 +55,106 @@ See also :ref:`needs_json_exclude_fields`, :ref:`needs_json_remove_defaults`, an
5455
5556.. code-block :: python
5657
57- {
58- " created" : " 2017-07-03T11:54:42.433876" ,
59- " current_version" : " 1.5" ,
60- " project" : " needs test docs" ,
61- " versions" : {
62- " 1.0" : {
63- " created" : " 2017-07-03T11:54:42.433868" ,
64- " needs_schema" : {
65- " $schema" : " http://json-schema.org/draft-07/schema#" ,
66- " properties" : {
67- " id" : {
68- " description" : " ID of the data." ,
69- " field_type" : " core" ,
70- " type" : " string"
71- },
72- " type" : {
73- " description" : " Type of the need." ,
74- " field_type" : " core" ,
75- " type" : " string"
76- },
77- " links" : {
78- " description" : " Link field" ,
79- " field_type" : " links" ,
80- " items" : {
81- " type" : " string"
82- },
83- " type" : " array" ,
84- " default" : []
85- },
86- " status" : {
87- " description" : " Status of the need." ,
88- " field_type" : " core" ,
89- " type" : [
90- " string" ,
91- " null"
92- ],
93- " default" : null
94- },
95- ...
96- }
97- },
98- " needs_defaults_removed" : true,
99- " needs" : {
100- " IMPL_01" : {
101- " id" : " IMPL_01" ,
102- " type" : " impl" ,
103- " links" : [" OWN_ID_123" ],
104- ...
105- },
106- ...
107- }
108- },
109- " 1.5" : {
110- " created" : " 2017-07-03T16:10:31.633425" ,
111- " needs_schema" : {
112- " id" : {
113- " description" : " ID of the data." ,
114- " field_type" : " core" ,
115- " type" : " string"
116- },
117- " type" : {
118- " description" : " Type of the need." ,
119- " field_type" : " core" ,
120- " type" : " string"
121- },
122- " links" : {
123- " description" : " Link field" ,
124- " field_type" : " links" ,
125- " items" : {
126- " type" : " string"
127- },
128- " type" : " array" ,
129- " default" : []
130- },
131- " status" : {
132- " description" : " Status of the need." ,
133- " field_type" : " core" ,
134- " type" : [
135- " string" ,
136- " null"
137- ],
138- " default" : null
139- },
140- ...
141- },
142- " needs_defaults_removed" : true,
143- " needs" : {
144- " IMPL_01" : {
145- " id" : " IMPL_01" ,
146- " type" : " impl" ,
147- " links" : [" OWN_ID_123" ],
148- " status" : " closed" ,
149- ...
150- },
151- ...
152- }
153- }
154- }
155-
156- .. _needumls_builder :
58+ {
59+ " created" : " 2017-07-03T11:54:42.433876" ,
60+ " current_version" : " 1.5" ,
61+ " project" : " needs test docs" ,
62+ " versions" : {
63+ " 1.0" : {
64+ " created" : " 2017-07-03T11:54:42.433868" ,
65+ " needs_schema" : {
66+ " $schema" : " http://json-schema.org/draft-07/schema#" ,
67+ " properties" : {
68+ " id" : {
69+ " description" : " ID of the data." ,
70+ " field_type" : " core" ,
71+ " type" : " string"
72+ },
73+ " type" : {
74+ " description" : " Type of the need." ,
75+ " field_type" : " core" ,
76+ " type" : " string"
77+ },
78+ " links" : {
79+ " description" : " Link field" ,
80+ " field_type" : " links" ,
81+ " items" : {
82+ " type" : " string"
83+ },
84+ " type" : " array" ,
85+ " default" : []
86+ },
87+ " status" : {
88+ " description" : " Status of the need." ,
89+ " field_type" : " core" ,
90+ " type" : [
91+ " string" ,
92+ " null"
93+ ],
94+ " default" : null
95+ },
96+ ...
97+ }
98+ },
99+ " needs_defaults_removed" : true,
100+ " needs" : {
101+ " IMPL_01" : {
102+ " id" : " IMPL_01" ,
103+ " type" : " impl" ,
104+ " links" : [" OWN_ID_123" ],
105+ ...
106+ },
107+ ...
108+ }
109+ },
110+ " 1.5" : {
111+ " created" : " 2017-07-03T16:10:31.633425" ,
112+ " needs_schema" : {
113+ " id" : {
114+ " description" : " ID of the data." ,
115+ " field_type" : " core" ,
116+ " type" : " string"
117+ },
118+ " type" : {
119+ " description" : " Type of the need." ,
120+ " field_type" : " core" ,
121+ " type" : " string"
122+ },
123+ " links" : {
124+ " description" : " Link field" ,
125+ " field_type" : " links" ,
126+ " items" : {
127+ " type" : " string"
128+ },
129+ " type" : " array" ,
130+ " default" : []
131+ },
132+ " status" : {
133+ " description" : " Status of the need." ,
134+ " field_type" : " core" ,
135+ " type" : [
136+ " string" ,
137+ " null"
138+ ],
139+ " default" : null
140+ },
141+ ...
142+ },
143+ " needs_defaults_removed" : true,
144+ " needs" : {
145+ " IMPL_01" : {
146+ " id" : " IMPL_01" ,
147+ " type" : " impl" ,
148+ " links" : [" OWN_ID_123" ],
149+ " status" : " closed" ,
150+ ...
151+ },
152+ ...
153+ }
154+ }
155+ }
156+
157+ .. _ `needumls_builder` :
157158
158159needumls
159160--------
@@ -168,23 +169,21 @@ Usage
168169
169170.. code- block:: bash
170171
171- make needumls
172+ make needumls
172173
173174or
174175
175176.. code- block:: bash
176177
177- sphinx- build - M needumls source_dir build_dir
178+ sphinx- build - M needumls source_dir build_dir
178179
179- .. hint::
180+ .. hint:: As an alternative, you can set the config option :ref: `needs_build_needumls` to export the needumls files during each build.
180181
181- As an alternative, you can set the config option :ref:`needs_build_needumls` to export the needumls files during each build.
182-
183-
184- .. _needs_id_builder:
182+ .. _`needs_id_builder` :
185183
186184needs_id
187185--------
186+
188187.. versionadded:: 2.0 .0
189188
190189The ** needs_id** builder exports all found needs and selected filter results to a set json files of each need with the name is `` id `` of need.
@@ -196,4 +195,4 @@ Usage
196195
197196.. code- block:: bash
198197
199- sphinx- build - b needs_id source_dir build_dir
198+ sphinx- build - b needs_id source_dir build_dir
0 commit comments