Skip to content

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

Closed
@sadasant

Description

@sadasant

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!

Metadata

Metadata

Labels

debtCode quality issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions