-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add run-notebook script * Create travis-ci build * Add tests * Generalize error handling (works better for non-versioneer projects) * Require python 3.6 and above
- Loading branch information
Showing
26 changed files
with
2,471 additions
and
80 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[run] | ||
omit = dockerutils/_version.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ dist | |
_testing_output/ | ||
build | ||
activate | ||
|
||
.coverage | ||
.pytest_cache |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
language: python | ||
sudo: true | ||
dist: xenial | ||
python: | ||
- "3.6" | ||
- "3.7" | ||
install: | ||
- pip install codecov | ||
- pip install -e ".[test]" | ||
script: | ||
- bin/test.sh | ||
after_success: | ||
- codecov |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,3 @@ | ||
#!/usr/bin/env bash | ||
# vim: filetype=sh: | ||
|
||
cd "$(dirname $0)"; cd .. | ||
|
||
OUTPUT_DIR=${OUTPUT_DIR:-_testing_output} | ||
MODULE_NAME=dockerutils | ||
|
||
if [ -d .venv ]; then | ||
source .venv/bin/activate | ||
elif [ -e activate ]; then | ||
source ./activate | ||
fi | ||
|
||
mkdir -p $OUTPUT_DIR | ||
|
||
export GIT_HASH=`git log --pretty=format:'%h' -n 1` | ||
echo "GIT_HASH: $GIT_HASH" > $OUTPUT_DIR/pytest_output.txt | ||
|
||
if [[ $1 != 'nolint' ]] && [[ $1 != 'emacs' ]]; then | ||
pylint $MODULE_NAME --rcfile=.pylintrc -d C,R | tee $OUTPUT_DIR/pylint_output.txt | ||
fi | ||
|
||
#pytest --color=yes tests | tee _testing_output/pytest_output.txt | ||
pytest --color=yes --cov-config coverage.cfg --cov=$MODULE_NAME --cov-fail-under=80 --cov-report term-missing tests | tee _testing_output/pytest_output.txt | ||
exit ${PIPESTATUS[0]} | ||
pytest --cov=dockerutils --cov-report=term-missing --cov-fail-under=75 --durations=10 tests |
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -d "./docker/notebook" ]; then | ||
build-image -f notebook | ||
run-image notebook | ||
else | ||
# Script to run rappdw/docker-ds notebok against the current directory | ||
docker pull rappdw/docker-ds:latest | ||
date_stamp=$(date "+%Y_%m_%d_%H.%M.%S") | ||
if [ -z "$DOCKER_HOST" ] | ||
then | ||
if [[ ! -d "./.ipynb_checkponts" ]]; then | ||
mkdir ./ipynb_checkpoints | ||
fi | ||
echo 'docker run --init --name '$USER'_notebook_'$date_stamp' -e NOTEBOOK_MODE=lab --rm -it --mount type=bind,source=$(pwd),target=/home/jovyan/project -v /data:/data --mount type=bind,source=$HOME/.aws,target=/home/jovyan/.aws -p 8888:8888 rappdw/docker-ds:latest' | ||
docker run --init --name $USER"_notebook_"$date_stamp -e NOTEBOOK_MODE=lab --rm -it --mount type=bind,source=$(pwd),target=/home/jovyan/project -v /data:/data --mount type=bind,source=$HOME/.aws,target=/home/jovyan/.aws -p 8888:8888 rappdw/docker-ds:latest | ||
else | ||
echo 'docker run --init --name '$USER'_notebook_'$date_stamp' -e NOTEBOOK_MODE=lab --rm -it --mount type=bind,source=/data/workspaces/'$USER'/code/'${PWD##*/}',target=/home/jovyan/project -v /data:/data -p 8888:8888 rappdw/docker-ds:latest' | ||
docker run --init --name $USER"_notebook_"$date_stamp -e NOTEBOOK_MODE=lab --rm -it --mount type=bind,source="/data/workspaces/"$USER"/code/"${PWD##*/}",target=/home/jovyan/project" -v /data:/data -p 8888:8888 rappdw/docker-ds:latest | ||
fi | ||
|
||
fi |
File renamed without changes.
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
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from ._version import get_versions | ||
__version__ = get_versions()['version'] | ||
del get_versions |
Oops, something went wrong.