-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Improve implementation and UI of console envs menu (IPython console/Main interpreter) #22200
base: master
Are you sure you want to change the base?
Conversation
That way we'll be able to emit the list of current environments to other plugins through a signal.
Also, make some tiny UI improvements to its confpage.
Also, use that signal in the IPython console to simplify how the console environments menu is updated.
- Capitalize names so they look better in menus. - Add env dir to custom env names to be able to track multiple of them. - Add for translation env names that can be translated.
- That allows to show them in the console envs menu. - For now this only works after Spyder is restarted. But in-place tracking (i.e. as soon as the env is added in Preferences) will be added next.
Add in-place tracking of custom envs (i.e. as soon as they are added in Preferences).
- Add sections for default, conda, pyenv and custom envs. - Also, in Main Interpreter confpage change the env's name in which Spyder is installed to Internal. That makes it easier to distinguish between default and internal envs.
- That method is only used in its main widget. - Also, move the update_envs method to a better place.
The test was failing because we now require that the new interpreter set in Preferences be really different from the current one to report that it changed.
b277b7f
to
f4eafd2
Compare
@dalthviz, this is ready for review. Since I have to move code around in several places, I suggest that you take a look at these changes one commit at a time. |
Gave this a check and seems like the menu is working as expected 👍 Also, just in case, an idea that came to my mind while checking this is to use submenus instead of sections (so However, the status bar is not showing anything at all or showing a different env name for completions. So, having over preferences the default interpreter selected, I see on Spyder start an empty completions status bar: If I start changing the interpreter preference between a custom interpreter and the default one, I end up with completions refering with a different interpreter than the default one even when I have set the preferences to just use the default one again: The tooltip though is showing the correct path to the selected interpreter: Also, I'm not totally sure to follow the reason to move the main interpreter container to be inside the |
Description of Changes
Visual changes
IPython console envs menu
Issue(s) Resolved
Fixes #
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: @ccordoba12