rcasteran / jarvis4se

JARVIS for Systems Engineers
https://regis-casteran.gitbook.io/jarvis4se/
MIT License
3 stars 1 forks source link

Decomposition level does not work #81

Closed rcasteran closed 1 year ago

rcasteran commented 1 year ago

Impacted version jarvis4se version: 1.3.4

Describe the bug Jarvis does not handle the decomposition level on decomposition diagram properly

To Reproduce Please execute the following command:

%%jarvis
with test
F1 is a function
F2 is a function
a is a data
F1 produces a
F2 consumes a
F21 is a function
F22 is a function
F21 composes F2
F22 composes F2
F211 is a function
F212 is a function
F211 composes F21
F212 composes F21
F211 consumes a
F212 produces b
c is a data
F211 produces c
F212 consumes c
F21 consumes a
b is a data
F21 produces b
F22 consumes b

Then please execute the following command to show the decomposition of F2:

%%jarvis
with test
show decomposition F2

Jarvis displays properly F2 and its children and the related flows. Then please execute the following command to show the decomposition of F2 at level 1:

%%jarvis
with test
show decomposition F2 at level 1

Jarvis displays properly F2 and its children at level 1, but is not able to connect the flows a and b to F21

Expected behavior Jarvis must display F2 and its children at level 1, and must connect the flows a and b to F21

Screenshots None

Desktop (please complete the following information):

Not2behere commented 1 year ago

Is this the desired output for "show decomposition F2 at level 1" ? This is an image

rcasteran commented 1 year ago

Yes, indeed.

Not2behere commented 1 year ago

Ok, i'm not able to reproduce the bug and jarvis4se is already displaying the diagram expected:

Is this the desired output for "show decomposition F2 at level 1" ? This is an image

rcasteran commented 1 year ago

OK, now I got it. Problem is that "show decomposition F2 at level 1" does not display the right diagram if you run it right after the declaration. I created a new regression test to highlight this called "test_fun_decomposition_level"

rcasteran commented 1 year ago

Please fix this issue by fixing the non regression test

rcasteran commented 1 year ago

test_fun_decomposition_level has been renamed into test_issue_81 with #83