A runtime for unklearn notebooks to run python code
To run local tests, first create a virtual environment with python3.
virtualenv venv -p python3
source venv/bin/activate
pip install ".[testing]"
pytest
This repo uses yapf to format the files. Install yapf using.
pip install ".[development]"
Before commit, a pre-commit hook will format the files.
Drop this in .git/hooks/pre-commit
#!/bin/sh
# Get list of staged files and find python files and format using yapf
files=$(git diff --name-only --cached | grep .py)
if [ ! -z $files ];
then
yapf -vv -i $files
git add $files
fi