Improving reproducibility of Python and R scripts
Main points to get across:
- Put all imports in the script. Developing in the REPL means this is often missed.
- Be sure scripts work outside of the REPL. For example, test in a venv
- For Python, always provide a requirements.txt.
- For R, packrat?
Provide the
packrat.lockfile? Or devtools - Prefer dependencies from pypi/cran. If you must install from github, try to “pin” to the specific commit.