PyWorkflowApp / visual-programming

A Python Visual Programming Workspace for Data Science
MIT License
31 stars 12 forks source link

Parameter classes #53

Closed reddigari closed 4 years ago

reddigari commented 4 years ago

This might seem a little overly complex at first glance, and I've been staring at it for so long that I'm no longer sure it's not. But it feels like all of the boilerplate I was able to remove from node.py means it's worthwhile. Concrete classes no longer need to implement their own __init__ to bubble things upward. Using descriptor-style access means the parameters must only be defined once (as Node.OPTIONS), and can be accessed flexibly depending on what the caller needs to know. Also means all the parameter metadata (type, docstring) no longer needs to be serialized in the networkx graph.

reddigari commented 4 years ago

@reelmatt Those explanations are spot on. Latest commits resolve all your comments.