Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Dev

  1. Install Python
  2. Install Rust & Cargo
  3. Install Node
  4. Install pnpm
  5. pnpm install
  6. Follow the PyTauri Tutorial

After setup, you should be able to run the GUI via:

pnpm pytauri dev

Setup pre-commit

uv pip install --group dev -e src-tauri
uvx pre-commit install

Check if it’s working:

uvx pre-commit run --all-files

Troubleshooting

If running the development server fails with the error:

No module named adb_auto_player

You can fix it by reinstalling the Tauri package:

uv sync --reinstall-package=tauri-app

Common pre-commit Fixes

TID251 time.time is banned

Use this prompt with an AI to fix it instantly:

Replace any wall-clock-based elapsed-time logic (`time.time()`, `datetime.now()`) with monotonic timing. Keep the same durations but use `time.monotonic()` or `time.perf_counter()` for comparisons. Do not change logging or timestamp code.
```python
#TODO your code snippet
```

TID251 cv2.split is banned

Use this prompt with an AI to fix it instantly:

Replace `cv2.split()` with direct numpy array indexing for better performance. OpenCV uses BGR format, so use `image[:, :, 0]` for blue, `image[:, :, 1]` for green, and `image[:, :, 2]` for red.
```python
#TODO your code snippet
```