Skip to content
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: Add menu to use specific environment interpreter for a new console instance #20421

Merged
merged 34 commits into from
Apr 20, 2023

Conversation

jsbautista
Copy link
Contributor

@jsbautista jsbautista commented Jan 23, 2023

Description of Changes

Add menu to launch a console using the intepreter of a specific environments:

  • Adds a new submenu to launch consoles using a specific interpreter:

submenu

submenu_entry

  • initial env name handling in the console tab;
    • Adds the environment name instead of Console for consoles requested to be created using a specific env interpreter from the new submenu (following the current approach the special consoles use):

imagen

  • Updates some text of labels of the IPython Console preference page

Issue(s) Resolved

Part of spyder-ide/ux-improvements#10

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:
@jsbautista

@jsbautista

This comment was marked as outdated.

@jsbautista

This comment was marked as outdated.

@jsbautista
Copy link
Contributor Author

Hi @dalthviz

@mrclary
Copy link
Contributor

mrclary commented Feb 9, 2023

@jsbautista, perhaps I don't remember a lot of the discussion in spyder-ide/ux-improvements#10, but would it be better to remove "Console X" from the tab text? It seems to me to be unnecessary.

Nevertheless, the work you've done on this looks real good to me, thanks!

@mrclary mrclary mentioned this pull request Feb 9, 2023
16 tasks
@ccordoba12
Copy link
Member

but would it be better to remove "Console X" from the tab text? It seems to me to be unnecessary.

That needs additional discussion because it doesn't seem so simple to me (I'm not going to describe my reasoning here to not derail @jsbautista's work).

So @mrclary, could you post your comment on spyder-ide/ux-improvements#10 so we can keep talking about it there? Thanks!

Copy link
Member

@dalthviz dalthviz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jsbautista for the work here! Left an initial review regarding the kwargs passed to the methods (which maybe could be simplified to just use one) and some other questions regarding possible code refactoring.

If you have any question let me know!

spyder/plugins/ipythonconsole/utils/kernelspec.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/utils/kernelspec.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/utils/kernelspec.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
jsbautista and others added 2 commits February 28, 2023 21:26
Co-authored-by: Daniel Althviz Moré <d.althviz10@uniandes.edu.co>
@dalthviz dalthviz changed the title [WIP] PR: Add menu to change console environments UX improvements PR: Add menu to change console environments UX improvements Mar 15, 2023
@dalthviz dalthviz changed the title PR: Add menu to change console environments UX improvements PR: Add menu to use specific environments intepreter for a new console instance Apr 17, 2023
@dalthviz dalthviz changed the title PR: Add menu to use specific environments intepreter for a new console instance PR: Add menu to use specific environment intepreter for a new console instance Apr 17, 2023
@dalthviz dalthviz changed the title PR: Add menu to use specific environment intepreter for a new console instance PR: Add menu to use specific environment interpreter for a new console instance Apr 18, 2023
@dalthviz dalthviz requested a review from mrclary April 18, 2023 19:43
@dalthviz
Copy link
Member

@ccordoba12 @mrclary could you give this a check? I think is ready for a review. Although the scope of this is not to do changes in the way the consoles are named, I added some changes to the implementation here to follow the way special consoles naming work (adding instead of Pylab, SymPy or Cython the name of the env when using the new menu to launch a console).

I think the changes regarding how in general the names of the consoles work should be done in a different PR since the main scope of this is to add a new menu from where you can launch a new console from a specific environment.

Let me know what you think!

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jsbautista and @dalthviz for your great work here! I left some small suggestions and comments for you, the rest looks good to me.

spyder/plugins/ipythonconsole/plugin.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/utils/kernelspec.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/utils/kernelspec.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/widgets/main_widget.py Outdated Show resolved Hide resolved
dalthviz and others added 2 commits April 20, 2023 13:39
Copy link
Contributor

@mrclary mrclary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have any additional comments beyond @ccordoba12's comments. Looks good to me.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now, thanks @jsbautista and @dalthviz!

@dalthviz, I'll leave the merge to you in case you want to do a squash-merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants