Skip to content

Latest commit

 

History

History
52 lines (32 loc) · 1.25 KB

File metadata and controls

52 lines (32 loc) · 1.25 KB

python-runtime

Build status

Build Status

Code climate

A runtime for unklearn notebooks to run python code

Running test locally

To run local tests, first create a virtual environment with python3.

    virtualenv venv -p python3
    
    source venv/bin/activate
    
    pip install ".[testing]"
    
    pytest

File formatting

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