Skip to content

Commit

Permalink
Added notebook integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Wesley Uykimpang committed Apr 17, 2020
1 parent 708603a commit 1e634c1
Show file tree
Hide file tree
Showing 11 changed files with 13,603 additions and 452 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.local/
.ipynb_checkpoints/
.cache/
20 changes: 7 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
ARG BASE_CONTAINER=jupyter/datascience-notebook:hub-1.1.0
ARG DATAHUB_CONTAINER=ucsdets/datahub-base-notebook:2020.2-stable
# ARG BASE_CONTAINER=jupyter/datascience-notebook:hub-1.1.0
ARG DATAHUB_CONTAINER=ucsdets/datahub-base-notebook-test:2020.2-stable

# # force rebuild
FROM $DATAHUB_CONTAINER as datahub
FROM $BASE_CONTAINER
# FROM $BASE_CONTAINER

MAINTAINER UC San Diego ITS/ETS-EdTech-Ecosystems <[email protected]>

COPY --from=datahub /usr/share/datahub/scripts/* /usr/share/datahub/scripts/
COPY --from=datahub /usr/share/datahub/tests /usr/share/datahub/tests
RUN /usr/share/datahub/scripts/install-all.sh

# Install OKpy for DSC courses
# downgrade pip temporarily and upgrade to fix issue with okpy install
USER root
RUN pip install --upgrade --force-reinstall pip==9.0.3
RUN pip install okpy --disable-pip-version-check
RUN pip install --upgrade pip
Expand All @@ -26,18 +23,15 @@ RUN python -c 'import matplotlib.pyplot'

RUN conda clean -tipsy

# Run container integration tests
USER root
# import integration tests
ENV TESTDIR=/usr/share/datahub/tests
ARG DATASCIENCE_TESTDIR=${TESTDIR}/datascience-notebook
COPY tests ${DATASCIENCE_TESTDIR}
RUN chmod -R +x ${TESTDIR}
RUN for f in ${TESTDIR}/**/*.sh; do bash $f; done
RUN chmod -R +rwx ${DATASCIENCE_TESTDIR}
RUN chown 1000:1000 ${DATASCIENCE_TESTDIR}

# change the owner back
RUN chown -R 1000:1000 /home/jovyan
USER $NB_UID
RUN bash -c 'find /opt/julia -type f -a -name "*.ji" -a \! -perm /005 | xargs chmod og+rX'
ENV SHELL=/bin/bash

COPY --from=datahub /run_jupyter.sh /
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Changelog


2019.4.4

2019.4.3
Expand Down
6 changes: 6 additions & 0 deletions bin/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

# Used for development purposes

docker-compose -f docker-compose.test.yml build
docker-compose -f docker-compose.test.yml up --remove-orphans
4 changes: 4 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sut:
build: .
command: /usr/share/datahub/tests/datascience-notebook/test.sh
user: root
7 changes: 7 additions & 0 deletions tests/.bash_history
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ls
jupyter nbconvert --to r datascience_notebook.ipynb
jupyter nbconvert --to
jupyter nbconvert --to -h
jupyter nbconvert --execute datascience_notebook.ipynb
exit
exit
26 changes: 0 additions & 26 deletions tests/addressbook.proto

This file was deleted.

Loading

0 comments on commit 1e634c1

Please sign in to comment.