jamesscottbrown / pyyed

A simple Python library to export networks to yEd
BSD 3-Clause "New" or "Revised" License
81 stars 37 forks source link

custom properties for groups #42

Closed rcorvino closed 2 years ago

rcorvino commented 3 years ago

Hello, great tools. I want to create groups with custom_properties, but the group class does not accept the custom_properties argument, unlike the node class. Is there a reason for this choice? Is there another way to achieve the same result? If not, is it possible to add this feature? If you are interested, I could submit a working implementation I have done (mostly replicating what you do for nodes).

bockor commented 3 years ago

Howdy !

Allow me to say that I'm the individual who introduced custom properties for Nodes/Edges end last year. At that time I personally had no business needs to implement this feature for NodeGroups. So we can not consider this as an issue. I am convinced your feature request could be instituted. However please be warned that there will be no distinction between GroupNode and Group Custom Properties scope. This is caused by the fact that yEd considers GroupNodes as ... Nodes.
The attached pic should provide more insight. If you can live with this behaviour I am willing to spent some time on it when resources permit. Screenshot from 2021-07-22 20:31:23

rcorvino commented 3 years ago

Hello @bockor

Thanks a lot for your answer. Your solution seems acceptable to me.
I created a pull request with a modification I attempted in this direction. I hope this pull request can help. Let me know if I need to modify something.

jamesscottbrown commented 2 years ago

I have merged the PR and published a new release to PyPi: this feature should be working in version 1.5.0.