Open MohSam1 opened 2 years ago
Thanks for the feature request. :+1: I understand your request, but I'm unable to see a solution here.
Can you describe with a rough example code of a needflow, how it could work for you?
There is also needuml, which allows writing PlantUML code on your own, but it has access to all need-data and supports Jinja statements. So you can use it to write a filter logic on your own and are free to organize and design your PlantUML objects however you want.
There is no way to position the need elements in a definite order or place
@MohSam1 As you know PlantUML uses auto-layouting/routing (which in my opinion works pretty well for such a small tool). So you will not be able to place any UML elements at certain positions you wish using needflow
or using needuml
.
Your best bet is needs_flow_configs
and use the layout options here.
nodesep
and ranksep
also does magic.
Well, you are right, I figured out the same but was thinking if there is a possibility to tweak things inside sphinx, not to be.
I will point at 2 of my concerns
Do you think there is a possibility to use elements like "together", "arrow direction (down, up, left, right)" inside the needs_flow_configs?
is it possible to post process the rendered puml output ?
Without this, our needflow diagrams look very bad (with arrows flowing like a ball of spaghetti) !!
For 2): No, no postprocessing is available.
needflow
generates a PlantUML string only.
It knows nothing about the PlantUML data model or has access to it.
So each postprocessing would have access to the overall generated string only, which may have 10-200 lines.
You can see the output when using the :debug:
flag.
For 1): Maybe, but it would be link-type based and affects all needs using this link type. Have a look into our need_etra_links style docs.
You could set it like this:
needs_extra_links = [
{
"option": "tests",
"incoming": "is tested by",
"outgoing": "tests",
"copy": False,
"style_start": "<-",
"style_end": "left-->", # Direction added
}
But I'm not sure if this is really helpful.
However, all we can do is give you the possibility to write your own PlantUML code and use the mechanism of PlantUML. This is done by needuml, which has also access to all need-data and allows to write filter-own logics by using Jinja.
What purpose are you using needflow for? As the name suggests it is for showing the relation between need objects only. For everything else, you will have to use needuml
as @danwos suggested.
Another tip would be to keep the scope of each 'needflow' small by using filters or using filter functions. It is not really meant to visualize 100s of need objects in one diagram, but rather partition your scope and create smaller diagrams. For larger reporting, I would import needs.json and use an external reporting tool like Splunk, Grafana etc. which could offer you more dynamic visualization, filtering etc.
As of now, needflow provides configuration inside "needs_flow_configs". This is not sufficient especially when aligning and positioning different need flow elements for rendering.
Eg: In the example below
There is no way to position the need elements in a definite order or place. Also, there is no way to define the direction of each puml element.
This results in unorganized rendered elements.