From 49912a85fe1c6000e2ffb74c4c380a6e6abb7947 Mon Sep 17 00:00:00 2001 From: jlstevens Date: Wed, 30 May 2018 20:01:57 +0100 Subject: [PATCH] Added nbconvert report generation example --- .../GSSHA_Workflow_Batched_Example1.ipynb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/topics/batched_example/GSSHA_Workflow_Batched_Example1.ipynb b/examples/topics/batched_example/GSSHA_Workflow_Batched_Example1.ipynb index 38bb364..d0564c3 100644 --- a/examples/topics/batched_example/GSSHA_Workflow_Batched_Example1.ipynb +++ b/examples/topics/batched_example/GSSHA_Workflow_Batched_Example1.ipynb @@ -30,9 +30,17 @@ "PARAM_JSON_INIT='{\"rain_intensity\":42, \"rain_duration\":50}' jupyter notebook GSSHA_Workflow_Batched_Example1.ipynb\n", "```\n", "\n", + "You can also generate a report HTML file using ``nbconvert`` as follows:\n", + "\n", + "```bash\n", + "PARAM_JSON_INIT='{\"rain_intensity\":25, \"rain_duration\":60}' jupyter nbconvert --execute GSSHA_Workflow_Batched_Example1.ipynb --output report1.html\n", + "```\n", + "\n", "This will set the ``rain_intensity`` and ``rain_duration`` values to ``42`` and ``50`` respectively from the default values of ``24`` and ``60``.\n", "\n", - "The ``PARAM_JSON_INIT`` environment variable can be used this way to set the notebook parameters in other contexts (e.g using nbconvert to execute the notebook and save it out to HTML). In the next notebook, this approach for parameterizing notebooks is made more user friendly." + "The ``PARAM_JSON_INIT`` variable can be used this way to set the notebook parameters in any context where the environment variables are available in the execution context of the notebook. One major limitation of this approach is that setting environment variables on Windows requires a different syntax.\n", + "\n", + "In the next notebook, this approach for parameterizing notebooks is made more user friendly and generalized to work on Windows." ] }, {