-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathubproject.toml
More file actions
397 lines (338 loc) · 10.1 KB
/
ubproject.toml
File metadata and controls
397 lines (338 loc) · 10.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
"$schema" = "https://ubcode.useblocks.com/ubproject.schema.json"
# This is the Sphinx-Needs configuration file in TOML format.
# It is announced to Sphinx-Needs by putting
# needs_from_toml = "ubproject.toml"
# into conf.py.
# This is required to make the project work with ubCode.
# For details see https://ubcode.useblocks.com
# Also a declarative configuration format is generally a good idea.
[project]
name = "Sphinx-Safety-Classification"
description = "Safety Classification for Sphinx Documentation"
srcdir = "."
# Rules for the ubCode formater, to get a nice looking documentation.
[format_rst]
fail_on_warning = []
validate = true
blockquote_indent = 2
definition_list_indent = 2
directive_indent = 3
enum_list_auto = "preserve"
enum_list_style = "preserve"
field_list_align_body = false
field_list_body_on_new_line = 20
field_list_indent = 2
literal_indent = 2
paragraph_line_length = 70
paragraph_semantic_wrap = false
simple_table_space = 2
substitution_indent = 3
transition_char = "-"
transition_length = 10
# all needs configuration goes to then needs table;
# the varibles do not have the needs_ prefix in the name
[needs]
build_json = true
# Additional options, which shall be available for all need types.
# Migrated to the typed field form introduced with Sphinx-Needs 7+
# see https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-fields
# Each [needs.fields.<name>] table defines one extra field; optional
# ``schema`` entries enable JSON-Schema validation (types, enums, ranges).
[needs.fields.impact]
description = "Qualitative impact of a fault (e.g. low, medium, high)"
schema.type = "string"
[needs.fields.owner]
description = "Owner or maintainer of the need"
schema.type = "string"
[needs.fields.probability]
description = "Qualitative probability of occurrence (e.g. low, medium, high)"
schema.type = "string"
[needs.fields.result]
description = "Evaluation result of a check or test"
schema.type = "string"
[needs.fields.risklevel]
description = "Derived risk level from impact and probability"
schema.type = "string"
[needs.fields.version]
description = "Version string of the classified tool or artifact"
schema.type = "string"
[needs.fields.ti]
description = "Tool Impact (TI) according to ISO 26262-8:2018, clause 11"
schema.type = "string"
schema.enum = ["1", "2", "tbd"]
[needs.fields.si]
description = "Safety Impact flag (yes|no|<empty> for undetermined)"
schema.type = "string"
schema.enum = ["yes", "no", ""]
[needs.fields.td]
description = "Tool error Detection (TD) according to ISO 26262-8:2018, clause 11"
schema.type = "string"
schema.enum = ["1", "2", "3", "tbd"]
[needs.fields.tcl]
description = "Tool Confidence Level (TCL) according to ISO 26262-8:2018, clause 11"
schema.type = "string"
schema.enum = ["1", "2", "3", "tbd"]
[needs.fields.priority]
description = "Priority of the use case / feature"
schema.type = "string"
[needs.fields.company]
description = "Organisation owning the classified artefact"
schema.type = "string"
[needs.fields.department]
description = "Department within the organisation"
schema.type = "string"
[needs.fields.email]
description = "Contact email address"
schema.type = "string"
[needs.fields.url]
description = "External reference URL"
schema.type = "string"
# Force the author to set an ID by hand.
# Otherwise Sphinx-Needs would create one based on the Need title.
# So a title change will change the ID and all set links will get invalid.
# Therefore setting a stable ID by hand is always a good idea.
# see https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-id-required
id_required = true
# The format of a need gets defined here.
# see https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-id-regex
id_regex = "[A-Z_]{3,10}(_[\\d]{1,3})*"
# needs_global_options allows us to set values for Sphinx-Need objects globally, based on
# filters.
# see https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-global-options
# needs_global_options allows us to set values for Sphinx-Need objects globally, based on
# filters.
# see https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-global-options
# [needs.global_options]
# collapse = { "default" = "False" } # The meta-area of all Sphinx-Needs objects shall be hidden.
# collapse-bug in Sphinx-Needs
# [needs.fields.collapse]
# default = true
# Per-type default rendering style for the built-in ``style`` field.
# Moved from the deprecated ``needs_global_options`` to ``needs_fields``
# (SN 7+, ``needs_global_options`` is deprecated and will be removed).
[needs.fields.style]
description = "Visual rendering style used by needflow / need tables"
schema.type = "string"
predicates = [
[ "type in ['usecase']", "purple_bar" ],
[ "type in ['feature']", "green_bar" ],
[ "type in ['fault']", "red_bar" ],
[ "type in ['tool']", "blue_bar" ],
[ "type in ['check']", "pink_bar" ],
[ "type in ['restriction']", "orange_bar" ],
[ "type in ['step']", "gray_bar" ],
[ "type in ['artifact']", "tropical_bar" ],
[ "type in ['test']", "black_bar" ],
]
# List of need type used in the documentation.
# Docs: https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-types
[[needs.types]]
directive = "artifact"
title = "Artifact"
prefix = "IO_"
color = "#LightBlue"
style = "file"
[[needs.types]]
directive = "check"
title = "Check"
prefix = "CHECK_"
color = "#LawnGreen"
style = "rectangle"
[[needs.types]]
directive = "fault"
title = "Fault"
prefix = "FAULT_"
color = "#Pink"
style = "rectangle"
[[needs.types]]
directive = "feature"
title = "Feature"
prefix = "FEAT_"
color = "#Gold"
style = "rectangle"
[[needs.types]]
directive = "project"
title = "Project"
prefix = "PR_"
color = "#Gray"
style = "cloud"
[[needs.types]]
directive = "restriction"
title = "Restriction"
prefix = "REST_"
color = "#Orange"
style = "rectangle"
[[needs.types]]
directive = "test"
title = "Test"
prefix = "T_"
color = "#DarkTurquoise"
style = "node"
[[needs.types]]
directive = "tool"
title = "Tool"
prefix = "TO_"
color = "#0fbcf9"
style = "node"
[[needs.types]]
directive = "usecase"
title = "Use Case"
prefix = "USE_"
color = "#Thistle"
style = "rectangle"
[[needs.types]]
directive = "responsible"
title = "Responsible"
prefix = "RESP_"
color = "#555555"
style = "rectangle"
[[needs.types]]
directive = "step"
title = "Process step"
prefix = "STEP_"
color = "#777777"
style = "rectangle"
# Link types migrated from [[needs.extra_links]] (deprecated in SN 7+)
# to the new dict form [needs.links.<name>]
# see https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-links
[needs.links.uses]
# project --> usecase
incoming = "used_by"
outgoing = "uses"
copy = false
style = "thickness=1,#00AA00"
style_part = "thickness=1,#00AA00"
style_start = "-"
style_end = "->"
[needs.links.member_of]
# responsible --> project
incoming = "has_member"
outgoing = "member_of"
copy = false
style = "thickness=1,#00AA00"
style_part = "thickness=1,#00AA00"
style_start = "-"
style_end = "->"
[needs.links.inputs]
# usecase/feature --> artifact
incoming = "needed by"
outgoing = "inputs"
copy = false
style = "thickness=1,#00AA00"
style_part = "thickness=1,#00AA00"
style_start = "<-"
style_end = "-"
style_reverse = true
[needs.links.outputs]
# usecase/feature --> artifact
incoming = "provided_by"
outgoing = "outputs"
copy = false
style = "thickness=1,#0000AA"
style_part = "thickness=1,#0000AA"
style_start = "-"
style_end = "->"
[needs.links.raises]
# usecase/feature --> fault
incoming = "raised_by"
outgoing = "raises"
copy = false
style = "thickness=1,#FF3333"
style_part = "thickness=1,#FF3333"
style_start = "-"
style_end = "->"
[needs.links.features]
# usecase --> feature, features --> restriction
incoming = "featured by"
outgoing = "features"
copy = false
style = "#Gold"
style_part = "#Gold"
[needs.links.tools]
# feature -> tools
incoming = "part of"
outgoing = "tools"
copy = false
style = "#333333"
style_part = "#333333"
[needs.links.tool]
incoming = "contains"
outgoing = "tool"
copy = false
style = "#333333"
style_part = "#333333"
[needs.links.requires_unsafe]
# usecase --> feature, features --> restriction
incoming = "unsafe required by"
outgoing = "requires unsafe"
copy = false
style = "#Gold"
style_part = "#Gold"
[needs.links.avoids]
# restriction --> fault
incoming = "avoided by"
outgoing = "avoids"
copy = false
style = "#FA8072"
style_part = "#FA8072"
[needs.links.checks]
# check -> fault, check --> restriction
incoming = "checked by"
outgoing = "checks"
copy = false
style = "#FA8072"
style_part = "#FA8072"
[needs.links.errors]
# test --> fault
incoming = "tests"
outgoing = "errors"
copy = false
style = "#FA8072"
style_part = "#FA8072"
[needs.links.responsible]
# usecase --> responsible
incoming = "responsible for"
outgoing = "responsible"
copy = false
style = "#FA8072"
style_part = "#FA8072"
# [[needs.string_links.sn]]
# link_url = "https://github.com/useblocks/sphinx-needs/issues/{{value}}"
# link_name= "GitHub #{{value}}"
# options = ["line"]
# ubCode setting: add custom extensions
[parse.extend_directives.uml]
# see https://github.com/sphinx-contrib/plantuml
description = "Render UML diagrams"
argument = true
content_required = false
parse_content = false
content = true
options = true
[parse.extend_directives.if-builder]
# see https://sphinx-simplepdf.readthedocs.io/en/latest/directives.html#if-builder
description = "Sphinx-SimplePDF builder specific content"
argument = true
argument_required = true
content = true
content_required = true
options = false
[parse.extend_directives.button-link]
# see https://sphinx-design.readthedocs.io/en/latest/badges_buttons.html#buttons
# not yet part of ubCode internal directives
description = "Sphinx-Design button with link"
argument = true
argument_required = true
content = true
content_required = true
options = true
# see https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-import-keys
[needs.import_keys]
imported_project = "/needs_import.json"
# ubCode setting: display a needs.json file in the extension view
[needs_json]
path = "./_build/html/needs.json"
src = "."
# ubCode setting: run a script command
[scripts]
sphinx = "sphinx-build -b html . _build/html"