MotionTrackerLab
├─ scripts # contains all scripts for launching programs
├─ motiontracker # main library for motion tracking
├─ labweb # contains files for the webserver
│ ├─ frontend # javascript code (React) for clients
│ └─ backend # python code for webserver
├─ labconfig # python code for all configuration
├─ logs # log text files will be saved here
├─ data # any saved motion tracking data is saved here
├─ tests # contains all test files
└─ assets # pictures for documentation website
I have made up my mind to just cleanly separate frontend from backend.
What if someone navigates away from the camera after 10 seconds! Do I really want to turn off the camera! Or do a soft reset. What if they are just looking at graphs!
pip install -e .[dev]
- For Developmentnpm install
This will run the webserver
npm run build
uvicorn labweb:app
These instruction are for developers working on the project.
Open two terminals
uvicorn labweb:app
npm run start
Open the url: http://127.0.0.1:8000
Demo
export LAB_CONFIG_FILE=tests/fixtures/config/simple_config.yaml
- Optional, To load demo video filepython -m scripts.run_demo
To simply run the tests: pytest -v
To see all captured output (debugging): pytest -rPx -v
https://ajhyndman.medium.com/hot-reloading-with-react-and-flask-b5dae60d9898