Skip to content

Commit

Permalink
first commit; setup file
Browse files Browse the repository at this point in the history
  • Loading branch information
paulocressoni committed Mar 10, 2021
0 parents commit a5d142c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions local-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -euxo pipefail

# build a virtual environment and activate it
virtualenv -p python3 ./venv

. ./venv/bin/activate

# install the required libs
pip install -r ./requirements.txt

pip install -r ./ml/requirements.txt

#az login

#az account set --subscription YOUR-AZURE-SUBSCRIPTION-HERE

#create script to auto-format files before commit
file=".git/hooks/pre-commit"
echo "#!/usr/bin/env bash" > $file
echo "# Auto-format all files before commit" >> $file
echo "./auto-formatter.sh \$(git diff --diff-filter=d --staged --name-only -- '*.py' | tr '\n' ' ') " >> $file
echo "git add -- \$(git diff --diff-filter=d --staged --name-only)" >> $file
cat $file
chmod 777 $file

0 comments on commit a5d142c

Please sign in to comment.