Ameobea / orange3

Orange 3 data mining suite: http://orange.biolab.si
Other
1 stars 0 forks source link

Daily Progress Updates #10

Closed ameo-unito-bot closed 8 years ago

ameo-unito-bot commented 8 years ago

┆Issue is synchronized with this Asana task

Ameobea commented 8 years ago

I worked on making the generated widget code more extensible and more easily programmatically changed. Before I go into how I achieved this, I will do little explanation into how Orange handles widget settings.

A persistent setting value for almost every text box, radio button, or slider on a widget's GUI is created that is saved to disk and loaded every time a widget of that type is opened. This is handled as part of the widget's initialization process and the saved values are loaded into the widget GUI even if the widget is loaded from within the script.

What I did was manually insert the values of these settings from the widget into the initialization section of the generated code for that widget. That way, the widget's settings at the time the script was generated are the ones that will be present in the widget when running it.

In addition, having the widget's settings present in the script allows for them to be modified or added to outside of the Orange3 tool itself making the script truly extensible and hackable and much more useful.

Ameobea commented 8 years ago

I wrote more about this process here: https://github.com/Ameobea/orange3/issues/8#issuecomment-231455453

Pelonza commented 8 years ago

This revised plan/model looks a lot better and closer to the "tinkerable" version I think Kernc and I sort of have in our heads. I guess one thing that simply may not be accomplishable, is there's still a sort of artificial feeling (to me anyway) if you are still calling the "widget" code rather than the actual orange library code. Now...that may simply be because the preprocessing widget and visualization widgets simply don't "exist" otherwise. But the tree surely does. Similar to how Kernc suggested simplifying the "input" functionality to just be Table.

This is great work so far! I'm super impressed with how much you've already accomplished.

kernc commented 8 years ago

Indeed, the code for just about anything but the visualizations exists in the library. Preprocessing in Orange.preprocess, for example. The visualizations could be simplified by generating a similar plot using matplotlib code. It would work well with Jupyter notebook (the tool for exploratory Python programming), at least.