-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add --user
flag to global dvc auto installation
#4091
Conversation
extension/src/extensions/python.ts
Outdated
@@ -11,15 +11,24 @@ interface Settings { | |||
} | |||
} | |||
|
|||
type EnvironmentVariables = { readonly [key: string]: string | undefined } | |||
type EnvironmentVariables = { readonly [key: string]: undefined } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Q] is this change intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope! I think it happened when I was fixing a merge conflict.
export interface VscodePython { | ||
ready: Thenable<void> | ||
settings: Settings | ||
environments: { | ||
known: Environment[] | ||
getActiveEnvironmentPath: () => { id: string } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[I] If we are using this we also need to use onDidChangeActiveEnvironmentPath
so that updates are taken into account... unless an update will be triggered in a different way.
[Q] Can we replace our other use of the API with this now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[I] If we are using this we also need to use onDidChangeActiveEnvironmentPath so that updates are taken into account... unless an update will be triggered in a different way.
Updates are triggered with onDidChangePythonExecutionDetails
since that runs when the environment path changes.
[Q] Can we replace our other use of the API with this now?
Apologies, I'm not sure what you mean. What other use of the API could be replaced? Looking at the API, they all seem to be doing different things to me 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to merge this, but happy to update the use of the API in a followup!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use getExecutionDetails
to get the Python executable for the active environment. Isn't that returned by getActiveEnvironmentPath
?
export type EnvironmentPath = {
/**
* The ID of the environment.
*/
readonly id: string;
/**
* Path to environment folder or path to python executable that uniquely identifies an environment. Environments
* lacking a python executable are identified by environment folder paths, whereas other envs can be identified
* using python executable path.
*/
readonly path: string;
};
☝🏻 maybe we can't rely on this as it could return a folder and not an executable. Nevermind.
Code Climate has analyzed commit f0648dc and detected 2 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 93.5% (85% is the threshold). This pull request will bring the total coverage in the repository to 95.1% (0.0% change). View more on Code Climate. |
--user
flag to the install commandPart of #3935