sphinx-needs
sphinx-needs copied to clipboard
Support Needs definition inside Plantuml
I would like to define Needs within a Plantuml document like this:
@startuml
'@rst
'.. comp-sw:: MyAwesomeComponent
' :id: COMP_SW_MyAwesomeComponent
' :status: impemented
' :tags: sys-arch
'@endrst
component MyAwesomeComponent
@enduml
It could be doable with needuml
.
But where shall these needs get represented in the documentation?
Or shall they be just "internal" and have no own representation?
The usecase is to have PlantUML diagrams which are linked to other needs. Perhaps this is now possible with needuml
. Will refine the usecase together with the user and get back.
@twodrops: Any updates for this one?
Sorry, I didn't manage it yet. I will invite for a joint meeting with you and the requestor so that we can directly check what is possible with needuml
Idea:
' @rst
'
' .. req:: REQ 1
' :id: REQ_1
'
' Need content
' @endrst
node "compoent X" as comp_x
Directive uml_extract
load everything between @rst
and @endrest
into the current directive position in the rest file.
How about .. umlimport::
as the directive name, similar to .. needimport::
Maybe this can be better done by a generic extension, called e.g. rst-extractor
.
This extension could handle every text-based file and is not specific to uml and co.
Example
.. rst-extract:: myuml.puml
:start: @rst
:end: @endrst
:remove: '
.. rst-extract:: app.py
:start: @rststart
:end: @rstend
Could be used for rst, md, XML, python, c, ...
Start/End arguments or comment prefixes can be configured.
This will be a real cool feature. Go ahead :)