diff --git a/scripts/create_testenv.sh b/scripts/create_testenv.sh index 33d7eaa4d..1db6675d1 100644 --- a/scripts/create_testenv.sh +++ b/scripts/create_testenv.sh @@ -21,7 +21,7 @@ if [[ $* != *--global* ]]; then fi fi -conda install --yes pip pytest numpy matplotlib pandas patsy statsmodels +conda install --yes pip pytest numpy matplotlib pandas patsy statsmodels black pip install --upgrade pip diff --git a/scripts/lint.sh b/scripts/lint.sh index 2c6277ffb..08d1141f4 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -1,7 +1,10 @@ #!/bin/bash - set -ex # fail on first error, print commands +echo "Checking code style with black...." +python -m black bambi --line-length=100 --target-version=py37 --exclude=tests/ --check +echo "Success!" + echo "Checking code style with pylint..." python -m pylint bambi/ echo "Success!" diff --git a/scripts/test.sh b/scripts/test.sh index 6840a70be..d9f7af136 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,10 +1,7 @@ #!/bin/bash - set -ex # fail on first error, print commands -echo "Checking code style with pylint..." -python -m pylint bambi/ -echo "Success!" +scripts/lint.sh echo "Running unit tests..." python -m pytest -vx --cov=bambi