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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
013e591
Add menu consoles environment
jsbautista Jan 23, 2023
23e7e87
Add menu consoles environment
jsbautista Jan 23, 2023
631bf20
Add updates to console environments
jsbautista Jan 24, 2023
e49bd1c
Change text in Preferences
jsbautista Jan 24, 2023
c79d695
Add updates to console environments
jsbautista Feb 6, 2023
5e890e1
Add updates to console environments
jsbautista Feb 7, 2023
b14818b
Merge branch 'master' into masterConsoleEnvironment
jsbautista Feb 7, 2023
a62410f
Apply suggestions from code review
jsbautista Feb 13, 2023
d33be31
Apply suggestions from code review
jsbautista Feb 13, 2023
ab1d363
Apply suggestions from code review
jsbautista Feb 17, 2023
d946fee
Apply suggestions from code review
jsbautista Feb 27, 2023
cde591f
Apply suggestions from code review
jsbautista Mar 1, 2023
a347fc5
Apply suggestions from code review
jsbautista Mar 6, 2023
a7c5662
Merge branch 'masterConsoleEnvironment' of https://github.com/jsbauti…
jsbautista Mar 6, 2023
8f940b1
Apply suggestions from code review
jsbautista Mar 6, 2023
dc30583
Apply suggestions
jsbautista Mar 8, 2023
0251147
Merge branch 'master' into masterConsoleEnvironment
jsbautista Mar 8, 2023
ef84f78
Apply suggestions
jsbautista Mar 8, 2023
0aa1662
Apply suggestions
jsbautista Mar 12, 2023
867b8fe
Update IPython console plugin tests
dalthviz Mar 14, 2023
4ba249a
Fix IPython console mainwindow test
dalthviz Mar 14, 2023
4bb02d1
Fix some code style issues. Refactor getting envs information
dalthviz Mar 15, 2023
2c04843
Restore some removed blank lines. Update envs module docstring
dalthviz Mar 15, 2023
560853a
Merge branch 'master' into masterConsoleEnvironment
dalthviz Mar 22, 2023
ab339fe
Merge branch 'master' into masterConsoleEnvironment
dalthviz Apr 12, 2023
090a579
Merge branch 'master' into masterConsoleEnvironment
dalthviz Apr 13, 2023
373ad25
Simplify naming approach for the consoles tabs when created from the …
dalthviz Apr 14, 2023
f3164cb
Fix IPython console test
dalthviz Apr 17, 2023
778d6cf
Add style from QMenu to not expand more than one column
dalthviz Apr 17, 2023
d34bae8
Merge remote-tracking branch 'upstream/master' into masterConsoleEnvi…
dalthviz Apr 17, 2023
fc3afdf
Fix IPython console test
dalthviz Apr 17, 2023
86ef33c
Add test and remove extra parenthesis from client name method
dalthviz Apr 18, 2023
9cf998f
Apply suggestions from code review
dalthviz Apr 20, 2023
cc0b08d
Update stylesheet syntax and imports order
dalthviz Apr 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions
  • Loading branch information
jsbautista committed Mar 8, 2023
commit dc30583d1f1e665e8fb1019f5b6786ad997d5633
2 changes: 1 addition & 1 deletion spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -2022,7 +2022,7 @@ def test_run_script(ipyconsole, qtbot, tmp_path):
# Validate created consoles names and code executed
for filename in filenames:
basename = osp.basename(filename)
client_name = f'{basename}/A'
client_name = f'{basename}/A (default)'
variable_name = basename.split('.')[0]

client = ipyconsole.get_client_for_file(filename)
Expand Down
6 changes: 3 additions & 3 deletions spyder/plugins/ipythonconsole/widgets/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,15 +521,15 @@ def get_name(self):
name = self.hostname
# Adding id to name
client_id = (self.id_['int_id'] + u'/' + self.id_['str_id']
+ '(' + self.id_['str_env_name'] + ')')
+ ' (' + self.id_['str_env_name'] + ')')
name = name + u' ' + client_id
elif self.given_name in ["Pylab", "SymPy", "Cython"]:
client_id = (self.id_['int_id'] + u'/' + self.id_['str_id']
+ '(' + self.id_['str_env_name'] + ')')
+ ' (' + self.id_['str_env_name'] + ')')
name = self.given_name + u' ' + client_id
else:
name = (self.given_name + u'/' + self.id_['str_id'] +
'(' + self.id_['str_env_name'] + ')')
' (' + self.id_['str_env_name'] + ')')
return name

def get_control(self):
Expand Down
2 changes: 1 addition & 1 deletion spyder/plugins/ipythonconsole/widgets/main_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ def update_environment_menu(self):
name=name,
text=f'{item} ({environment_consoles_names[item][1]})',
icon=self.create_icon('ipython_console'),
triggered=lambda checked, environment=name,
triggered=lambda checked, environment=name.split()[1],
path=path_to_environment:
self.create_environment_client(
path_to_custom_interpreter=path, environment=environment),
Expand Down