Created
March 21, 2017 20:53
-
-
Save ErinLMoore/0d34dbae99fe9dc498cf81c2d48fca59 to your computer and use it in GitHub Desktop.
A bash script to quickly stand up a small python module.
This file contains 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
PROJECT_NAME=${1:-Python_Project} | |
#PROJECT_NAME_LOWER=`echo "$PROJECT_NAME" | tr '[:upper:]' '[:lower:]'` | |
mkdir $PROJECT_NAME | |
cd $PROJECT_NAME | |
echo "import sys\nsys.path.append('~\_________')\nfrom src.$PROJECT_NAME import _______\n\nclass main():" > main.py | |
touch main.py | |
mkdir src | |
mkdir test | |
cd src | |
touch __init__.py | |
touch $PROJECT_NAME.py | |
cd .. | |
cd test | |
touch __init__.py | |
echo "import unittest\nfrom src.$PROJECT_NAME import *\n\nclass test_$PROJECT_NAME(unittest.TestCase):" > "test_$PROJECT_NAME.py" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment