Skip to content

Commit b68d030

Browse files
committed
Add qspy to pixi
1 parent cf18e09 commit b68d030

File tree

4 files changed

+475
-1
lines changed

4 files changed

+475
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ flycheck_*.el
210210
# Pixi
211211
.pixi/
212212

213+
# Quantum Leaps host tools downloaded by pixi tasks
214+
.tools/
215+
213216
# Ruff
214217
.ruff_cache/
215218

README.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ layout.
1414

1515
- `src/arena_interface/`: importable package and CLI
1616
- `scripts/`: developer helper scripts, including benchmark matrix helpers
17+
- `tools/`: repository-local helper tools such as the QSPY/QTools wrapper
1718
- `tests/`: lightweight smoke tests that do not require hardware
1819
- `patterns/`: small example pattern files for streaming tests
1920
- `pyproject.toml`: packaging metadata, tool configuration, and Pixi manifest
@@ -245,7 +246,7 @@ still customize labels, durations, rates, and pattern paths.
245246
Examples:
246247

247248
```sh
248-
pixi run bench -- --json-out host_only.jsonl
249+
pixi run bench --json-out host_only.jsonl
249250
pixi run bench-full --json-out host_plus_stream.jsonl
250251
pixi run bench-full --stream-rate 250 --stream-seconds 8 --json-out stream_250hz.jsonl
251252
pixi run python -m arena_interface --ethernet 192.168.10.104 bench --cmd-iters 500 --spf-rate 250
@@ -307,6 +308,68 @@ A practical workflow is:
307308
2. Capture QS logs on representative runs or anomalous runs.
308309
3. Use the QS logs to explain why two host-visible results differ.
309310

311+
## QSPY from the Python repository
312+
313+
This repository now includes the same pinned QSPY helper flow that exists in the
314+
firmware repository. That makes it easy to install QTools and capture QS logs
315+
without leaving the Python benchmark environment.
316+
317+
The helper installs Quantum Leaps QTools locally into:
318+
319+
```text
320+
.tools/quantum-leaps/
321+
```
322+
323+
That directory is ignored by `.gitignore`, so the downloaded tools do not end up
324+
in your commits.
325+
326+
Install QTools and build QSPY if needed:
327+
328+
```sh
329+
pixi run qtools-install
330+
```
331+
332+
Run QSPY on Linux:
333+
334+
```sh
335+
pixi run qspy -c /dev/ttyACM0 -b 115200
336+
```
337+
338+
Run QSPY on macOS:
339+
340+
```sh
341+
pixi run qspy -c /dev/cu.usbmodem1234 -b 115200
342+
```
343+
344+
Run QSPY on Windows:
345+
346+
```powershell
347+
pixi run qspy -c COM3 -b 115200
348+
```
349+
350+
To show QSPY's own help instead of the wrapper help, use the explicit separator:
351+
352+
```sh
353+
pixi run qspy -- -h
354+
```
355+
356+
A typical workflow is to run QSPY in one terminal and the Python benchmark in
357+
another. This works well when the arena is controlled over Ethernet and QS is
358+
streamed over the USB serial port:
359+
360+
```sh
361+
# terminal 1
362+
pixi run qspy -c /dev/ttyACM0 -b 115200
363+
364+
# terminal 2
365+
export ARENA_ETH_IP=192.168.10.104
366+
pixi run bench-full --json-out bench_results.jsonl
367+
```
368+
369+
Do not try to use QSPY and the Python package's serial transport on the same
370+
serial port at the same time. If you want simultaneous control and QS capture,
371+
use Ethernet for control and USB serial for QSPY.
372+
310373
## Cross-platform notes
311374

312375
The project configuration targets Linux, macOS, and Windows through Pixi, and
@@ -360,4 +423,6 @@ pixi run test
360423
pixi run check
361424
pixi run build
362425
pixi run archive
426+
pixi run qtools-install
427+
pixi run qspy -c /dev/ttyACM0 -b 115200
363428
```

pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ test = "pytest"
8585
check = [{ task = "lint" }, { task = "test" }]
8686
build = "python -m build"
8787
archive = "git archive --format=zip --output=../arena_interface_python.zip HEAD"
88+
qtools-install = "python tools/quantum_leaps_tools.py qtools-install"
89+
qspy = "python tools/quantum_leaps_tools.py qspy"
8890
bench = "arena-interface bench"
8991
bench-full = "arena-interface bench --stream-path patterns/pat0004.pat"
9092
bench-smoke = "arena-interface bench --cmd-iters 250 --spf-seconds 2 --stream-path patterns/pat0004.pat --stream-seconds 2"
@@ -94,3 +96,15 @@ bench-no-quickack = "arena-interface --no-tcp-quickack bench"
9496
bench-no-nodelay = "arena-interface --no-tcp-nodelay bench"
9597
bench-no-latency-tuning = "arena-interface --no-tcp-nodelay --no-tcp-quickack bench"
9698
bench-socket-matrix = "python scripts/bench_matrix.py"
99+
100+
[tool.pixi.target.linux-64.dependencies]
101+
make = "*"
102+
c-compiler = "*"
103+
104+
[tool.pixi.target.osx-64.dependencies]
105+
make = "*"
106+
c-compiler = "*"
107+
108+
[tool.pixi.target.osx-arm64.dependencies]
109+
make = "*"
110+
c-compiler = "*"

0 commit comments

Comments
 (0)