mirror of
https://github.com/wassname/cookiecutter-data-science.git
synced 2026-07-15 11:23:01 +08:00
+2








1fe968d24e
* WIP - New version with cleaner options * Fix find-replace error (#177) * Remove unnecessary .gitkeep * Remove unused tox.ini * Split reqs into dev/non-dev * Add basic packages support * Add tests for testing environment creation and requirements * Set up CI with Azure Pipelines (#194) * Change archived asciinema example (#163) * Change archived asciinema example * Update README.md Fix Asciinema powerline error * Update docs to show updated asciinema example * Added source and destination to Make data target (#169) * Fix broken Airflow link (#182) * Fixed: Typo in Makefile (#184) Fixed typo in Makefile, section "Set up python interpreter environment": intalled --> installed * Set up CI with Azure Pipelines [skip ci] * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * Update azure-pipelines.yml for Azure Pipelines * str paths for windows support * handle multiple data providers (#199) * Add missing env directory bin/activate path * Remove version from PYTHON_INTERPRETER command * Search for virtualenvwrapper.sh path if executable not found * Try chardet for character encoding detection * Specify python and virtualenv binaries for virtualenvwrapper * Add shebang to virtualenvwrapper.sh * Diagnostic * Try virtualenvwrapper-win * Set encoding if detected None * Fixes to Mac and Windows tests on Azure pipelines (#217) * Temporarily comment out py36 * Update azure-pipelines.yml * Fix tests on Windows and Mac (#1) * Temporarily remove py37 * Update virtualenv_harness.sh * put py37 back in * Set encoding to utf-8 * Comment out rmvirtualenv * Update test_creation.py * Update virtualenv_harness.sh * Add --show-capture * Update azure-pipelines.yml * Update azure-pipelines.yml * Update test_creation.py * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update Makefile * Update virtualenv_harness.sh * Update cookiecutter.json * Update cookiecutter.json * Update virtualenv_harness.sh * Update Makefile * Update Makefile * Update Makefile * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update Makefile * Update Makefile * Update Makefile * Update Makefile * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update Makefile * Update Makefile * Update virtualenv_harness.sh * Update Makefile * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update test_creation.py * Update azure-pipelines.yml * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update virtualenv_harness.sh * Update cookiecutter.json * Update conda_harness.sh * Update conda_harness.sh * Update conda_harness.sh Co-authored-by: Eric Jalbert <ericmjalbert@users.noreply.github.com> Co-authored-by: Jonathan Raviotta <jraviotta@users.noreply.github.com> Co-authored-by: Wes Roach <wesr000@gmail.com> Co-authored-by: Christopher Geis <16896724+geisch@users.noreply.github.com> Co-authored-by: Peter Bull <pjbull@gmail.com> Co-authored-by: Ian Preston <17241371+ianepreston@users.noreply.github.com> Co-authored-by: Jay Qi <jayqi@users.noreply.github.com> Co-authored-by: inchiosa <4316698+inchiosa@users.noreply.github.com> * More graceful deprecation * Make tests pass locally * test version match installed version * Remove unused imports * Unremove used import * Move to GH Actions * Fix typo * Test non-windows * Add netlify configs * Update suggestion to keep using deprecated cookiecutter template (#231) * Add mkdocs requirements file to docs directory * Try setting python version in runtime txt for netlify * Trigger build * Python 3.8 netlify * Python 3.6 netlify * Do not specify python runtime for netlify * Use 3.7 This reverts commit 898d7d3cf6008e47e89ed607167fad7aee1e065e. Co-authored-by: James Myatt <james@jamesmyatt.co.uk> Co-authored-by: drivendata <info@drivendata.org> Co-authored-by: Eric Jalbert <ericmjalbert@users.noreply.github.com> Co-authored-by: Jonathan Raviotta <jraviotta@users.noreply.github.com> Co-authored-by: Wes Roach <wesr000@gmail.com> Co-authored-by: Christopher Geis <16896724+geisch@users.noreply.github.com> Co-authored-by: Ian Preston <17241371+ianepreston@users.noreply.github.com> Co-authored-by: Jay Qi <jayqi@users.noreply.github.com> Co-authored-by: inchiosa <4316698+inchiosa@users.noreply.github.com> Co-authored-by: Robert Gibboni <robert@drivendata.org>
58 lines
1.1 KiB
Bash
58 lines
1.1 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
PROJECT_NAME=$(basename $1)
|
|
CCDS_ROOT=$(dirname $0)
|
|
|
|
# configure exit / teardown behavior
|
|
function finish {
|
|
if [[ $(which python) == *"$PROJECT_NAME"* ]]; then
|
|
deactivate
|
|
fi
|
|
|
|
if [ ! -z `which rmvirtualenv` ]; then
|
|
rmvirtualenv $PROJECT_NAME
|
|
elif [ ! -z `which rmvirtualenv.bat` ]; then
|
|
rmvirtualenv.bat $PROJECT_NAME
|
|
fi
|
|
}
|
|
trap finish EXIT
|
|
|
|
# source the steps in the test
|
|
source $CCDS_ROOT/test_functions.sh
|
|
|
|
# navigate to the generated project and run make commands
|
|
cd $1
|
|
|
|
if [ -z $TMPDIR ]
|
|
then
|
|
windowstmpdir=/c/Users/VssAdministrator/AppData/Local/Temp
|
|
if [ -e $windowstmpdir ]
|
|
then
|
|
export TMPDIR=$windowstmpdir
|
|
fi
|
|
fi
|
|
|
|
TEMP_ENV_ROOT=$(mktemp -d "${TMPDIR:-/tmp/}$(basename $0).XXXXXXXXXXXX")
|
|
export WORKON_HOME=$TEMP_ENV_ROOT
|
|
|
|
if [ ! -z `which virtualenvwrapper.sh` ]
|
|
then
|
|
source `which virtualenvwrapper.sh`
|
|
fi
|
|
|
|
make create_environment
|
|
|
|
# workon not sourced
|
|
|
|
if [ -e $TEMP_ENV_ROOT/$PROJECT_NAME/bin/activate ]
|
|
then
|
|
. $TEMP_ENV_ROOT/$PROJECT_NAME/bin/activate
|
|
else
|
|
. $TEMP_ENV_ROOT/$PROJECT_NAME/Scripts/activate
|
|
fi
|
|
|
|
make requirements
|
|
|
|
run_tests $PROJECT_NAME
|