Skip to content

Commit 51ca072

Browse files
committed
Merge branch 'master' into 'master'
update Closes QPR-11823 See merge request qs/oreswig-github!2
2 parents f9bc2dd + 3316932 commit 51ca072

16 files changed

Lines changed: 7241 additions & 17 deletions

File tree

Docker/Dockerfile-ORESWIG-App

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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

1717
WORKDIR /
1818
RUN mkdir /oreswig
@@ -37,6 +37,12 @@ COPY oreswig/QuantLib-SWIG/Python/test /oreswig/tests/QuantLibTestSuite
3737
RUN rm oreswig/tests/QuantLibTestSuite/__init__.py
3838
COPY oreswig/OREAnalytics-SWIG/Python/test /oreswig/tests/ORETestSuite
3939
COPY 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
45+
RUN cp oreswig/example_scripts/Notebooks/utilities.py oreswig/example_scripts/Notebooks/Example_5
4046
COPY ore/Examples /oreswig/Examples
4147
COPY ore/Tools /oreswig/Tools
4248
# Set env variable to run the ore examples with the python interface instead of the executable

OREAnalytics-SWIG/Python/Examples/Notebooks/Example_4/ore.ipynb

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -311,26 +311,14 @@
311311
},
312312
{
313313
"cell_type": "code",
314-
"execution_count": 1,
314+
"execution_count": null,
315315
"id": "44346cb5-6296-4d9e-bf10-aadadac21f9e",
316316
"metadata": {},
317-
"outputs": [
318-
{
319-
"ename": "ModuleNotFoundError",
320-
"evalue": "No module named 'OREPlus'",
321-
"output_type": "error",
322-
"traceback": [
323-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
324-
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
325-
"Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01mOREPlus\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;241m*\u001b[39m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01msys\u001b[39;00m\u001b[38;5;241m,\u001b[39m \u001b[38;5;21;01mtime\u001b[39;00m\u001b[38;5;241m,\u001b[39m \u001b[38;5;21;01mmath\u001b[39;00m\n\u001b[1;32m 3\u001b[0m sys\u001b[38;5;241m.\u001b[39mpath\u001b[38;5;241m.\u001b[39mappend(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m../../../../OREAnalytics-SWIG/Python/Examples/Notebooks\u001b[39m\u001b[38;5;124m'\u001b[39m)\n",
326-
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'OREPlus'"
327-
]
328-
}
329-
],
317+
"outputs": [],
330318
"source": [
331319
"from ORE import *\n",
332320
"import sys, time, math\n",
333-
"sys.path.append('../../../../OREAnalytics-SWIG/Python/Examples/Notebooks')\n",
321+
"sys.path.append('..')\n",
334322
"import utilities\n",
335323
"import matplotlib.pyplot as plt\n",
336324
"import pandas as pd\n",
@@ -484,7 +472,7 @@
484472
"name": "python",
485473
"nbconvert_exporter": "python",
486474
"pygments_lexer": "ipython3",
487-
"version": "3.11.2"
475+
"version": "3.11.6"
488476
}
489477
},
490478
"nbformat": 4,

0 commit comments

Comments
 (0)