Skip to content

Commit

Permalink
notebooks: update to work with flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
wd15 committed Aug 4, 2023
1 parent 412eb09 commit dddfef7
Show file tree
Hide file tree
Showing 40 changed files with 3,843 additions and 4,306 deletions.
37 changes: 24 additions & 13 deletions _data/python-pfhub/notebooks/test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 7,
"id": "occupied-accuracy",
"metadata": {},
"outputs": [
Expand All @@ -38,7 +38,12 @@
"source": [
"from pfhub.main import line_plot, levelset_plot, get_table_data_style, plot_order_of_accuracy, get_result_data\n",
"from itables import init_notebook_mode\n",
"init_notebook_mode(all_interactive=True);"
"init_notebook_mode(all_interactive=True);\n",
"\n",
"from pathlib import Path\n",
"\n",
"cwd = Path().resolve()\n",
"benchmark_path = f'{cwd}/../../simulation_list.yaml'"
]
},
{
Expand Down Expand Up @@ -7072,7 +7077,8 @@
" x='time (s)',\n",
" y='Free Energy',\n",
" title=\"Free Energy, <i>r</i><sub>0</sub>=0.99<i>r</i><sup>*</sup>\"\n",
" )\n",
" ),\n",
" benchmark_path=benchmark_path\n",
")"
]
},
Expand Down Expand Up @@ -14078,7 +14084,8 @@
" x='time (s)',\n",
" y='Solid Fraction',\n",
" title=\"Solid Fraction, <i>r</i><sub>0</sub>=0.99<i>r</i><sup>*</sup>\"\n",
" )\n",
" ),\n",
" benchmark_path=benchmark_path\n",
")"
]
},
Expand Down Expand Up @@ -21084,7 +21091,8 @@
" x='time (s)',\n",
" y='Free Energy',\n",
" title=\"Free Energy, <i>r</i><sub>0</sub>=<i>r</i><sup>*</sup>\"\n",
" )\n",
" ),\n",
" benchmark_path=benchmark_path\n",
")"
]
},
Expand Down Expand Up @@ -28090,7 +28098,8 @@
" x='time (s)',\n",
" y='Solid Fraction',\n",
" title=\"Solid Fraction, <i>r</i><sub>0</sub>=<i>r</i><sup>*</sup>\"\n",
" )\n",
" ),\n",
" benchmark_path=benchmark_path\n",
")"
]
},
Expand Down Expand Up @@ -35096,7 +35105,8 @@
" x='time (s)',\n",
" y='Free Energy',\n",
" title=\"Free Energy, <i>r</i><sub>0</sub>=1.01<i>r</i><sup>*</sup>\"\n",
" )\n",
" ),\n",
" benchmark_path=benchmark_path\n",
")"
]
},
Expand Down Expand Up @@ -42102,7 +42112,8 @@
" x='time (s)',\n",
" y='Solid Fraction',\n",
" title=\"Solid Fraction, <i>r</i><sub>0</sub>=1.01<i>r</i><sup>*</sup>\"\n",
" )\n",
" ),\n",
" benchmark_path=benchmark_path\n",
")"
]
},
Expand Down Expand Up @@ -48558,7 +48569,7 @@
"source": [
"#PYTEST_VALIDATE_IGNORE_OUTPUT\n",
"\n",
"data = get_result_data(['phase_field_1'], ['8a.1'], ['x', 'y', 'z'])\n",
"data = get_result_data(['phase_field_1'], ['8a.1'], ['x', 'y', 'z'], benchmark_path=benchmark_path)\n",
"\n",
"levelset_plot(\n",
" data,\n",
Expand Down Expand Up @@ -55022,7 +55033,7 @@
}
],
"source": [
"data = get_result_data(['phase_field_2'], ['8a.1'], ['x', 'y', 'z'])\n",
"data = get_result_data(['phase_field_2'], ['8a.1'], ['x', 'y', 'z'], benchmark_path=benchmark_path)\n",
"\n",
"levelset_plot(\n",
" data,\n",
Expand Down Expand Up @@ -78333,7 +78344,7 @@
}
],
"source": [
"data = get_result_data(['phase_field_3'], ['8a.1'], ['x', 'y', 'z'])\n",
"data = get_result_data(['phase_field_3'], ['8a.1'], ['x', 'y', 'z'], benchmark_path=benchmark_path)\n",
"\n",
"levelset_plot(\n",
" data,\n",
Expand Down Expand Up @@ -79354,7 +79365,7 @@
"keys = ['x', 'y', 'z']\n",
"\n",
"data_names = ['phase_field_3', 'phase_field_4', 'phase_field_5']\n",
"df = get_result_data(data_names, ['8a.1'], keys=keys)\n",
"df = get_result_data(data_names, ['8a.1'], keys=keys, benchmark_path=benchmark_path)\n",
"\n",
"plot_order_of_accuracy(\n",
" df,\n",
Expand Down Expand Up @@ -79455,7 +79466,7 @@
"#PYTEST_VALIDATE_IGNORE_OUTPUT\n",
"\n",
"init_notebook_mode(False)\n",
"get_table_data_style('8a.1')"
"get_table_data_style('8a.1', benchmark_path=benchmark_path)"
]
},
{
Expand Down
Loading

0 comments on commit dddfef7

Please sign in to comment.