Closed nozmore closed 3 years ago
If we want to proceed with this approach I can do the same for Actors in this PR, otherwise I can revert and just filter elements in the report method.
Something went wrong despite trying multiple times, sorry about that. Please comment this pull request with "Retry DeepCode" to manually retry, or contact us so that a human can look into the issue.
I updated the PR with a similar change for Actors so its ready to merge if desired.
I was trying to use the report framework to mimc existing TM output where annotations for components (Assets in pytm) are separate from dataflows. I couldn't do this currently as Assets were only included in Elements so I replicated what was done for boundaries, flows and elements for assets.
Everything works locally in my manual tests, also updated json test data to reflect inclusion of the asset list and confirm all tests now pass.
One difference here is that the other TM._lists are actually used in the code for logic purposes, boundaries, flows, elements are looped thru in various points to process the TM. Currently this not needed for Assets but seems reasonable there may be a use case in the future.
I implemented the same for Actors.
Alternatively if we don't want to include additional TM._lists the report issue could be addressed by filtering elements in the TM.report method.
`assets = [ obj for obj in TM._elements if not isinstance(obj, Asset) ]
`