-
Notifications
You must be signed in to change notification settings - Fork 39
Refactor of flow tools - OpenGraph.isclose
#374
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #374 +/- ##
==========================================
+ Coverage 86.25% 86.31% +0.05%
==========================================
Files 44 44
Lines 6161 6166 +5
==========================================
+ Hits 5314 5322 +8
+ Misses 847 844 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
OpenGraph comparison.OpenGraph.isclose
graphix/opengraph.py
Outdated
| if not nx.utils.graphs_equal(og_1.graph, og_2.graph): | ||
| return False | ||
|
|
||
| if og_1.input_nodes != og_2.input_nodes or og_1.output_nodes != og_2.output_nodes: | ||
| return False |
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.
| if not nx.utils.graphs_equal(og_1.graph, og_2.graph): | |
| return False | |
| if og_1.input_nodes != og_2.input_nodes or og_1.output_nodes != og_2.output_nodes: | |
| return False | |
| return ( | |
| nx.utils.graphs_equal(og_1.graph, og_2.graph) | |
| and og_1.input_nodes == og_2.input_nodes | |
| and og_1.output_nodes == og_2.output_nodes | |
| ) |
thierry-martinez
left a comment
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 commit adapts the existing method
:func: OpenGraph.iscloseto the new API introduced in #358.Additionally, it introduces a new method
:func: OpenGraph.__eq__relevant for open graphs of parametric typegraphix.fundamentals.Planeorgraphix.fundamentals.Axis.