{ "cells": [ { "cell_type": "markdown", "metadata": { "nbsphinx": "hidden" }, "source": [ "This notebook is part of the `nbsphinx` documentation: https://nbsphinx.readthedocs.io/." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Cell Execution Timeout\n", "\n", "By default, code cells will be executed until they are finished,\n", "even if that takes a very long time.\n", "In some cases they might never finish.\n", "\n", "If you would like to only use a finite amount of time per cell,\n", "you can choose a timeout length for all notebooks by setting the following option in [conf.py](conf.py):\n", "\n", "```python\n", "nbsphinx_timeout = 60\n", "```\n", "\n", "Or change the timeout length on a per-notebook basis by adding this to the notebook's JSON metadata:\n", "\n", "```\n", "\"nbsphinx\": {\n", " \"timeout\": 60\n", "},\n", "```\n", "\n", "The timeout is given in seconds, use `-1` to disable the timeout (which is the default).\n", "\n", "Alternatively, you can manually execute the notebook in question and save the results, see [the pre-executed example notebook](pre-executed.ipynb)." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.6" }, "nbsphinx": { "timeout": 60 } }, "nbformat": 4, "nbformat_minor": 4 }