-
Notifications
You must be signed in to change notification settings - Fork 299
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
Separate Jupyter session creator for raw and Jupyter #13439
Separate Jupyter session creator for raw and Jupyter #13439
Conversation
03c2094
to
90b1168
Compare
import { PythonExtensionNotInstalledError } from '../../../platform/errors/pythonExtNotInstalledError'; | ||
|
||
@injectable() | ||
export class JupyterServerConnector implements IJupyterServerConnector { |
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.
These are not the final names and final classes, the primary goal is to break down larger components into smaller ones , this way re-factoring this would be simpler and its easier
Right now there's a lot of inheritance and coupling
* Responsible for starting a Jupyter server. It's a base class because we used | ||
* to have a host and a guest version. Host version could be consolidated into this class now. | ||
*/ | ||
export class JupyterExecutionBase implements IJupyterExecution { |
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.
Deleted this base class, was inherited in one class
|
||
/** | ||
* Jupyter server implementation that uses the JupyterExecutionBase class to launch Jupyter. | ||
*/ | ||
@injectable() | ||
export class HostJupyterExecution extends JupyterExecutionBase implements IJupyterExecution { | ||
export class HostJupyterExecution implements IJupyterExecution { |
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.
Merged base class code into this class, base class was not used anywhere else, hence no point of the base class
@@ -56,7 +57,11 @@ export function registerTypes(serviceManager: IServiceManager, _isDevMode: boole | |||
JupyterUriProviderRegistration | |||
); | |||
serviceManager.addSingleton<IJupyterServerUriStorage>(IJupyterServerUriStorage, JupyterServerUriStorage); | |||
serviceManager.addSingleton<INotebookProvider>(INotebookProvider, NotebookProvider); | |||
serviceManager.addSingleton<IJupyterServerConnector>(IJupyterServerConnector, JupyterServerConnector); |
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.
Better names
Part of #12832