Commit Graph

7 Commits

Author SHA1 Message Date
wsy182 1f6c3f3de8 refactor(vision): 优化姿态关键点检测器的初始化逻辑
- 移除未使用的 threading 和 time 模块导入
- 统一委托类型的使用,避免硬编码委托类型
- 简化 GPU 和 CPU 委托的创建流程
- 修复委托类型传递的一致性问题
2026-06-10 11:26:39 +08:00
wsy182 c3f93e4441 为所有函数和类添加中文注释文档字符串 2026-06-10 10:34:11 +08:00
wsy182 c612a7ad71 style(config): 移除配置文件中的多余注释和环境变量设置
- 移除了 config.yaml 中的注释行
- 移除了 app/core/logging.py 中多余的空格
- 移除了 app/main.py 中的环境变量设置代码
- 移除了 app/main.py 中未使用的导入语句
2026-06-10 10:29:36 +08:00
wsy182 e86c2301ec Remove env var overrides, config.yaml is single source of truth
- Stripped _ENV_MAP and _apply_env_overrides from configs/load.py
- Cleaned up unused imports in video_receiver.py
- Restored MediaPipe env suppressors in app/main.py
- Removed .env.example (replaced by config.yaml)
2026-06-10 10:26:48 +08:00
wsy182 f9384f7bc1 Parse config.yaml into typed AppConfig dataclass
- ServerConfig, VideoConfig, ModelConfig, DeadBugConfig,
  AudioConfig, LoggingConfig as nested dataclasses
- Consumers use config.server.host, config.model.resolved_path etc.
- env var overrides preserved via _apply_env_overrides()
2026-06-10 10:23:51 +08:00
wsy182 c8fd057129 Centralize configuration into config.yaml
- All settings moved to config.yaml
- configs/load.py reads from config.yaml with env var overrides
- Environment variables still work for backward compatibility
- Added pyyaml to requirements
2026-06-10 10:19:41 +08:00
wsy182 4485cbf702 Refactor into modular app structure
Split monolithic files into focused modules:
- app/core: settings, logging, lifecycle
- app/signaling: websocket server, ICE parser, message models
- app/webrtc: peer session, video receiver, frame source
- app/vision: pose landmarker wrapper, model config, pose types
- app/exercises/dead_bug: detector, metrics, rules, state machine, types
- app/rendering: skeleton renderer, status overlay, window display
- app/audio: rep announcer
- app/diagnostics: perf timer, crash handler
- configs: environment-based settings
- tests: unit tests for rules, state machine, ICE parser
- run.py: entry point
2026-06-10 10:14:43 +08:00