-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix pass-manager drawing tests for pydot 3.0 #12775
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
Conversation
Two changes in pydot 3 changed the reference output: 1. previously, attributes were sorted before being output. Pydot 3 stores them in declaration order. Here, we sort our attributes to maintain the closest behaviour between the two versions. 2. Text fields (like `label`) that contain special characters now have their values enclosed in quote marks. This is a difference between the two versions, and we update the reference files to the new version since that's what we'll be using in CI. Qiskit is still compatible with pydot 2 in general usage, it's just our tests that are a little more tied to the current version.
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 9956375211Details
💛 - Coveralls |
@Mergifyio backport stable/0.46 stable/1.1 |
✅ Backports have been created
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me assuming it passes CI, it's just an argument reordering and escaping change in the expected output. I guess the open question is did you want to throw a test version constraint on > 3.0.0 and leave the optional requirement at whatever the current minimum is? It doesn't matter too much so feel free to just enqueue this for merging if you're fine leaving the minimum for testing unchanged.
That sounds like a good idea - done in 7158eef. |
* Fix pass-manager drawing tests for pydot 3.0 Two changes in pydot 3 changed the reference output: 1. previously, attributes were sorted before being output. Pydot 3 stores them in declaration order. Here, we sort our attributes to maintain the closest behaviour between the two versions. 2. Text fields (like `label`) that contain special characters now have their values enclosed in quote marks. This is a difference between the two versions, and we update the reference files to the new version since that's what we'll be using in CI. Qiskit is still compatible with pydot 2 in general usage, it's just our tests that are a little more tied to the current version. * Add test-only constraint on pydot (cherry picked from commit c3b468c) # Conflicts: # qiskit/visualization/pass_manager_visualization.py # test/python/visualization/references/pass_manager_standard.dot # test/python/visualization/references/pass_manager_style.dot
* Fix pass-manager drawing tests for pydot 3.0 Two changes in pydot 3 changed the reference output: 1. previously, attributes were sorted before being output. Pydot 3 stores them in declaration order. Here, we sort our attributes to maintain the closest behaviour between the two versions. 2. Text fields (like `label`) that contain special characters now have their values enclosed in quote marks. This is a difference between the two versions, and we update the reference files to the new version since that's what we'll be using in CI. Qiskit is still compatible with pydot 2 in general usage, it's just our tests that are a little more tied to the current version. * Add test-only constraint on pydot (cherry picked from commit c3b468c)
* Fix pass-manager drawing tests for pydot 3.0 Two changes in pydot 3 changed the reference output: 1. previously, attributes were sorted before being output. Pydot 3 stores them in declaration order. Here, we sort our attributes to maintain the closest behaviour between the two versions. 2. Text fields (like `label`) that contain special characters now have their values enclosed in quote marks. This is a difference between the two versions, and we update the reference files to the new version since that's what we'll be using in CI. Qiskit is still compatible with pydot 2 in general usage, it's just our tests that are a little more tied to the current version. * Add test-only constraint on pydot (cherry picked from commit c3b468c)
* Fix pass-manager drawing tests for pydot 3.0 Two changes in pydot 3 changed the reference output: 1. previously, attributes were sorted before being output. Pydot 3 stores them in declaration order. Here, we sort our attributes to maintain the closest behaviour between the two versions. 2. Text fields (like `label`) that contain special characters now have their values enclosed in quote marks. This is a difference between the two versions, and we update the reference files to the new version since that's what we'll be using in CI. Qiskit is still compatible with pydot 2 in general usage, it's just our tests that are a little more tied to the current version. * Add test-only constraint on pydot (cherry picked from commit c3b468c) Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
* Fix pass-manager drawing tests for pydot 3.0 (#12775) * Fix pass-manager drawing tests for pydot 3.0 Two changes in pydot 3 changed the reference output: 1. previously, attributes were sorted before being output. Pydot 3 stores them in declaration order. Here, we sort our attributes to maintain the closest behaviour between the two versions. 2. Text fields (like `label`) that contain special characters now have their values enclosed in quote marks. This is a difference between the two versions, and we update the reference files to the new version since that's what we'll be using in CI. Qiskit is still compatible with pydot 2 in general usage, it's just our tests that are a little more tied to the current version. * Add test-only constraint on pydot (cherry picked from commit c3b468c) * Fix reference files --------- Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
* Fix pass-manager drawing tests for pydot 3.0 Two changes in pydot 3 changed the reference output: 1. previously, attributes were sorted before being output. Pydot 3 stores them in declaration order. Here, we sort our attributes to maintain the closest behaviour between the two versions. 2. Text fields (like `label`) that contain special characters now have their values enclosed in quote marks. This is a difference between the two versions, and we update the reference files to the new version since that's what we'll be using in CI. Qiskit is still compatible with pydot 2 in general usage, it's just our tests that are a little more tied to the current version. * Add test-only constraint on pydot
Summary
Two changes in pydot 3 changed the reference output:
previously, attributes were sorted before being output. Pydot 3 stores them in declaration order. Here, we sort our attributes to maintain the closest behaviour between the two versions.
Text fields (like
label
) that contain special characters now have their values enclosed in quote marks. This is a difference between the two versions, and we update the reference files to the new version since that's what we'll be using in CI.Qiskit is still compatible with pydot 2 in general usage, it's just our tests that are a little more tied to the current version.
Details and comments