|
1 | 1 | ## Code Style & Organization |
2 | | - |
3 | 2 | - Order method, fields and properties, first by accessibility and then by alphabetical order. |
4 | 3 | - Don't add the Microsoft copyright header to new files. |
5 | 4 | - Use `Uri.joinPath()` for constructing file paths to ensure platform-correct path separators (e.g., `Uri.joinPath(venvPath, 'share', 'jupyter', 'kernels')` instead of string concatenation with `/`) |
6 | | -- Follow established patterns, especially when importing new packages (e.g. instead of importing uuid directly, use the helper `import { generateUuid } from '../platform/common/uuid';`) |
7 | | - |
8 | | - |
9 | | -## Code conventions |
10 | | - |
11 | | -- Always run `npx prettier` before committing |
12 | 5 |
|
13 | 6 | ## Testing |
14 | | - |
15 | 7 | - Unit tests use Mocha/Chai framework with `.unit.test.ts` extension |
16 | 8 | - Test files should be placed alongside the source files they test |
17 | 9 | - Run all tests: `npm test` or `npm run test:unittests` |
18 | 10 | - Run single test file: `npx mocha --config ./build/.mocha.unittests.js.json ./out/path/to/file.unit.test.js` |
19 | 11 | - Tests run against compiled JavaScript files in `out/` directory |
20 | 12 | - Use `assert.deepStrictEqual()` for object comparisons instead of checking individual properties |
21 | 13 |
|
22 | | - |
23 | 14 | ## Project Structure |
24 | | - |
25 | 15 | - VSCode extension for Jupyter notebooks |
26 | 16 | - Uses dependency injection with inversify |
27 | 17 | - Follows separation of concerns pattern |
28 | 18 | - TypeScript codebase that compiles to `out/` directory |
29 | 19 |
|
30 | 20 | ## Deepnote Integration |
31 | | - |
32 | 21 | - Located in `src/notebooks/deepnote/` |
33 | 22 | - Refactored architecture: |
34 | 23 | - `deepnoteTypes.ts` - Type definitions |
|
39 | 28 | - `deepnoteActivationService.ts` - VSCode activation |
40 | 29 | - Whitespace is good for readability, add a blank line after const groups and before return statements |
41 | 30 | - Separate third-party and local file imports |
42 | | -- How the extension works is described in @architecture.md |
| 31 | +- How the extension works is described in @architecture.md |
0 commit comments