glue-jupyter icon indicating copy to clipboard operation
glue-jupyter copied to clipboard

Move the viewer APIs to a more stability-oriented public/private attribute model

Open eteq opened this issue 6 years ago • 1 comments

This came out of a discussion with @astrofrog @maartenbreddels @nmearl @brechmos-stsci @mariobuikhuizen. The consensus was that it probably makes sense to start moving in the direction where all the glue-jupyter viewers follow the general convention that anything that's "private" meaning leading underscore is not API-stable, but things without a leading underscore are "public" meaning either API-stable or at least "we'll warn before breaking things". This may basically just mean add _ at the start of all the attributes except state for now... But I'm OK with that.

As a related discussion item, though: are there conventions we want to commit to for the API for the viewers? I.e. one suggestion by @maartenbreddels was for anything that's a widget to be viewer.widget_<whatever>?

eteq avatar Sep 19 '19 19:09 eteq

My general feeling about naming, is that the first thing that comes to mind, should come first. E.g. in vaex, I have df.state_set/get/load/store (I think). I don't have to remember it, because I do df.state_<tab>, If I had to remember set/get/load/store, I would miss a lot of times df.load_<tab>.. hmm no etc.

Similar for figure_widget vs widget_figure, often I know i need to have a widget, but i'm not sure which. self.widget_<tab> will usually get me there. You could argue that this is a bad tooling situation (smarter completion), but its the current situation.

maartenbreddels avatar Sep 19 '19 19:09 maartenbreddels