You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+17-16Lines changed: 17 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,9 +87,9 @@ src/ # Source code for the extension
87
87
└── test/ # Integration, unit and end-to-end tests
88
88
```
89
89
90
-
### Component Instructions
90
+
### Component-Specific Instructions
91
91
92
-
**IMPORTANT**: Before modifying code in directories below, you **MUST** read the corresponding instruction file(s).
92
+
**IMPORTANT**: Before modifying any code in the directories listed below, you **MUST**first read the corresponding instruction file to understand the specific conventions, patterns, and architectural requirements for that component.
93
93
94
94
Each component has detailed guidelines that cover:
95
95
- Architecture patterns and design principles
@@ -99,17 +99,18 @@ Each component has detailed guidelines that cover:
**For AI/Copilot**: Always read the relevant instruction file(s) before modifying code in these directories to ensure adherence to component-specific patterns.
102
+
#### Required Reading by Directory
103
+
104
+
| Directory/Component | Instruction File | When to Read |
|`src/platform/**`|`.github/instructions/platform.instructions.md`| Before working with cross-platform abstractions, utilities, or core services |
107
+
|`src/kernels/**`|`.github/instructions/kernel.instructions.md`| Before modifying kernel management, execution, or communication logic |
108
+
|`src/kernels/jupyter/**`|`.github/instructions/kernel-jupyter.instructions.md`| Before working with Jupyter protocol implementation or Jupyter-specific features |
109
+
|`src/notebooks/**`|`.github/instructions/notebooks.instructions.md`| Before modifying notebook controllers, editing, or management features |
110
+
|`src/interactive-window/**`|`.github/instructions/interactiveWindow.instructions.md`| Before working with Python Interactive window (REPL) functionality |
111
+
|`src/standalone/**`|`.github/instructions/standalone.instructions.md`| Before modifying standalone mode or isolated execution features |
112
+
|`src/notebooks/controllers/ipywidgets/**`|`.github/instructions/ipywidgets.instructions.md`| Before working with IPython widget support |
113
+
|`src/webviews/extension-side/ipywidgets/**`|`.github/instructions/ipywidgets.instructions.md`| Before modifying extension-side widget communication |
114
+
|`src/webviews/webview-side/ipywidgets/**`|`.github/instructions/ipywidgets.instructions.md`| Before working with frontend widget rendering |
115
+
116
+
**For AI/Copilot**: Always use the `read_file` tool to read the relevant instruction file(s) before analyzing, modifying, or creating code in these directories. This ensures adherence to component-specific patterns and prevents architectural violations.
mockInstance.then=undefined; // Ensure 'then' is undefined to prevent hanging
30
30
```
31
31
32
+
## Integration Tests
33
+
These tests can be a little slow as VS Code needs to be downloaded and launched.
34
+
- Use `npm run test:integration` to run integration tests with local Jupyter Kernels (add `-- -- --grep <pattern>` to filter tests, pay attention to the prefix `-- --`)
35
+
- Use `npm run test:integration:web` to run integration tests with Remote Jupyter Kernels and VSCode in browser (`--grep` is not supported)
36
+
37
+
32
38
## Scripts
33
39
- Use `npm install` to install dependencies if you changed `package.json`
34
-
- Use `npm run test:unittests` for unit tests (add `--grep <pattern>` to filter tests)
40
+
- Use `npm run test:unittests` for unit tests (add `-- -- --grep <pattern>` to filter tests, pay attention to the prefix `-- --`)
41
+
- Use `npm run test:integration` to run integration tests with local Jupyter Kernels (add `-- -- --grep <pattern>` to filter tests, pay attention to the prefix `-- --`)
42
+
- Use `npm run test:integration:web` to run integration tests with Remote Jupyter Kernels and VSCode in browser (`--grep` is not supported)
35
43
- Use `npm run lint` to check for linter issues
36
44
- Use `npm run format` to check code style
37
45
- Use `npm run format-fix` to auto-fix formatting issues
46
+
47
+
## PreCommit
48
+
Always run the following scripts before committing changes:
49
+
-`npm run format-fix` to ensure proper code formatting
50
+
-`npm run lint` to check for linter issues and attempt to fix before committing.
51
+
-`npm run test:unittests` to check for tests failures and attempt to fix before committing.
0 commit comments