Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Oct 9, 2024
1 parent 5836b66 commit 5e06645
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 103 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

Here is where you can find details about the latest updates to this extension:
- Highlighted features for the latest release are described in the VS Code release notes, under the "Contributions to extensions" section: https://code.visualstudio.com/updates

- Highlighted features for the latest release are described in the VS Code
release notes, under the "Contributions to extensions" section:
https://code.visualstudio.com/updates
10 changes: 6 additions & 4 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Microsoft Open Source Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
This project has adopted the
[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).

Resources:

- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
- Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with
questions or concerns
65 changes: 37 additions & 28 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,50 +34,59 @@ npm ci

### Incremental Builds

* Run `npm run esbuild-node-watch` for desktop version of extension
* Run `npm run esbuild-web-watch` for desktop version of extension
* Run `npm run test-compile-watch` for compilation of tests for the desktop as well as some scripts required for Web Tests
* Run `npm run test-compile-wepack-watch` for compilation of tests for the web
- Run `npm run esbuild-node-watch` for desktop version of extension
- Run `npm run esbuild-web-watch` for desktop version of extension
- Run `npm run test-compile-watch` for compilation of tests for the desktop as
well as some scripts required for Web Tests
- Run `npm run test-compile-wepack-watch` for compilation of tests for the web

### Errors and Warnings

TypeScript errors and warnings will be displayed in the `Problems` window of Visual Studio Code.
Best to use the command `npm run test-compile-watch` to get `Problems` showing up in the `Problems` window.
TypeScript errors and warnings will be displayed in the `Problems` window of
Visual Studio Code. Best to use the command `npm run test-compile-watch` to get
`Problems` showing up in the `Problems` window.

### Run dev build and validate your changes

To test changes, open the `vscode-jupyter` folder in VSCode, and select the workspace titled `vscode-jupyter`.
Then, open the debug panel by clicking the `Run and Debug` icon on the sidebar, select the `Extension`
option from the top menu, and click start. A new window will launch with the title
To test changes, open the `vscode-jupyter` folder in VSCode, and select the
workspace titled `vscode-jupyter`. Then, open the debug panel by clicking the
`Run and Debug` icon on the sidebar, select the `Extension` option from the top
menu, and click start. A new window will launch with the title
`[Extension Development Host]`.

### Running Desktop Tests

* Setup and start Jupyter Hub locally
* Update the `./build/jupyterhub_config.py` to replace `runner` with the username of the current computer
* Launch JupyterHub via the CLI `python -m jupyterhub --config <fully qualified path to Jupyter Hub repo>/build/jupyterhub_config.py`
* Verify Jupyter Hub is running and listening at `http://localhost:8000`
* Run the script `npm run esbuild-node-watch`
* Run the script `npm run test-compile-watch`
* From within VS Code run the launch option `Tests`

- Setup and start Jupyter Hub locally
- Update the `./build/jupyterhub_config.py` to replace `runner` with the
username of the current computer
- Launch JupyterHub via the CLI
`python -m jupyterhub --config <fully qualified path to Jupyter Hub repo>/build/jupyterhub_config.py`
- Verify Jupyter Hub is running and listening at `http://localhost:8000`
- Run the script `npm run esbuild-node-watch`
- Run the script `npm run test-compile-watch`
- From within VS Code run the launch option `Tests`

### Running Web Tests

* Setup and start Jupyter Hub locally
* Update the `./build/jupyterhub_config.py` to replace `runner` with the username of the current computer
* Launch JupyterHub via the CLI `python -m jupyterhub --config <fully qualified path to Jupyter Hub repo>/build/jupyterhub_config.py`
* Verify Jupyter Hub is running and listening at `http://localhost:8000`
* Run the script `npm run esbuild-web-watch`
* Run the script `npm run test-compile-watch`
* Run the script `npm run test-compile-webpack-watch`
* From the terminal run the command `npm run test:web`
- Setup and start Jupyter Hub locally
- Update the `./build/jupyterhub_config.py` to replace `runner` with the
username of the current computer
- Launch JupyterHub via the CLI
`python -m jupyterhub --config <fully qualified path to Jupyter Hub repo>/build/jupyterhub_config.py`
- Verify Jupyter Hub is running and listening at `http://localhost:8000`
- Run the script `npm run esbuild-web-watch`
- Run the script `npm run test-compile-watch`
- Run the script `npm run test-compile-webpack-watch`
- From the terminal run the command `npm run test:web`

