-
Notifications
You must be signed in to change notification settings - Fork 7
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
LIU 189 Expose PyFuncApp #86
Conversation
|
||
def initialize(self, **kwargs): | ||
object_id = self.uid | ||
if len(self.uid) != 20: | ||
object_id = np.random.bytes(20) | ||
if self.object_id is None: | ||
if not self.object_id: |
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.
I noticed an issue with plasma where an empty string id didn't trigger using the object id. Truthy logic will treat empty string and None as 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.
Very nice, indeed. Thanks Callan.
Here I've exposed PyFuncApp, SCPApp, CRCStreamApp, SocketListenerApp daliuge apps such that they will be generated into the default daliuge apps palette (LIU-189, LIU-190, LIU-191, LIU-192 respectively)
Some components I had to modify to get a basic demo graph running for each:
PyFuncApp: Converted app to new component style and added a flag to replace pickling with ast/repr python literals. function_defaults parameter doesn't quite make sense in the component as it only works for kwargs determined at runtime but I've left it be to avoid rewriting unit tests. The fuction argument mapping I'd expected to map port name to function keyword but since in the example the ports and keywords have an order the dict values don't seem to matter. Example of a runnable graph below.