diff --git a/Documentation/_static/override-nbsphinx-gallery.css b/Documentation/_static/override-nbsphinx-gallery.css new file mode 100644 index 000000000..65ee21fe6 --- /dev/null +++ b/Documentation/_static/override-nbsphinx-gallery.css @@ -0,0 +1,3 @@ +.nbsphinx-gallery { + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); +} diff --git a/Documentation/conf.py b/Documentation/conf.py index c605b56df..044ca72af 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -62,6 +62,10 @@ # HTML writer configuration html_theme = "pydata_sphinx_theme" +html_static_path = ["_static"] +html_css_files = [ + 'override-nbsphinx-gallery.css', +] html_theme_options = { "use_edit_page_button": True, diff --git a/Documentation/overview/index.rst b/Documentation/overview/index.rst index 84250099c..9671f673f 100644 --- a/Documentation/overview/index.rst +++ b/Documentation/overview/index.rst @@ -8,7 +8,10 @@ Overview introduction ARKitecture -.. toctree:: +.. nbgallery is a wrapper around the toctree directive, see + https://nbsphinx.readthedocs.io/en/latest/a-normal-rst-file.html#thumbnail-galleries + +.. nbgallery:: :caption: Examples :maxdepth: 1 diff --git a/examples/ConsIndShockModel/IndShockConsumerType.ipynb b/examples/ConsIndShockModel/IndShockConsumerType.ipynb index 5edc8ee25..76e75adbf 100644 --- a/examples/ConsIndShockModel/IndShockConsumerType.ipynb +++ b/examples/ConsIndShockModel/IndShockConsumerType.ipynb @@ -4,8 +4,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# IndShockConsumerType Documentation\n", - "## Consumption-Saving model with Idiosyncratic Income Shocks" + "# Consumption-Saving model with Idiosyncratic Income Shocks\n", + "\n", + "**The `IndShockConsumerType` class**" ] }, { diff --git a/examples/ConsIndShockModel/KinkedRconsumerType.ipynb b/examples/ConsIndShockModel/KinkedRconsumerType.ipynb index f6fc51176..f22b19f81 100644 --- a/examples/ConsIndShockModel/KinkedRconsumerType.ipynb +++ b/examples/ConsIndShockModel/KinkedRconsumerType.ipynb @@ -6,7 +6,9 @@ "lines_to_next_cell": 2 }, "source": [ - "# KinkedRconsumerType: Consumption-saving model with idiosyncratic income shocks and different interest rates on borrowing and saving" + "# Consumption-Saving model with Idiosyncratic Income Shocks and Different Interest Rates on Borrowing and Saving\n", + "\n", + "**The `KinkedRconsumerType` class**" ] }, { diff --git a/examples/ConsIndShockModel/PerfForesightConsumerType.ipynb b/examples/ConsIndShockModel/PerfForesightConsumerType.ipynb index 53da596f8..abf528ddd 100644 --- a/examples/ConsIndShockModel/PerfForesightConsumerType.ipynb +++ b/examples/ConsIndShockModel/PerfForesightConsumerType.ipynb @@ -6,7 +6,9 @@ "lines_to_next_cell": 2 }, "source": [ - "# PerfForesightConsumerType: Perfect foresight consumption-saving" + "# Perfect foresight consumption-saving\n", + "\n", + "**The `PerfForesightConsumerType` class**" ] }, { diff --git a/examples/Gentle-Intro/Gentle-Intro-To-HARK.ipynb b/examples/Gentle-Intro/Gentle-Intro-To-HARK.ipynb index 4fa456385..3296fee8c 100644 --- a/examples/Gentle-Intro/Gentle-Intro-To-HARK.ipynb +++ b/examples/Gentle-Intro/Gentle-Intro-To-HARK.ipynb @@ -309,7 +309,15 @@ { "cell_type": "code", "execution_count": 11, - "metadata": {}, + "metadata": { + "execution": { + "iopub.execute_input": "2023-02-07T00:50:32.939429Z", + "iopub.status.busy": "2023-02-07T00:50:32.939429Z", + "iopub.status.idle": "2023-02-07T00:50:33.094965Z", + "shell.execute_reply": "2023-02-07T00:50:33.094965Z" + }, + "nbsphinx-thumbnail": {} + }, "outputs": [ { "data": { diff --git a/examples/HowWeSolveIndShockConsumerType/HowWeSolveIndShockConsumerType.ipynb b/examples/HowWeSolveIndShockConsumerType/HowWeSolveIndShockConsumerType.ipynb index f3fcacfe0..54dfb811f 100644 --- a/examples/HowWeSolveIndShockConsumerType/HowWeSolveIndShockConsumerType.ipynb +++ b/examples/HowWeSolveIndShockConsumerType/HowWeSolveIndShockConsumerType.ipynb @@ -4,7 +4,8 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# How we solve a model defined by the `IndShockConsumerType` class\n", + "# How we solve a model defined by `IndShockConsumerType`\n", + "\n", "The IndShockConsumerType reprents the work-horse consumption savings model with temporary and permanent shocks to income, finite or infinite horizons, CRRA utility and more. In this DemARK we take you through the steps involved in solving one period of such a model. The inheritance chains can be a little long, so figuring out where all the parameters and methods come from can be a bit confusing. Hence this map! The intention is to make it easier to know how to inheret from IndShockConsumerType in the sense that you know where to look for specific solver logic, but also so you know can figure out which methods to overwrite or supplement in your own `AgentType` and solver!\n", "## The `solveConsIndShock` function\n", "In HARK, a period's problem is always solved by the callable (function or callable object instance) stored in the field `solve_one_period`. In the case of `IndShockConsumerType`, this function is called `solveConsIndShock`. The function accepts a number of arguments, that it uses to construct an instance of either a `ConsIndShockSolverBasic` or a `ConsIndShockSolver`. These solvers both have the methods `prepare_to_solve` and `solve`, that we will have a closer look at in this notebook. This means, that the logic of `solveConsIndShock` is basically:\n", diff --git a/examples/LifecycleModel/LifecycleModel.ipynb b/examples/LifecycleModel/LifecycleModel.ipynb index 958bdd1bf..a2bdb35a3 100644 --- a/examples/LifecycleModel/LifecycleModel.ipynb +++ b/examples/LifecycleModel/LifecycleModel.ipynb @@ -5,7 +5,7 @@ "metadata": {}, "source": [ "\n", - "# A Lifecycle Model: The Distribution of Assets By Age\n", + "# A Life Cycle Model: The Distribution of Assets By Age\n", "\n", "National registry data on income and wealth from Scandinavian countries has recently become available (with a lot of security) to some (lucky!) researchers. These data offer a uniquely powerful tool for testing (and improving) our models of consumption and saving behavior over the life cycle.\n", "\n",