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

Improve DVC Setup "DVC is Unavailable" step #3935

Closed
6 tasks done
julieg18 opened this issue May 18, 2023 · 8 comments
Closed
6 tasks done

Improve DVC Setup "DVC is Unavailable" step #3935

julieg18 opened this issue May 18, 2023 · 8 comments
Assignees
Labels
A: onboarding Improving and simplifying users happy path. How do we get them have value asap?

Comments

@julieg18
Copy link
Contributor

julieg18 commented May 18, 2023

Currently, vscode-dvc will see if the python extension has a python environment selected, then offer to install DVC and DVCLive inside said environment with pip. There are couple things to possibly improve with this:

image

  • The python extension will tend to select a global environment by default if there is no virtual env. Installing DVC there is most likely unwanted and even dangerous.
  • Some users aren't using pip to install their packages.
  • It's unclear that we are finding the environment using the python extension

Related comments: #3434 (comment), #3434 (comment), #3904 (comment)

Task List

  • Change our "Install" button to "Install (pip)". (A quick way to clear things up a little more for now)
  • Research the possibility of recognizing that the user is not in a virtual environment and/or creating a virtual environment for them (look at Jupyter extension)
  • Research how we can install packages other than pip
  • Use different install commands based on user's environment (no longer needed for now)
  • Incorporate the Python Extension's Create Env... into the setup. (We could add an extra quick pick in our Configure command that adds the Create Env option OR show an extra button in the Setup page)
  • Rethink step contents, and review what we can adjust to make DVC configuration more clear (Main points to review: Configure button name, information on how we got selected environment, and adding a "Select Python Interpreter" button)
@julieg18 julieg18 added the A: onboarding Improving and simplifying users happy path. How do we get them have value asap? label May 18, 2023
@julieg18 julieg18 self-assigned this May 30, 2023
@julieg18
Copy link
Contributor Author

julieg18 commented Jun 2, 2023

Research the possibility of recognizing that the user is not in a virtual environment and/or creating a virtual environment for them (look at Jupyter extension)

Looks like we do both of these things with help from the Python Extension! We can find out if a user is using a virtual environment with the extension's API (specifically their environments utils) and we can run the Python: Create Environment... command to create a new environment.

@julieg18
Copy link
Contributor Author

julieg18 commented Jun 2, 2023

Research how we can install packages other than pip

Looking at Jupyter, they are running commands, decided on args based off the environment information given by the Python Extension. conda install PACKAGE_NAME --name NAME for a named conda environment, pip install -U PACKAGE_NAME for a python venv, etc. We can probably do something similar to install DVC and DVCLive instead of just using pip for any environment like we currently are.

With issue research done, I'll start testing some of these ideas and post some design possibilities next!

@julieg18
Copy link
Contributor Author

julieg18 commented Jun 5, 2023

Current Step

Use different install commands based on user's environment

Going to start off with this task so that the "Install" button will be useable for users that aren't using pip. Once it's done, we'd only have to default to pip if the user has an unknown env. It also doesn't need any design work since it's just adjusting the commands we run internally and removing the Setup pip mentions for users with known environment types.

Design Ideas For Next Steps

Recognize that the selected python environment is not a virtual environment and prompt them to create a virtual environment

One idea I had was show a "Create Env" button if the user is in a global env. This "Create Env" would run the "Python: Create Environment..." then install DVC packages within that environment. Could also remove the "Install" button entirely if the user is in a global environment if there isn't a use case where you're going to want DVC installed in a global python environment.

Screenshot 2023-06-05 at 4 33 40 PM

Improve the step contents, giving the user a better understanding of the selected environment

Sounds like something we could put in the DVC CLI details. An example of adding an "Environment" row:

Screenshot 2023-06-05 at 4 58 55 PM Screenshot 2023-06-05 at 5 04 24 PM

Another option is adjusting our text content, but it felt verbose when I attempted that:

Screenshot 2023-06-05 at 5 08 52 PM

What do we think? Any other ideas? cc @iterative/vs-code, @shcheklein

UPDATE after the planning meeting discussion, these design ideas need another iteration. I think they're too complicated.

@julieg18
Copy link
Contributor Author

julieg18 commented Jun 7, 2023

After the discussion in the planning meeting, going to update the task list:

Old task list

  • Use different install commands based on user's environment
  • Recognize that the selected python environment is not a virtual environment and prompt them to create a virtual environment
  • Improve the step contents, giving the user a better understanding of the selected environment

For now, we're going to just focus on using pip for an install command since:

  • it's used in many cases
  • there is no vscode command we can run to get a desired install command, we'd have to create desired commands from scratch, meaning more code to maintain

New Task List

  • Incorporate the Python Extension's Create Env... into the setup. (We could add an extra quick pick in our Configure command that adds the Create Env option OR show an extra button in the Setup page)
  • Rethink step contents, and review what we can adjust to make DVC configuration more clear (Main points to review: Configure button name, information on how we got selected environment, and adding a "Select Python Interpreter" button)

@shcheklein
Copy link
Member

@julieg18 thanks! let me know if you need to review the text or iterate on it.

@julieg18
Copy link
Contributor Author

julieg18 commented Jun 10, 2023

Created some ideas for improving the step contents:

Old Design

Screenshot 2023-06-10 at 6 20 12 PM

New Design

Screenshot 2023-06-10 at 6 15 09 PM
  • adds a warning text in parenthesis if the environment is not a virtual one
  • adds a button that opens a quick pick, letting the user choose between creating an environment or selecting from current ones
  • renames "Configure" to "Locate DVC"

I also thought of simplifying the "Create or Select Env" button, but wasn't sure if "Set Env" was clear enough:

Screenshot 2023-06-10 at 6 12 22 PM

Another idea was putting more focus on the python extension actions and moving the "setup the workspace" command into the text:

Screenshot 2023-06-10 at 6 14 37 PM

I'll get started on the first image for now. What do we think? cc @shcheklein

@shcheklein
Copy link
Member

I like Set Env and Locate DVC much much better compared to generic Configure, Update, etc.

@mattseddon
Copy link
Member

I think we can remove the second sentence from the new design:

image

If needed put (pip) after Auto-install or somewhere in the final sentence but I think it can be skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: onboarding Improving and simplifying users happy path. How do we get them have value asap?
Projects
None yet
Development

No branches or pull requests

3 participants