Level 1: requirements.txt, “clone the repo” deployment
Level 1: requirements.txt, “clone the repo” deployment¶
Document the minimal Python version required in a
README.mdfile or similar.Let the end user manage their Python environments with the required Python version. They are probably using Conda, and creating new Conda environments is not too difficult.
List all dependencies in a requirements.txt file.
If you want to force version numbers, use the pip freeze command. I’d advocate to replace the exact
astropy==5.0.1numbers to minimal version numbers such asastropy>=5.0.0.If you find that your requirements start to be complex, move to the Level 2 approach.
People install your dependencies by running pip install -r requirements.txt.
People reuse your code by coping the Python files in their own projects, or by adding your source folder to their Python path.