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

Implement cases for pipenv and poetry module installers for the DataScienceInstaller #16616

Merged
merged 7 commits into from
Jul 8, 2021

Conversation

tonybaloney
Copy link

Fixes #16615

There are 4 module installers:

    serviceManager.addSingleton<IModuleInstaller>(IModuleInstaller, CondaInstaller);
    serviceManager.addSingleton<IModuleInstaller>(IModuleInstaller, PipInstaller);
    serviceManager.addSingleton<IModuleInstaller>(IModuleInstaller, PipEnvInstaller);
    serviceManager.addSingleton<IModuleInstaller>(IModuleInstaller, PoetryInstaller);

I noticed that the names of the Pipenv and poetry installers are constants, so I've imported those constant values instead of hardcoding the string (like it is with the Pip string)

@joyceerhl
Copy link

FWIW, I believe the data science team intentionally only implemented support for installing via pip and conda, under the assumption that data science packages like jupyter and tensorboard aren't generally installed as project dependencies and don't need to be managed through poetry and pipenv (at least, I remember discussing this with @DonJayamanne when I was implementing TensorBoard integration for the Python extension earlier this year). See: #11717

@tonybaloney
Copy link
Author

Both the Pipenv and Poetry installers are run with the --dev flag, so its not installed as a project dependency. These are the installers that are run for any other VS Code dependency, black, pylint, autopep8. The current behaviour is inconsistent with the how the Python extension handles missing packages for its own purposes.

Also, running pip within a poetry environment will work, but it puts the lock file out of sync and causes other issues.

@joyceerhl
Copy link

Tagging the data science engineers as FYI since I believe our team owns the data science-specific parts of the Python extension codebase 😊

@IanMatthewHuff
Copy link
Member

LGTM from data science side. Final signoff should be from the Python folks though.

@tonybaloney
Copy link
Author

@kimadeline can you review for the Python extension team please

Copy link

@kimadeline kimadeline left a comment

Choose a reason for hiding this comment

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

:shipit:

@kimadeline
Copy link

@tonybaloney PR looks good, please fix the TypeScript tests and we can merge it afterwards.

@tonybaloney
Copy link
Author

@kimadeline oops. fixed it.

@kimadeline kimadeline merged commit 9347aa4 into microsoft:main Jul 8, 2021
@tonybaloney tonybaloney deleted the poetry_install_dep branch July 9, 2021 00:28
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.

The JupyterExtensionIntegration.install() is invoking the incorrect installer from the Jupyter extension
5 participants