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

docs: Enhance/Refactor detecting kernel which name is same as venv #243

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dotpie
Copy link

@dotpie dotpie commented Sep 18, 2024

Just for suggestion. From what I've observed, Molten use kernel name as a kernel ID. Therefore it display the default name of kernel in every environments, (python3 in conda) which make user confused. I refactor it based on the assumption that user installed a kernel inside of the project

Whether the user installs ipykernel or not, this logic searches for a kernel with the same name as the venv.
If not, it asks the user to select the kernel to connect to.

This PR intended following details:

  • try_env_name: Turn getting env path logic into a function, enhance reusability.
  • Slight changes of regex, ensure to find last dir/file of kernel_name.
  • Give priority to env_ok at the condition statement, check if virtual env turned on. If so, load the kernel which named same with virtual environment first.
molten-242.mov

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

Successfully merging this pull request may close these issues.

1 participant