File tree Expand file tree Collapse file tree
OREAnalytics-SWIG/Python/Examples Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ RUN apt-get update \
1212 && apt-get clean \
1313 && rm -rf /var/lib/apt/lists/*
1414
15- RUN pip3 install matplotlib pandas nose nose_xunitmp datacompy
15+ RUN pip3 install matplotlib pandas nose nose_xunitmp datacompy jupyter
1616
1717WORKDIR /
1818RUN mkdir /oreswig
@@ -37,6 +37,11 @@ COPY oreswig/QuantLib-SWIG/Python/test /oreswig/tests/QuantLibTestSuite
3737RUN rm oreswig/tests/QuantLibTestSuite/__init__.py
3838COPY oreswig/OREAnalytics-SWIG/Python/test /oreswig/tests/ORETestSuite
3939COPY oreswig/OREAnalytics-SWIG/Python/Examples /oreswig/example_scripts
40+ # due to relative path imports in the notebooks, we need to copy utilities.py directly into the example folder
41+ RUN cp oreswig/example_scripts/Notebooks/utilities.py oreswig/example_scripts/Notebooks/Example_1
42+ RUN cp oreswig/example_scripts/Notebooks/utilities.py oreswig/example_scripts/Notebooks/Example_2
43+ RUN cp oreswig/example_scripts/Notebooks/utilities.py oreswig/example_scripts/Notebooks/Example_3
44+ RUN cp oreswig/example_scripts/Notebooks/utilities.py oreswig/example_scripts/Notebooks/Example_4
4045COPY ore/Examples /oreswig/Examples
4146COPY ore/Tools /oreswig/Tools
4247# Set env variable to run the ore examples with the python interface instead of the executable
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ status=0
3+ return_code=0
4+ for dir in $( find ./Notebooks -type d) ; do
5+ # Loop over all ipynb files in the current subdirectory
6+ for file in " $dir " /* .ipynb; do
7+ # Run nbconvert on the current ipynb file
8+ if test -f " $file " ; then
9+ jupyter nbconvert --execute " $file " --to notebook --output-dir=./tmp
10+ return_code=$?
11+ if [ $return_code -gt $status ]; then
12+ status=$return_code
13+ fi
14+ fi
15+ done
16+ done
17+ exit $status
You can’t perform that action at this time.
0 commit comments