-
Notifications
You must be signed in to change notification settings - Fork 85
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
Added encapsulating double quotes to comply with DOT language #1176
Conversation
The new version of |
Thanks for the great work, @tabedzki! Could you fix the
Would love if we could reproduce as many of these issues as possible in pytests. These issues highlight lack of regression coverage for Full error log from pytest
|
@ethho do the dev containers/tests use the development version of
|
Before running `to_pydot`, we encapsulate node names and attr_map in double quotes to avoid syntax errors when the node names contain special characters. Implements the workarounds described in #1176 (comment) and pydot/pydot#258 (comment)
The root cause is an instance of this error. While this would be fixed by depending on the pydot pre-release, we can easily fix in |
We chose to implement #1177 as an alternative. Continuing discussion there. |
Adds double quotes
"
needed to close #1175 and closes #1169 and closes #1100 and closes #1072 closes #1065Here is a truncated DOT string generated from this commit:
Example working ERD after this fix
@dimitri-yatsenko or @ethho
Would either of you be able to get this merged fairly quickly?
Versions:
networkx 3.4rc0.dev0
pydot 3.0.1
The latest dev version of networkx is required since there is a patch that removes a
:
check that arises if you use the latest version onpip
. The expectedpip
release for this patch is September 27, 2024.The error that occurs if you do not use the github version of the package
networkx
:ValueError: Node names and attributes should not contain ":" unless they are quoted with "". For example the string 'attribute:data1' should be written as '"attribute:data1"'. Please refer https://github.com/pydot/pydot/issues/258