Skip to content

Commit

Permalink
Fix formatting in ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
kks32 committed Oct 19, 2023
1 parent b8ac6f7 commit c51fc0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
13 changes: 6 additions & 7 deletions example-notebooks/papermill-mpm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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))"
]
},
{
Expand Down Expand Up @@ -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",
")"
]
}
Expand Down
10 changes: 5 additions & 5 deletions example-notebooks/template-mpm-run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
Expand Down Expand Up @@ -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)"
]
},
Expand Down

0 comments on commit c51fc0b

Please sign in to comment.