-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create hard parameters for graphviz attributes? #352
Comments
Yeah, that's a difficult thing to solve. |
This isn't just a theoretical concern, either. There are extant cases where graphviz takes undocumented or conflictingly-documented values for certain attributes, which create a real difficulty for PyDot to handle sensibly. |
The other tricky thing here is, if this were to be implemented, the corresponding getters and setters would really need to be defined using the enums as their output/input types (respectively). Whereas, currently, all of those methods are generated from lists of names (and, of course, therefore generated untyped) at class definition time. |
When creating a Graphviz graph, there isn't any documentation for the parameters built into the system, which means there's no intellisense and no way to see what parameters exist or what their valid values are.
The currently best way for a beginner is to go to the official documentation for graphviz (for example, https://graphviz.org/docs/edges/) to see the possible values and set them there, but it would be easier to have built-in enums. For example, here's how I am creating my edges:
On one hand, this makes it easier for me to create edges; on the other hand, I don't know how static Graphiz's api is, so having an attribute there that might not be supported for a specific version could lead to other issues.
Related to #130
The text was updated successfully, but these errors were encountered: