From c51fc0b50aa0c33215d01d89ae20439f7719478a Mon Sep 17 00:00:00 2001 From: Krishna Kumar Date: Thu, 19 Oct 2023 06:50:56 -0500 Subject: [PATCH] Fix formatting in ipynb --- example-notebooks/papermill-mpm.ipynb | 13 ++++++------- example-notebooks/template-mpm-run.ipynb | 10 +++++----- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/example-notebooks/papermill-mpm.ipynb b/example-notebooks/papermill-mpm.ipynb index d6c61cb..9002684 100644 --- a/example-notebooks/papermill-mpm.ipynb +++ b/example-notebooks/papermill-mpm.ipynb @@ -68,7 +68,8 @@ "source": [ "# Parameters available to modify in the templatized notebook\n", "import json\n", - "print(json.dumps(pm.inspect_notebook('template-mpm-run.ipynb'), indent = 2))" + "\n", + "print(json.dumps(pm.inspect_notebook(\"template-mpm-run.ipynb\"), indent=2))" ] }, { @@ -102,12 +103,10 @@ ], "source": [ "pm.execute_notebook(\n", - " 'template-mpm-run.ipynb', # input template notebook\n", - " 'mpm1.ipynb', # Your modified notebook\n", - " # Parameters that you can specify in the template notebook \n", - " parameters=dict(\n", - " path='/MyData/mpm-benchmarks/2d/uniaxial_stress/'\n", - " )\n", + " \"template-mpm-run.ipynb\", # input template notebook\n", + " \"mpm1.ipynb\", # Your modified notebook\n", + " # Parameters that you can specify in the template notebook\n", + " parameters=dict(path=\"/MyData/mpm-benchmarks/2d/uniaxial_stress/\"),\n", ")" ] } diff --git a/example-notebooks/template-mpm-run.ipynb b/example-notebooks/template-mpm-run.ipynb index be58c33..b654255 100644 --- a/example-notebooks/template-mpm-run.ipynb +++ b/example-notebooks/template-mpm-run.ipynb @@ -68,9 +68,9 @@ "outputs": [], "source": [ "# Default parameters for the MPM template notebook\n", - "path: str = '/MyData/mpm-benchmarks/2d/uniaxial_stress/' # path to input file\n", + "path: str = \"/MyData/mpm-benchmarks/2d/uniaxial_stress/\" # path to input file\n", "\n", - "input_file: str = 'mpm.json' # input file.json\n", + "input_file: str = \"mpm.json\" # input file.json\n", "\n", "# The parameters modified in your job will be embedded below." ] @@ -105,11 +105,11 @@ "ag = Agave.restore()\n", "\n", "# generate and modify job info\n", - "job_info = ds.generate_job_info(ag, appid='mpm-1.0.0', jobname='mpm-uniaxial')\n", + "job_info = ds.generate_job_info(ag, appid=\"mpm-1.0.0\", jobname=\"mpm-uniaxial\")\n", "\n", "# specify input path and file\n", - "job_info[\"inputs\"] = {\"inputDirectory\": [ ds.get_ds_path_uri(ag, path) ]}\n", - "job_info[\"parameters\"] = {\"inputfile\" : [ input_file ]}\n", + "job_info[\"inputs\"] = {\"inputDirectory\": [ds.get_ds_path_uri(ag, path)]}\n", + "job_info[\"parameters\"] = {\"inputfile\": [input_file]}\n", "print(job_info)" ] },