Skip to content

Commit 9b2bd9b

Browse files
committed
0.7.0: Refactor, e2e tests, fault tolerance, faster cell execution
Add linting and formatting
1 parent 6eac0c6 commit 9b2bd9b

32 files changed

Lines changed: 7337 additions & 1617 deletions

.eslintrc.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
"@typescript-eslint"
1010
],
1111
"rules": {
12-
"@typescript-eslint/naming-convention": "warn",
13-
"@typescript-eslint/semi": "warn",
14-
"curly": "warn",
15-
"eqeqeq": "warn",
16-
"no-throw-literal": "warn",
17-
"semi": "off"
12+
"semi": ["error", "always"],
13+
"curly": "error",
14+
"eqeqeq": "error",
15+
"no-throw-literal": "error"
1816
},
1917
"ignorePatterns": [
2018
"out",

.github/workflows/deploy-extension.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ jobs:
1111
- uses: actions/checkout@v4
1212
- uses: actions/setup-node@v4
1313
with:
14-
node-version: 20
14+
node-version: 24.1.0
1515
- run: npm ci
1616
- name: Publish to Open VSX Registry
1717
uses: HaaLeo/publish-vscode-extension@v1
1818
id: publishToOpenVSX
19+
continue-on-error: true
1920
with:
2021
pat: ${{ secrets.OPEN_VSX_TOKEN }}
2122
- name: Publish to Visual Studio Marketplace

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"tabWidth": 4,
7+
"useTabs": false,
8+
"arrowParens": "always",
9+
"endOfLine": "lf"
10+
}
11+

.vscodeignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
.vscode/**
2-
.vscode-test/**
32
node_modules/**
43
src/**
4+
example.md
55
.gitignore
6-
.yarnrc
7-
webpack.config.js
8-
vsc-extension-quickstart.md
6+
.github/**
97
**/tsconfig.json
108
**/.eslintrc.json
119
**/*.map
1210
**/*.ts
11+
**/kernel-e2e.test.js

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## v0.7.0
4+
5+
- Large refactor of the codebase
6+
- Much faster cell execution, simple python from 500ms to <50ms, and rust <400ms
7+
- Many fixes for cell execution hanging
8+
- Fault tolerance for subprocess errors
9+
- Add groq model selection
10+
- Send all the markdown to AI models to understand context, not just the current cell
11+
- Add eslint and prettier formatting, fix all probelms
12+
- Remove Python cell interop from Mojo feature, to simplify the codebase
13+
314
## v0.6.20
415

516
- Add activation for `.mdx` files

README.md

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ When you right-click on a file and select `Reopen Editor With...` you can `confi
2626

2727
### Groq
2828

29-
- [Set up a Groq key here](https://platform.openai.com/account/api-keys) and change the setting: `mdlab: Groq key`
30-
- Select `llama3-8b` as your language and ask it a question
29+
- [Set up a Groq key here](https://console.groq.com/keys) and change the setting: `mdlab: Groq key`
30+
- Default model is `llama3-8b-8192`, change the setting with `mdlab: groq model` to use other models like `llama3-70b-8192`, `llama-3.1-8b-instant`, `gemma2-9b-it`, `qwen-qwq-32b`, etc.
31+
- Select `groq` as your language and ask it a question
3132
- Run the code blocks it generates for you
3233

3334
## How it works
@@ -50,7 +51,7 @@ Press `alt+o` to open up the source code being used to generate outputs, which w
5051

5152
## Language Support
5253

53-
It's very simple to add your own language, look inside [src/languages/rust.ts](https://github.com/jackos/mdl/blob/main/src/languages/python.ts) for an example, then add your language to the switch statement in [`src/kernel.ts`](https://github.com/jackos/mdl/blob/main/src/kernel.ts). PRs welcomed!
54+
It's very simple to add your own language, look inside [src/languages/rust.ts](https://github.com/jackos/mdlab/blob/main/src/languages/python.ts) for an example, then add your language to the switch statement in the [`src/kernel.ts`](https://github.com/jackos/mdlab/blob/main/src/kernel.ts) `createLanguageProcess` function. PRs welcomed!
5455

5556
This README.md was created with `mdlab`, these are some special features for different languages:
5657

@@ -70,21 +71,10 @@ x
7071

7172
### Mojo
7273

73-
Mojo is a new Systems programming language for AI developers with Python syntax and interop.
74+
Mojo is a new Systems programming language for AI developers with Python syntax.
7475

7576
It works with top level code and has some extra features like printing the last line.
7677

77-
Any variables you initialize in a Python cell will be available from Mojo via the `py` module:
78-
79-
```mojo
80-
var res = String("Adding a String from Python to a Mojo variable: ") + py.x
81-
res
82-
```
83-
84-
```text
85-
Adding a String from Python to a Mojo variable: [8, 7, 6, 5]
86-
```
87-
8878
LSP features don't work yet
8979

9080
### Rust
@@ -106,7 +96,7 @@ x
10696

10797
### Go
10898

109-
```llama3-8b
99+
```groq
110100
You can write top level code in Go:
111101
```
112102

@@ -168,4 +158,44 @@ echo "[ "${reversed[@]} "]"
168158

169159
```text
170160
[ 8 7 6 5 ]
171-
```
161+
```
162+
163+
## Tests
164+
165+
The project includes end-to-end tests that verify the expected outputs for all
166+
supported languages. To run the test suite:
167+
168+
```bash
169+
npm run test
170+
```
171+
172+
```plaintext
173+
🧪 Running Kernel End-to-End Tests
174+
175+
✅ Python: Simple print statement
176+
✅ Python: Variables and arithmetic
177+
✅ Python: Functions
178+
✅ Python: Import math module
179+
✅ Python: Error handling
180+
✅ Python: List comprehensions
181+
✅ Python: Dictionary operations
182+
✅ Python: Class definition
183+
✅ JavaScript: Console.log
184+
✅ JavaScript: Arrow functions
185+
✅ JavaScript: Array methods
186+
✅ JavaScript: Object destructuring
187+
✅ JavaScript: Promises
188+
✅ Bash: Echo command
189+
✅ Bash: Variables
190+
✅ Bash: Arithmetic
191+
✅ Bash: For loop
192+
✅ Bash: Function
193+
✅ Go: Hello World
194+
✅ Go: Functions and variables
195+
✅ Rust: Hello World
196+
✅ Rust: Functions
197+
198+
📊 Results: 22 passed, 0 failed
199+
```
200+
201+
If you don't have a language installed, the tests for that language will be skipped.

build.mjs

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)