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

Separate Jupyter session creator for raw and Jupyter #13439

Merged
merged 6 commits into from
May 2, 2023

Conversation

DonJayamanne
Copy link
Contributor

Part of #12832

@DonJayamanne DonJayamanne force-pushed the separateJupyterSessionCreatorForRawAndJupyter branch from 03c2094 to 90b1168 Compare May 2, 2023 13:10
@DonJayamanne DonJayamanne marked this pull request as ready for review May 2, 2023 13:46
@DonJayamanne DonJayamanne enabled auto-merge (squash) May 2, 2023 13:46
import { PythonExtensionNotInstalledError } from '../../../platform/errors/pythonExtNotInstalledError';

@injectable()
export class JupyterServerConnector implements IJupyterServerConnector {
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Better names

@DonJayamanne DonJayamanne merged commit 0d2d0c3 into main May 2, 2023
@DonJayamanne DonJayamanne deleted the separateJupyterSessionCreatorForRawAndJupyter branch May 2, 2023 17:57
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.

2 participants