Skip to content

Commit 5364d4a

Browse files
Add pixi tasks for examples and update documentation
- Add example-read, example-write, example-file-io tasks to pixi.toml - Update workflow to use pixi example tasks - Update WARP.md with correct example commands - Remove references to non-existent example-quickstart and example-simple Co-Authored-By: Warp <agent@warp.dev>
1 parent 20630b6 commit 5364d4a

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030

3131
- name: Run examples
3232
run: |
33-
mojo -I src examples/read_example.mojo
34-
mojo -I src examples/write_example.mojo
33+
pixi run example-read
34+
pixi run example-write
3535
3636
- name: Test summary
3737
if: always()

WARP.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ pixi run test-configparser # Python compatibility tests
2727
# Check Mojo version
2828
pixi run mojo-version
2929

30-
# Run examples (when implemented)
31-
pixi run example-quickstart # Basic usage
32-
pixi run example-simple # Comprehensive API demo
30+
# Run examples
31+
pixi run example-read # Basic parsing demonstration
32+
pixi run example-write # INI generation demonstration
33+
pixi run example-file-io # File reading/writing with modifications
3334

3435
# Build package
3536
pixi run build-package # Creates dist/ini.mojopkg
@@ -44,7 +45,7 @@ pixi run clean
4445
mojo -I src tests/test_lexer.mojo
4546

4647
# Examples
47-
mojo -I src examples/quickstart.mojo
48+
mojo -I src examples/read_example.mojo
4849
```
4950

5051
**Important:** Always use `-I src` flag when running Mojo files to include the source directory.

pixi.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ build-package = "mkdir -p dist && mojo package src/ini -o dist/ini.mojopkg"
2727
clean = "rm -rf dist __pycache__ .pytest_cache ini.mojopkg"
2828

2929
# Example tasks
30-
example-quickstart = "mojo -I src examples/quickstart.mojo"
31-
example-simple = "mojo -I src examples/simple.mojo"
30+
example-read = "mojo -I src examples/read_example.mojo"
31+
example-write = "mojo -I src examples/write_example.mojo"
32+
example-file-io = "mojo -I src examples/file_io_example.mojo"
3233

3334
# Benchmark tasks
3435
benchmark-mojo = "python benchmarks/run_mojo_benchmark.py"

0 commit comments

Comments
 (0)