Skip to content

Ensure workspace pipenv environment is not labeled as a virtual env #2239

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

Merged
merged 7 commits into from
Aug 1, 2018

Conversation

DonJayamanne
Copy link

@DonJayamanne DonJayamanne commented Jul 24, 2018

Fixes #2223

  • Title summarizes what is changing
  • Includes a news entry file (remember to thank yourself!)
  • Unit tests & code coverage are not adversely affected (within reason)
  • Works on all actively maintained versions of Python (e.g. Python 2.7 & the latest Python 3 release)
  • Works on Windows 10, macOS, and Linux (e.g. considered file system case-sensitivity)
  • [n/a] Dependencies are pinned (e.g. "1.2.3", not "^1.2.3")
  • [n/a] package-lock.json has been regenerated if dependencies have changed

@brettcannon
Copy link
Member

A title called "WIP" does not warrant a summary of what is changing, hence I took back a ✔️ 😉

@codecov
Copy link

codecov bot commented Jul 29, 2018

Codecov Report

Merging #2239 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2239      +/-   ##
==========================================
+ Coverage   79.82%   79.87%   +0.05%     
==========================================
  Files         310      310              
  Lines       14367    14379      +12     
  Branches     2549     2552       +3     
==========================================
+ Hits        11468    11485      +17     
+ Misses       2887     2882       -5     
  Partials       12       12
Flag Coverage Δ
#MacOS 74.03% <100%> (+0.04%) ⬆️
#Windows 74.15% <100%> (+0.04%) ⬆️
Impacted Files Coverage Δ
...nterpreter/locators/services/currentPathService.ts 93.61% <100%> (+0.13%) ⬆️
src/client/common/installer/pythonInstallation.ts 100% <100%> (ø) ⬆️
...t/interpreter/configuration/interpreterSelector.ts 56% <100%> (-5.18%) ⬇️
src/client/interpreter/contracts.ts 100% <100%> (ø) ⬆️
src/client/interpreter/interpreterService.ts 86.31% <100%> (+5.26%) ⬆️
src/client/interpreter/locators/helpers.ts 95.34% <100%> (+6.45%) ⬆️
src/client/interpreter/helpers.ts 89.13% <100%> (+0.75%) ⬆️
src/client/interpreter/locators/index.ts 94.59% <100%> (-1.16%) ⬇️
src/client/interpreter/serviceRegistry.ts 100% <100%> (ø) ⬆️
...rc/client/debugger/PythonProcessCallbackHandler.ts 68.42% <0%> (-0.33%) ⬇️
... and 2 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 b81dea5...3c3dd03. Read the comment docs.

@DonJayamanne DonJayamanne changed the title WIP Ensure workspace pipenv environment is not labeled as a virtual env Jul 29, 2018
Copy link

@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 good - I made couple of comments.

@@ -25,7 +24,8 @@ export class PythonInstaller {
const interpreters = await this.locator.getInterpreters();
if (interpreters.length > 0) {
const platform = this.serviceContainer.get<IPlatformService>(IPlatformService);
if (platform.isMac && isMacDefaultPythonPath(settings.pythonPath)) {
const helper = this.serviceContainer.get<IInterpreterHelper>(IInterpreterHelper);
if (platform.isMac && helper.isMacDefaultPythonPath(settings.pythonPath)) {
const interpreterService = this.serviceContainer.get<IInterpreterService>(IInterpreterService);
const interpreter = await interpreterService.getActiveInterpreter();
if (interpreter && interpreter.type === InterpreterType.Unknown) {
Copy link

Choose a reason for hiding this comment

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

🤷‍♂️ I know this isn't technically part of this review, but could we add a link to a post about why this isn't recommended? Or perhaps a link to an article explaining how to add Python to Mac? 🤷‍♀️

Copy link
Member

Choose a reason for hiding this comment

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

@@ -116,7 +116,7 @@ export class InterpreterService implements Disposable, IInterpreterService {
virtualEnvManager.getEnvironmentName(pythonPath),
virtualEnvManager.getEnvironmentType(pythonPath)
]);
if (details) {
if (!details) {
Copy link

Choose a reason for hiding this comment

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

Nice catch. Would be interesting to see a test for this...

@DonJayamanne DonJayamanne merged commit 355f114 into microsoft:master Aug 1, 2018
@DonJayamanne DonJayamanne deleted the issue2223PipEnv branch October 2, 2018 22:45
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 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.

Dropdown List of Interpreters in Virtual Environments is Jumbled
3 participants