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