#!/usr/bin/env bash

init=ramda/__init__.py
rm $init
for i in ramda/*.py; do
  if [[ $i != *"test"* ]]; then
    name=`echo $i | sed -e 's/.py$//' -e 's/ramda\///'`
    echo "from .$name import $name" >> $init
  fi
done

echo "from .test import test" >> $init

sort -u $init -o $init
./hooks/docs
black . --exclude .direnv
pycodestyle ---exclude .direnv -ignore E501,E203,W503 
nose2 --with-coverage
git add .
