forked from zakaria/chicken-counting-sukawarna-det
2.1 KiB
2.1 KiB
Changelog
All notable changes to the chicken-counting-sukawarna-det project are documented in this file.
[Unreleased] - 2026-08-19
🐛 Bug Fixes
- Multi-Floor Script Syntax (
run_all_coops.sh):- Resolved fatal
syntax error: unexpected end of filecaused by missingdonein floor configuration discovery loop. - Expanded config discovery pattern from
K*-L*.yamlto*.yamlto support custom named coops (e.g.kandang-atas.yaml).
- Resolved fatal
- Excel Report Empty Result Crash (
export_excel_report.py):- Added empty DataFrame pre-check to prevent
IndexErrorwhen exporting reports for dates with no batch runs or newly initialized databases.
- Added empty DataFrame pre-check to prevent
- Multi-Threaded SQLite Concurrency (
dashboard.py):- Replaced global single
sqlite3connection with thread-local connections (threading.local()) to prevent cursor collision and race conditions across concurrent HTTP worker threads. - Enabled
PRAGMA busy_timeout = 5000andPRAGMA journal_mode = WALto avoid database lock conflicts during batch processing writes.
- Replaced global single
- Editable Package Installation:
- Configured
pip install -e .in environment setup to resolvechicken_counterimports and enable automatic unit test discovery without manualPYTHONPATHprefixes.
- Configured
⚡ Performance & Optimization
- Disk Traversal Caching in Live Dashboard (
dashboard.py):- Replaced repetitive
Path.rglob()scans on every/api/mortality/*endpoint with a thread-safe 15-second in-memory TTL cache (_MORTALITY_CACHE_TTL = 15.0s). - Added
O(1)memory index lookup for serving annotated images (/api/mortality/image/<filename>), eliminating full filesystem traversals across 30GB+ video datasets.
- Replaced repetitive
📁 Configuration & Directory Structure
- Floor Configuration & Skeleton Paths:
- Created
configs/floor_config/kandang-atas.yamlextendingcycle7_batch_optimized.yaml. - Initialized missing directory skeletons for coops
K1-L1throughK5-L2under../VIDEOS/cycle7/.
- Created
- Documentation:
- Updated
README.mdandRUN.mdwith editable install steps and updated project layout.
- Updated