Last active
January 12, 2020 17:04
-
-
Save pcolazurdo/2f68fb9a107e6e6a9b92bb78bb948e61 to your computer and use it in GitHub Desktop.
Setup a default environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# $1 should be en directory name | |
# | |
if [ -z $1 ] | |
then | |
echo "You should specify a directory name" | |
exit 1 | |
else | |
echo "Inititalizing Directory" | |
fi | |
mkdir $1 | |
cd $1 | |
pwd | |
python3 -m venv venv | |
source venv/bin/activate | |
pip3 install black flake8 flake8-bugbear | |
mkdir src | |
# Flake8 config | |
cat >./src/.flake8 << EOF | |
[flake8] | |
ignore = E203, E266, E501, W503 | |
max-line-length = 80 | |
max-complexity = 18 | |
select = B,C,E,F,W,T4,B9 | |
EOF | |
# Git | |
cat >.gitignore << EOF | |
.DS_Store | |
*.pyc | |
__pycache__ | |
dist | |
build | |
docs/build | |
docs/source/reference/services | |
tests/cover | |
tests/.coverage | |
*.egg-info | |
# Test state / virtualenvs | |
.tox | |
.coverage | |
coverage.xml | |
nosetests.xml | |
# Common virtualenv names | |
venv | |
env2 | |
env3 | |
# IntelliJ / PyCharm IDE | |
.idea/ | |
# Visual Studio used to edit docs | |
docs/source/.vs | |
EOF | |
git init | |
git add . | |
git commit -m "Environment setup" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment