-
Notifications
You must be signed in to change notification settings - Fork 79
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
Epic: Variables pane categories and Package/module/submodule view (handling language-pack differences) #2127
Comments
Thank you for writing out some of these big picture questions around the Variables pane. 👍 I have a response on question 2 about representing packages. At least from my perspective/background, it would feel pretty strange to represent packages/modules (plus whether they are attached/imported and versions) in the Variables pane. IMO we should not try to squeeze those into the Variables pane but should plan for a separate Packages pane where we can find this info. |
I think having a standard set of categories is valuable. For example, "Data" usually wants to be front and center, and may have other special treatment. If the front end doesn't know anything about the categories, we have to treat them all the same. What do folks think of a hybrid approach, wherein Positron ships with some standard categories for common types (data, functions, etc.), but allows language packs to contribute additional categories for objects that don't fit in the standard ones? |
Would something like "Classes" be better in the standard set along with "Data" and "Functions", or an example of something worth building out a provider/contribution point for? It's the only one that has really come up so far AFAIK. |
I definitely agree with this for R, absolutely. For Python, I'm of 2 minds.
This feels somewhat inconsistent to me, and is a consideration that wouldn't really apply in R
which functionally is quite similar to
In either case, Are these arguments enough reason to show modules and submodules for Python in both places? I'm not 100% sure, but I do think that they require some consideration. |
I am in support of having core categories, and then allowing the language packs to add more specialized ones. At the very least, I do like the idea of having Classes as a separate category.
A packages pane would show what could be imported (listed by name used to pip install, not necessarily import), package versions, etc. I perceive the Variables pane to be used more as "what is in the namespace that can be operated on," in which case it feels like it should not omit imported modules. I also think this would ease the confusion as to what is being cleared when you clear the variables pane. However, showing modules means they would have to conform with other views of the Variables pane, where things like "size" don't make as much sense. I don't know what it would look like to just never integrate modules into that view. editing to add: IF we were to decide to show modules, I would be against separating modules/submodules as I think that is too many categories and the distinction isn't any more useful than a single category that is displayed in an Side note: I don't know if we need to be able to configure the visibility, as long as you can collapse each category? |
There are a number of open questions around the Variables pane and more generally, how we want to surface to the user the packages/modules they have installed/imported/attached in their environment/namespace.
But exactly how we do so, across language packs, requires a bit of nuance. For example, are users interested in seeing all installed packages with versions in their current interpreter/runtime (and would this be displayed in a new pane yet to be created)? Or do users just want to see what has been imported/attached? (I think there's probably more value in the former, but there could be a case made that users might be interested in both under different circumstances). If there is value in surfacing what is imported/attached, this works a little differently in R vs Python -- in R a package as a whole is either attached or not, and can be referenced (with explicit namespacing) whether or not it is attached. In Python, a module, or parts of a module, must be imported before being referenced, and a user may import the whole module, specific submodules from the module, or just specific functions/classes/etc from a module. These imports are also commonly aliased in Python (e.g.
import pandas as pd; import matplotlib.pyplot as plt
). Should these imports and aliases be displayed in the Variables pane, even if all installed modules and version info are displayed elsewhere (e.g. in a new Packages pane?)There may be some other issues that come up we can link here, but in general, we need to decide on some approaches for handling differences in terminology, philosophy, and behavior between language packs that affect the Variables pane
The text was updated successfully, but these errors were encountered: