A human requirement and a machine requirement for every app
With recent issues (See PR https://github.com/plotly/dash-sample-apps/pull/535) caused by new version of dependencies breaking an otherwise functioning app, I think that a freeze'd (frozen?) requirement file would be necessary in order to ensure that a certain app is fully functional. For example, instead of a requirements.txt file that looks like this:
dash
casadi==3.5.1
numpy>=1.18.1
...
Instead, it might be a better idea to generate requirements.txt by running pip freeze > requirements.txt. This way, we would avoid one dependency (e.g. casadi) to fall behind while another one (e.g. numpy>=1.18.1) keeps being updated, resulting in broken apps due to API changes.
the human requirements
Since we want to update such apps, it's handy to keep track of human-readable requirements. Perhaps those could be called dependencies.txt or requirements-dev.txt, so that two ways would be recommended:
- Trying/reproducing/deploy the app:
pip install -r requirements.txt - Fixing/developing the app:
pip install -r dependencies.txtorpip install -r requirements-dev.txt
@emmanuelle @nicolaskruchten Thoughts?
Already discussed here: https://github.com/plotly/dash/issues/1005
Seems like pipenv does exactly what I had in mind. Could be worth trying it out for future sample apps