magic-class icon indicating copy to clipboard operation
magic-class copied to clipboard

would like to remove `magicgui.signature`

Open tlambert03 opened this issue 3 years ago • 2 comments

Hi @hanjinliu

as part of https://github.com/pyapp-kit/magicgui/issues/474, I'd like to generally remove (or at least make private) everything inside of magicgui.signature (since I think functions were the wrong level to generally attack the type->widget mapping). but it looks like you're using MagicParameter quite a bit.

Could you look into what it would take here to remove dependence on magicgui.signature? either by using other public functions from magicgui (such as directly using get_widget_type), or by vendoring whatever you want from magicgui.signature?

thanks :)

tlambert03 avatar Nov 12 '22 21:11 tlambert03

I see that you use it in tabulous too... i'll keep it in for the near future, and look into making it a thin wrapper on new stuff in magicgui

tlambert03 avatar Nov 12 '22 21:11 tlambert03

Hi @tlambert03 , make_annotated and split_annotated_type are not the problem. I'll just copy them in some places. If I understand correctly, functions that convert an Annotated type into a widget (or UiField) will be provided in the next magicgui, right? Then I think I won't need big changes in my code if I port all from magicgui.signature.

Just one thing I'm curious is that how FunctionGui is gonna change. It seems that FunctionGui has to depend on function signature to bind arguments. Since there is a class inheriting FunctionGui I'd like to know its architecture.

I see that you use it in tabulous too...

This is a very trivial one :)

hanjinliu avatar Nov 13 '22 02:11 hanjinliu