add parameter to specify python interpreter and commands to create and test virtual environments

This commit is contained in:
Colin Sullivan
2016-10-05 15:16:42 -04:00
parent 690241a8a9
commit d13bc88ab0
3 changed files with 38 additions and 2 deletions

View File

@@ -5,13 +5,15 @@
#################################################################################
BUCKET = {{ cookiecutter.s3_bucket }}
PROJECT_NAME = {{ cookiecutter.repo_name }}
PYTHON_INTERPRETER = {{ cookiecutter.python_interpreter }}
#################################################################################
# COMMANDS #
#################################################################################
## Install Python Dependencies
requirements:
requirements: test_environment
pip install -q -r requirements.txt
## Make Dataset
@@ -34,6 +36,15 @@ sync_data_to_s3:
sync_data_from_s3:
aws s3 sync s3://$(BUCKET)/data/ data/
## Set up python interpreter environment
setup_environment:
source /usr/local/bin/virtualenvwrapper.sh; mkvirtualenv $(PROJECT_NAME) --python=$(PYTHON_INTERPRETER)
@echo ">>> Activate virtualenv with:\nworkon $(PROJECT_NAME)"
## Test python environment is setup correctly
test_environment:
python test_environment.py
#################################################################################
# PROJECT RULES #
#################################################################################