Iter 21 — ultra-opt for protocol correctness across the two production decoders. Pin the same 32-byte canonical hex in both Python and Rust tests; if either decoder drifts from the wire, ONE of the tests starts failing — and it's clear which side moved. Canonical packet: COM9 sync-pkt #1 from §A0.12 live capture, expressed as exact little-endian bytes: 10a111c5 09 01 06 00 magic + node + ver + flags + rsvd f26db70100000000 local_us = 28_798_450 c5aca50100000000 epoch_us = 27_634_885 1400000000000000 sequence = 20 + reserved Python test: archive/v1/tests/unit/test_esp32_binary_parser.py::TestSyncPacketParser ::test_canonical_wire_bytes_match_rust_decoder — decodes the pinned hex, asserts every field including the §A0.10 1,163,565 µs offset. Rust test: v2/crates/wifi-densepose-hardware/src/sync_packet.rs::tests ::canonical_wire_bytes_match_python_decoder — decodes the same bytes, asserts the same fields, then re-encodes via to_bytes() and asserts the round-trip produces the EXACT same 32 bytes. So this also catches drift in the Rust encoder. Test counts after this iter: Rust sync_packet: 15/15 green (was 14) Python SyncPacketParser: 7/7 green (was 6) Branch contract: if a future PR changes the firmware wire format, BOTH tests must be updated atomically with the new canonical hex. CI will gate this naturally. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|---|---|---|
| .. | ||
| data | ||
| docs | ||
| scripts | ||
| src | ||
| tests | ||
| README.md | ||
| __init__.py | ||
| requirements-lock.txt | ||
| setup.py | ||
| test_application.py | ||
| test_auth_rate_limit.py | ||
README.md
WiFi-DensePose v1 (Python Implementation)
This directory contains the original Python implementation of WiFi-DensePose.
Structure
v1/
├── src/ # Python source code
│ ├── api/ # REST API endpoints
│ ├── config/ # Configuration management
│ ├── core/ # Core processing logic
│ ├── database/ # Database models and migrations
│ ├── hardware/ # Hardware interfaces
│ ├── middleware/ # API middleware
│ ├── models/ # Neural network models
│ ├── services/ # Business logic services
│ └── tasks/ # Background tasks
├── tests/ # Test suite
├── docs/ # Documentation
├── scripts/ # Utility scripts
├── data/ # Data files
├── setup.py # Package setup
├── test_application.py # Application tests
└── test_auth_rate_limit.py # Auth/rate limit tests
Requirements
- Python 3.10+
- PyTorch 2.0+
- FastAPI
- PostgreSQL/SQLite
Installation
cd v1
pip install -e .
Usage
# Start API server
python -m src.main
# Run tests
pytest tests/
Note
This is the legacy Python implementation. For the new Rust implementation with improved performance, see /v2/.