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

Universal dependency installer (and universal debugger code evaluator) #10638

Closed
5 tasks done
sadasant opened this issue Jun 30, 2022 · 2 comments
Closed
5 tasks done
Assignees
Labels
debt Code quality issues

Comments

@sadasant
Copy link
Contributor

sadasant commented Jun 30, 2022

This issue tracks the progress towards a more universal installer. To close this issue, we should end satisfying the following considerations:

  • Have the Data Frame working on the web (therefore having DataFrame working in web extension #9665 fixed).
  • To have a new service, DebuggerEvaluator, with an evaluate function that would allow the execution of code on the debugger.
    • This debugger evaluator should replace all (or at least most) of the current usages of the DebugLocationTrackerFactory.
  • To have an IInstaller that supports installing dependencies given an IKernel and a DebuggerSession.
    • The installer should show the appropriate message to the user regarding whether the kernel or the debugger may need to be restarted.

To achieve the above, I will focus on making the following PRs in order.

  • (Urgent) Enable the Data Frame on the web (Fixing DataFrame working in web extension #9665)
    • By changing the IDataViewerDependencyService to receive an IKernel besides the PythonEnvironment that it receives today.
    • By adding a universal version of the dataViewerDependencyService that would only work if IKernel is provided and throw otherwise an error saying Installation of "pandas" not supported while debugging. Please ensure you have "pandas" installed.
    • By keeping the current node-specific version of the dataViewerDependencyService that would extract the interpreter from the IKernel if the IKernel is provided.
    • Besides ensuring the dataViewerDependencyService is registered on the web service registry, and removing the conditional that disables the Data Frame on the web.
  • Create a DebugEvaluator service #10639
    • This service would allow any other piece of code to run Python on the debugger.
    • This service will copy how the current DebugLocationTrackerFactory retrieves the frame ID.
    • This service will replace all the current usages of the DebugLocationTrackerFactory in the same PR.
  • dataViewerDependencyService to derive the interpreter from the DebugEvaluator #10640
    • Replace the usage of the PythonEnvironment (the interpreter) from the parameters of the dataViewerDependencyService methods and use the DebugEvaluator instead.
    • Evaluate code to get the interpreter path then use the old interpreter code.
  • Install Data Viewer dependencies using the DebuggerEvaluator #10641
    • Enable installing pandas on the Debugger version of the dataViewerDependencyService by using the code underneath %pip and %conda in iPython.
    • Completely remove the usage of the interpreter from the dataViewerDependencyService.
    • If pandas needs to be installed (either because it's not yet installed or because the version is inadequate), show a prompt message saying that You may need to restart the debugger after the installation is complete.
  • IInstaller to support IKernel and DebuggerEvaluator #10642
    • Move the code from dataViewerDependencyService into the IInstaller to provide a universal installer experience that could be used to install any package with either a Kernel or the active debugger.

Feedback always appreciated!

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Aug 13, 2022

personally think a universal installer is over kill, best to walk through the user workflow and figure this out.
eg we could even prompt users to install manually or automate it without the debugger, eg sometimes installed packages won't be available in the active debug session, making this whole exercise pointless. meaning we could just ask the user to restart the debugger to get the latest packages.

@DonJayamanne
Copy link
Contributor

Closing this issue as I don't think we need this

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues
Projects
None yet
Development

No branches or pull requests

4 participants