-
-
Notifications
You must be signed in to change notification settings - Fork 62
Pythonised inputWire test #531
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
Pythonised inputWire test #531
Conversation
wdednam
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @wdednam)
You're right - polymorphic objects are not currently supported on methods returning references. They should be of course, just like smart pointers support polymorphic behaviour of classes that inherit from PolyRESTProcessBase. Also functions that return smart pointers should be supported, but don't work at all for some reason. I'm going to add tickets to the classdesc project to do these, but it might be a while before getting to them. |
| value_id = None | ||
| for i in range(len(minsky.model.items)): | ||
| item = minsky.model.items[i] | ||
| if item.x() == integralVariable.x() and item.y() == integralVariable.y(): |
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.
Th Item::id() method is a more direct way of determining items match.
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.
Also - in this case, the items list will have exactly two items - an IntOp and a Variable::integral. So we could just examine Item::classType()
highperformancecoder
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @wdednam)
b5759bc
into
highperformancecoder:master
Thought this one would be more straightforward, but it seems that the C++-wrapped findObject method does not expose more attributes to the pyminsky module than those in the item class, and, as a result, one can't access subattributes of specific item types directly from the object returned by findObject, e.g., name, valueId, etc. Thus, I have resorted to iterating minsky.model.items to expose the attribute required for the test (valueId).
This change is