- Move test scripts to tests/ directory for better organization - Add improved YOLOv5 postprocessing with reference implementation - Update gitignore to exclude *.mflow files and include main.spec - Add debug capabilities and coordinate scaling improvements - Enhance multi-series support with proper validation - Add AGENTS.md documentation and example utilities 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2.7 KiB
2.7 KiB
Repository Guidelines
Project Structure & Module Organization
main.py: Application entry point.core/: Engine and logiccore/functions/: inference, device, and workflow orchestrationcore/nodes/: node types and base classescore/pipeline.py: pipeline analysis/validation
ui/: PyQt5 UI (windows, dialogs, components)config/: settings and themeresources/: assetstests/+ roottest_*.py: runnable test scripts
Build, Test, and Development Commands
- Environment: Python 3.9–3.11.
- Setup (uv):
uv venv && . .venv/bin/activate(Windows:.venv\Scripts\activate), thenuv pip install -e . - Setup (pip):
python -m venv .venv && activate && pip install -e . - Run app:
python main.py - Run tests (examples):
python tests/test_integration.pypython tests/test_deploy.py- Many tests are direct scripts; run from repo root.
Coding Style & Naming Conventions
- Python, PEP 8, 4-space indents.
- Names: modules/functions
snake_case, classesPascalCase, constantsUPPER_SNAKE_CASE. - Prefer type hints and docstrings for new/changed code.
- Separation: keep UI in
ui/; business logic incore/; avoid mixing concerns.
Testing Guidelines
- Place runnable scripts under
tests/and nametest_*.py. - Follow TDD principles in
CLAUDE.md(small, focused tests; Red → Green → Refactor). - GUI tests: create a minimal
QApplicationas needed; keep long-running or hardware-dependent tests optional. - Example pattern:
if __name__ == "__main__": run_all_tests()to allow direct execution.
Commit & Pull Request Guidelines
- Small, atomic commits; all tests pass before commit.
- Message style: imperative mood; note change type e.g.
[Structural]vs[Behavioral]perCLAUDE.md. - PRs include: clear description, linked issue, test plan, and screenshots/GIFs for UI changes.
- Do not introduce unrelated refactors in feature/bugfix PRs.
Security & Configuration Tips
- Do not commit firmware (
fw_*.bin) or model (.nef) files. - Avoid hard-coded absolute paths; use project-relative paths and config in
config/. - Headless runs: set
QT_QPA_PLATFORM=offscreenwhen needed.
Agent-Specific Instructions
- Scope: applies to entire repository tree.
- Make minimal, targeted patches; do not add dependencies without discussion.
- Prefer absolute imports from package root; keep edits consistent with existing structure and naming.
TOOL to use
- 你可以使用 「gemini -p "xxx"」來呼叫 gemini cli 這個工具做事情, gemini cli 的上下文 token 很大,你可以用它找專案裡的程式碼,上網查資料等。但禁止使用它修改或刪除檔案。以下是一個使用範例
- Bash(gemini -p "找出專案裡使用 xAI 的地方")