You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.
This would involve establishing appropriate ContextVars in __enter__()/__exit__() and checking for those during constructors to auto-register via the parent's add().
I'm less enthusiastic about this feature request. In mingrammer it makes more sense to me because the context provides a logical block to add elements to a diagram or sub-cluster. However, even there it is very implicit that every instance and relationship is automatically added to the context object.
Additionally, It seems to me like nesting levels would escalate rather quickly. In my opinion, it will actually make it harder to understand because I have to parse every statement keeping in mind which element is in the active context. I think the other syntax elements that you proposed in #28 and #13 already improve the situation a lot.
So I'm not convinced this is an improvement and I'd rather prioritize adding missing behaviour to the classes.
Checklist
Is your feature related to a problem? Please describe it.
Constructing a tree of elements from Python is quite verbose today:
Describe the solution you would like.
Using Python context, we could achieve the same outcome in an easier to read manner:
This would involve establishing appropriate
ContextVar
s in__enter__()
/__exit__()
and checking for those during constructors to auto-register via the parent'sadd()
.Additional context
This is inspired by mingrammer/diagrams.
The text was updated successfully, but these errors were encountered: