Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rerun all notebooks #149

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 23 additions & 18 deletions docs/controlling-default-runner.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
{
"cell_type": "markdown",
"id": "84445477",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"source": [
"# Controlling the default runner\n",
"In this tutorial we show how to globally controll the default runner. First we import `oommfc`."
Expand Down Expand Up @@ -86,7 +92,7 @@
{
"data": {
"text/plain": [
"ExeOOMMFRunner(/opt/miniconda3/envs/ubermagdev/bin/oommf)"
"ExeOOMMFRunner(/home/mlang/miniconda3/envs/ubermagdev310/bin/oommf)"
]
},
"execution_count": 3,
Expand Down Expand Up @@ -117,7 +123,7 @@
{
"data": {
"text/plain": [
"OOMMF runner: ExeOOMMFRunner(/opt/miniconda3/envs/ubermagdev/bin/oommf)\n",
"OOMMF runner: ExeOOMMFRunner(/home/mlang/miniconda3/envs/ubermagdev310/bin/oommf)\n",
"runner is cached: True"
]
},
Expand Down Expand Up @@ -256,7 +262,7 @@
{
"data": {
"text/plain": [
"OOMMF runner: ExeOOMMFRunner(/opt/miniconda3/envs/ubermagdev/bin/oommf)\n",
"OOMMF runner: ExeOOMMFRunner(/home/mlang/miniconda3/envs/ubermagdev310/bin/oommf)\n",
"runner is cached: True"
]
},
Expand Down Expand Up @@ -299,14 +305,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Running OOMMF (TclOOMMFRunner) [2022/02/16 11:29]... (0.0 s)\n",
"OOMMF error:\n",
"\tcommand: tclsh /path/to/oommf_tcl boxsi +fg macrospin.mif -exitondone 1\n",
"\tstdout: \n",
"\tstderr: couldn't read file \"/path/to/oommf_tcl\": no such file or directory\n",
"\n",
"\n",
"\n",
"Running OOMMF (TclOOMMFRunner)[2023/10/18 12:33]... (0.0 s)\n",
"Cannot find OOMMF.\n"
]
},
Expand All @@ -317,8 +316,8 @@
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
"Input \u001b[0;32mIn [10]\u001b[0m, in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0m oommfc\u001b[38;5;241m.\u001b[39mrunner\u001b[38;5;241m.\u001b[39mrunner \u001b[38;5;241m=\u001b[39m oommfc\u001b[38;5;241m.\u001b[39moommf\u001b[38;5;241m.\u001b[39mTclOOMMFRunner(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m/path/to/oommf_tcl\u001b[39m\u001b[38;5;124m'\u001b[39m)\n",
"File \u001b[0;32m~/PhD/repos/ubermag-devtools/repos/oommfc/oommfc/oommf/oommf.py:432\u001b[0m, in \u001b[0;36mRunner.runner\u001b[0;34m(self, runner)\u001b[0m\n\u001b[1;32m 429\u001b[0m \u001b[38;5;129m@runner\u001b[39m\u001b[38;5;241m.\u001b[39msetter\n\u001b[1;32m 430\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mrunner\u001b[39m(\u001b[38;5;28mself\u001b[39m, runner):\n\u001b[1;32m 431\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m runner\u001b[38;5;241m.\u001b[39mstatus \u001b[38;5;241m!=\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[0;32m--> 432\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mrunner\u001b[38;5;132;01m=}\u001b[39;00m\u001b[38;5;124m cannot be used.\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m 433\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_runner \u001b[38;5;241m=\u001b[39m runner\n",
"Cell \u001b[0;32mIn[10], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43moommfc\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrunner\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrunner\u001b[49m \u001b[38;5;241m=\u001b[39m oommfc\u001b[38;5;241m.\u001b[39moommf\u001b[38;5;241m.\u001b[39mTclOOMMFRunner(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m/path/to/oommf_tcl\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
"File \u001b[0;32m~/repos/ubermag-devtools/repos/oommfc/oommfc/oommf/oommf.py:441\u001b[0m, in \u001b[0;36mRunner.runner\u001b[0;34m(self, runner)\u001b[0m\n\u001b[1;32m 438\u001b[0m \u001b[38;5;129m@runner\u001b[39m\u001b[38;5;241m.\u001b[39msetter\n\u001b[1;32m 439\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mrunner\u001b[39m(\u001b[38;5;28mself\u001b[39m, runner):\n\u001b[1;32m 440\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m runner\u001b[38;5;241m.\u001b[39mstatus \u001b[38;5;241m!=\u001b[39m \u001b[38;5;241m0\u001b[39m:\n\u001b[0;32m--> 441\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mrunner\u001b[38;5;132;01m=}\u001b[39;00m\u001b[38;5;124m cannot be used.\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 442\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_runner \u001b[38;5;241m=\u001b[39m runner\n",
"\u001b[0;31mValueError\u001b[0m: runner=TclOOMMFRunner(/path/to/oommf_tcl) cannot be used."
]
}
Expand All @@ -344,7 +343,7 @@
{
"data": {
"text/plain": [
"OOMMF runner: ExeOOMMFRunner(/opt/miniconda3/envs/ubermagdev/bin/oommf)\n",
"OOMMF runner: ExeOOMMFRunner(/home/mlang/miniconda3/envs/ubermagdev310/bin/oommf)\n",
"runner is cached: True"
]
},
Expand Down Expand Up @@ -388,12 +387,18 @@
"cell_type": "code",
"execution_count": 13,
"id": "8c577eb3",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"OOMMF runner: ExeOOMMFRunner(/opt/miniconda3/envs/ubermagdev/bin/oommf)\n",
"OOMMF runner: ExeOOMMFRunner(/home/mlang/miniconda3/envs/ubermagdev310/bin/oommf)\n",
"runner is cached: True"
]
},
Expand Down Expand Up @@ -423,7 +428,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.10.12"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
Loading
Loading