- Run
make venvto create a python venv named "myvenv" with the same python version as your default binary/usr/bin/python3. An easy way of changing your python version is to use miniconda to first create a conda environment with python 3.x and then runmake venvafter activating that conda environment. The advantage of venv is that now your python environment files are stored in this directory (but not committed to git). - Run
make pre-committo make ensure that we useblackto format our code before every commit - Activate the venv by
source ./myvenv/bin/activateand run the python scripts!
After installing pre-commit, it will run the git hooks every time you do git commit to check that the files are properly formatted. If it fails, you just need to fix the issues. If you have black and isort installed, simply git add and git commit again and the hooks will automatically run black and isort. See here for more information about pre-commit.