Skip to content

Make sure to search for the correct python during finding commands#3916

Merged
rchiodo merged 11 commits into
masterfrom
rchiodo/other_virtual_envs
Jan 8, 2019
Merged

Make sure to search for the correct python during finding commands#3916
rchiodo merged 11 commits into
masterfrom
rchiodo/other_virtual_envs

Conversation

@rchiodo
Copy link
Copy Markdown

@rchiodo rchiodo commented Jan 7, 2019

I found this problem while investigating pipenv virtual environments. We were always returning the first other environment that might match a python path. We also required a ipykernel as the 'usable' python when that's not necessary. The 'usable' python should only need to start a notebook.

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
  • Title summarizes what is changing
  • Has a news entry file (remember to thank yourself!)
  • Unit tests & system/integration tests are added/updated
  • Test plan is updated as appropriate
  • package-lock.json has been regenerated by running npm install (if dependencies have changed)

@rchiodo rchiodo self-assigned this Jan 7, 2019
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 7, 2019

Codecov Report

Merging #3916 into master will decrease coverage by 1%.
The diff coverage is 75%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #3916    +/-   ##
=======================================
- Coverage      81%     81%   -<1%     
=======================================
  Files         401     401            
  Lines       18516   18561    +45     
  Branches     2975    2988    +13     
=======================================
+ Hits        14978   14988    +10     
- Misses       3535    3570    +35     
  Partials        3       3
Flag Coverage Δ
#Linux 68% <38%> (ø) ⬇️
#Windows 68% <38%> (ø) ⬇️
#macOS 68% <38%> (ø) ⬇️
Impacted Files Coverage Δ
src/client/common/types.ts 100% <ø> (ø) ⬆️
src/client/datascience/jupyter/jupyterExecution.ts 82% <75%> (-1%) ⬇️
...rc/client/common/errors/moduleNotInstalledError.ts 34% <0%> (-66%) ⬇️
src/client/linters/errorHandlers/standard.ts 40% <0%> (-60%) ⬇️
...c/client/linters/errorHandlers/baseErrorHandler.ts 78% <0%> (-22%) ⬇️
src/client/linters/errorHandlers/errorHandler.ts 78% <0%> (-22%) ⬇️
src/client/linters/errorHandlers/notInstalled.ts 45% <0%> (-16%) ⬇️
src/client/linters/baseLinter.ts 93% <0%> (-6%) ⬇️
src/client/common/process/pythonProcess.ts 93% <0%> (-5%) ⬇️
src/client/interpreter/helpers.ts 84% <0%> (-2%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b82a02a...b46bad4. Read the comment docs.

Copy link
Copy Markdown

@d3r3kk d3r3kk left a comment

Choose a reason for hiding this comment

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

Looks great @rchiodo, please ping me if my comments need discussing.

Comment thread package.json Outdated
"python.dataScience.forceJupyterExactMatch": {
"type": "boolean",
"default": false,
"description": "Force the Python Interactive window to use the python selected and don't search for a close match",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why do we need to add and don't search for a close match? If we force the Python Interactive window to use a specific interpreter, no further information is required here I think?

Also, Python is capitalized.

Suggested change
"description": "Force the Python Interactive window to use the python selected and don't search for a close match",
"description": "Force the Python Interactive window to use the Python interpreter selected.",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is python not supposed to be capitalized? It's the name of a window.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

'and don't search for a close match' is necessary because without this flag it does use the actual python selected first but if that fails it falls back to searching through all other available pythons. I think if it just says Force it to use the selected python, user's will think it doesn't use the selected python at all without this check.

Maybe I invert it and make it

'Search all installed pythons for a Jupyter installation when starting the Python Interactive window' and the default would then be true.

Comment thread src/client/datascience/jupyter/jupyterExecution.ts
Comment thread src/client/datascience/jupyter/jupyterExecution.ts Outdated
Turn off linting tests
Comment thread src/client/datascience/jupyter/jupyterExecution.ts
Copy link
Copy Markdown

@d3r3kk d3r3kk left a comment

Choose a reason for hiding this comment

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

👍

@rchiodo rchiodo merged commit f5e50da into master Jan 8, 2019
@rchiodo rchiodo deleted the rchiodo/other_virtual_envs branch January 8, 2019 23:39
@lock lock Bot locked as resolved and limited conversation to collaborators Jul 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants