goodrobots / maverick

UAV Autonomous Systems Management
https://goodrobots.github.io/maverick/
MIT License
173 stars 61 forks source link

Replace maverick_web::maverick_api requirements.txt handling #927

Closed fnoop closed 4 years ago

fnoop commented 4 years ago

Currently pip management of maverick_api is done by wrapping requirements.txt in an install flag/wrapper. This means that if requirements.txt is changed, maverick only updates the pip packages if the install flag is removed. This is because otherwise the overhead of checking pip for each package to check if they need installing/updating is too high to run every maverick configure.

Instead, declare install_python_module for each dependency in maverick_web::maverick_api class. install_python_module uses cached lists of existing python packages so can check with no overhead, and updates/installs can be done without manual intervention (removing install flag).

This means we don't automatically track updates to requirements.txt, instead we have to add the dependencies to maverick_api manifest, but the benefit to the end user outweighs this.