### Standard Debugging

Clone the repo into any directory, open that directory in VSCode, and use the `Build and launch` launch option within VSCode.
Clone the repo into any directory, open that directory in VSCode, and use the
`Build and launch` launch option within VSCode.

### Coding Standards

Information on our coding standards can be found [here](https://github.com/Microsoft/vscode-jupyter/blob/main/CODING_STANDARDS.md).
We have CI tests to ensure the code committed will adhere to the above coding standards.
Information on our coding standards can be found
[here](https://github.com/Microsoft/vscode-jupyter/blob/main/CODING_STANDARDS.md).
We have CI tests to ensure the code committed will adhere to the above coding
standards.
54 changes: 41 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,61 @@
# JupyterHub Extension for Visual Studio Code

A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) that integrates with the Jupyter Extension allowing user to connect and execute code against kernels running on [JupyterHub](https://jupyter.org/hub).
A [Visual Studio Code](https://code.visualstudio.com/)
[extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)
that integrates with the Jupyter Extension allowing user to connect and execute
code against kernels running on [JupyterHub](https://jupyter.org/hub).

### Quick Start

- **Step 1.** Install [VS Code](https://code.visualstudio.com/)
- **Step 2.** Install the [JupyterHub Extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-hub)
- **Step 3.** Open or create a notebook file by opening the Command Palette (`Ctrl+Shift+P`) and select `Jupyter: Create New Jupyter Notebook`.
- **Step 4.** Open the kernel picker by clicking on the kernel picker in the top right of the notebook or by invoking the `Notebook: Select Notebook Kernel` command
- **Step 2.** Install the
[JupyterHub Extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-hub)
- **Step 3.** Open or create a notebook file by opening the Command Palette
(`Ctrl+Shift+P`) and select `Jupyter: Create New Jupyter Notebook`.
- **Step 4.** Open the kernel picker by clicking on the kernel picker in the
top right of the notebook or by invoking the
`Notebook: Select Notebook Kernel` command
- Select the option `Existing JupyterHub Server...`
- Follow the prompts to enter the Url of the JupyterHub Server, username and password (or an [API token](https://github.com/microsoft/vscode-jupyter-hub/wiki/Logging-in-with-Username-and-API-token)).
- Follow the prompts to enter the Url of the JupyterHub Server, username and
password (or an
[API token](https://github.com/microsoft/vscode-jupyter-hub/wiki/Logging-in-with-Username-and-API-token)).
- Next select a Kernel and start coding!

![jupyterHubPreview](https://github.com/microsoft/vscode-jupyter-hub/assets/1948812/0fadd80c-3455-4408-8be9-8c6441809654)

## Questions, issues, feature requests, and contributions

- If you have a question about how to accomplish something with the extension, please [ask on Discussions](https://github.com/microsoft/vscode-jupyter/discussions). - Any and all feedback is appreciated and welcome! If you come across a problem or bug with the extension, please [file an issue](https://github.com/microsoft/vscode-jupyter-hub/issues/new).
- If someone has already [filed an issue](https://github.com/Microsoft/vscode-jupyter-hub/issues) that encompasses your feedback, please leave a 👍/👎 reaction on the issue.
- If you have a question about how to accomplish something with the extension,
please
[ask on Discussions](https://github.com/microsoft/vscode-jupyter/discussions). -
Any and all feedback is appreciated and welcome! If you come across a
problem or bug with the extension, please
[file an issue](https://github.com/microsoft/vscode-jupyter-hub/issues/new).

- If someone has already
[filed an issue](https://github.com/Microsoft/vscode-jupyter-hub/issues)
that encompasses your feedback, please leave a 👍/👎 reaction on the
issue.

- Contributions are always welcome, so please see our [contributing guide](https://github.com/Microsoft/vscode-jupyter-hub/blob/main/CONTRIBUTING.md) for more details.
- Contributions are always welcome, so please see our
[contributing guide](https://github.com/Microsoft/vscode-jupyter-hub/blob/main/CONTRIBUTING.md)
for more details.

## Data and telemetry

The Microsoft Jupyter Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://privacy.microsoft.com/privacystatement) to learn more. This extension respects the `telemetry.telemetryLevel` setting which you can learn more about at https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.
The Microsoft Jupyter Extension for Visual Studio Code collects usage data and
sends it to Microsoft to help improve our products and services. Read our
[privacy statement](https://privacy.microsoft.com/privacystatement) to learn
more. This extension respects the `telemetry.telemetryLevel` setting which you
can learn more about at
https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.

## Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
trademarks or logos is subject to and must follow
This project may contain trademarks or logos for projects, products, or
services. Authorized use of Microsoft trademarks or logos is subject to and must
follow
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Any use of third-party trademarks or logos are subject to those third-party's policies.
Use of Microsoft trademarks or logos in modified versions of this project must
not cause confusion or imply Microsoft sponsorship. Any use of third-party
trademarks or logos are subject to those third-party's policies.
51 changes: 36 additions & 15 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,61 @@

## Security

Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).
Microsoft takes the security of our software products and services seriously,
which includes all source code repositories managed through our GitHub
organizations, which include [Microsoft](https://github.com/Microsoft),
[Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet),
[AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.
If you believe you have found a security vulnerability in any Microsoft-owned
repository that meets
[Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition),
please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.**

Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).
Instead, please report them to the Microsoft Security Response Center (MSRC) at
[https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).

If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
If you prefer to submit without logging in, send email to
[secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your
message with our PGP key; please download it from the
[Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).

You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
You should receive a response within 24 hours. If for some reason you do not,
please follow up via email to ensure we received your original message.
Additional information can be found at
[microsoft.com/msrc](https://www.microsoft.com/msrc).

Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
Please include the requested information listed below (as much as you can
provide) to help us better understand the nature and scope of the possible
issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting,
etc.)
- Full paths of source file(s) related to the manifestation of the issue
- The location of the affected source code (tag/branch/commit or direct URL)
- Any special configuration required to reproduce the issue
- Step-by-step instructions to reproduce the issue
- Proof-of-concept or exploit code (if possible)
- Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.
If you are reporting for a bug bounty, more complete reports can contribute to a
higher bounty award. Please visit our
[Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for
more details about our active programs.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).
Microsoft follows the principle of
[Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
4 changes: 2 additions & 2 deletions package.nls.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"capabilities.untrustedWorkspace.description": "Execution of cells in Interactive Window and Notebooks is not supported in untrusted workspaces.",
"jupyterHub.configuration.jupyterHub.log.description": "The logging level the extension logs at."
"capabilities.untrustedWorkspace.description": "Execution of cells in Interactive Window and Notebooks is not supported in untrusted workspaces.",
"jupyterHub.configuration.jupyterHub.log.description": "The logging level the extension logs at."
}
50 changes: 25 additions & 25 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2020",
"jsx": "react",
"compilerOptions": {
"module": "commonjs",
"target": "es2020",
"jsx": "react",

// Types
"lib": [],
"types": [],
// Types
"lib": [],
"types": [],

// Features/output
"sourceMap": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"removeComments": true,
"resolveJsonModule": true,
// Features/output
"sourceMap": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"removeComments": true,
"resolveJsonModule": true,

// Strictness
"strict": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"useUnknownInCatchVariables": false,
"strictPropertyInitialization": false
}
// Strictness
"strict": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"useUnknownInCatchVariables": false,
"strictPropertyInitialization": false
}
}
30 changes: 15 additions & 15 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "src",
"outDir": "out",
"extends": "./tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"rootDir": "src",
"outDir": "out",

// Types
"lib": ["es6", "es2018", "dom", "ES2019", "ES2020"],
"paths": {
"*": ["types/*"]
},
"typeRoots": ["./node_modules/@types"],
"types": ["webpack-env"]
},
"include": ["./src/**/*", "./vscode.*"],
"exclude": ["src/server/node_modules", "src/node_modules"]
// Types
"lib": ["es6", "es2018", "dom", "ES2019", "ES2020"],
"paths": {
"*": ["types/*"]
},
"typeRoots": ["./node_modules/@types"],
"types": ["webpack-env"]
},
"include": ["./src/**/*", "./vscode.*"],
"exclude": ["src/server/node_modules", "src/node_modules"]
}

0 comments on commit 5e06645

Please sign in to comment.