Move all the notebooks into the docs/ folder

This commit is contained in:
Tom Hodson 2022-06-17 12:22:37 +02:00
parent e6f62333cd
commit b8392ed703
14 changed files with 954 additions and 947 deletions

File diff suppressed because one or more lines are too long

View File

@ -9,29 +9,12 @@
"<h1 align=\"center\"> 🎲 ⛓️ 👉 🧪 </h1>"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "6e51fe6c-a8b8-48ed-9e7f-70e18945e597",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"\n",
"# This loads some custom styles for matplotlib\n",
"import json, matplotlib\n",
"\n",
"with open(\"assets/matplotlibrc.json\") as f:\n",
" matplotlib.rcParams.update(json.load(f))"
]
},
{
"cell_type": "markdown",
"id": "5e745b48-9cde-49d1-b91b-b04282f6d30d",
"metadata": {},
"source": [
"# Testing\n",
"# Packaging It Up\n",
"\n",
"Before we proceed with writing any more code I want to put what we already have in python file and make it into an installable module. This will be useful both for importing code into these notebooks and for testing later."
]

View File

@ -8,7 +8,7 @@
"<h1 align=\"center\">Markov Chain Monte Carlo for fun and profit</h1>\n",
"<h1 align=\"center\"> 🎲 ⛓️ 👉 🧪 </h1>\n",
"\n",
"# Chapter 3: Testing"
"# Testing"
]
},
{

View File

@ -38,7 +38,7 @@
"id": "486f066c-f027-44e8-8937-8636a52f32fb",
"metadata": {},
"source": [
"## Functionality\n",
"# Adding Functionality\n",
"\n",
"The main thing we want to be able to do is to take measurements, the code as I have writting it doesn't really allow that because it only returns the final state in the chain. Let's say we have a measurement called `average_color(state)` that we want to average over the whole chain. We could just stick that inside our definition of `mcmc` but we know that we will likely make other measurements too and we don't want to keep writing new versions of our core functionality!\n",
"\n",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,21 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"id": "96ca09e7",
"metadata": {},
"source": [
"<h1 align=\"center\">Markov Chain Monte Carlo for fun and profit</h1>\n",
"<h1 align=\"center\"> 🎲 ⛓️ 👉 🧪 </h1>"
]
},
{
"cell_type": "markdown",
"id": "94c1cebd-8bb4-4f19-bdb3-c503cd620d22",
"metadata": {},
"outputs": [],
"source": []
"source": [
"# Doing Reproducible Science"
]
}
],
"metadata": {

View File

@ -106,6 +106,30 @@
"]\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "c771a57d-c802-429a-b051-1bd0364b9317",
"metadata": {},
"source": [
"Finally we add a `readthedocs.yaml` file to tell readthedocs how to build our documentation. https://docs.readthedocs.io/en/stable/config-file/v2.html#packages"
]
},
{
"cell_type": "markdown",
"id": "3843afa1-5c83-4328-bf8c-5e189dc4ee35",
"metadata": {},
"source": [
"And the documentation is now hosted [online!](https://recode-mcmcff.readthedocs.io/en/latest/#)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b5ca1a87-26e8-4006-99ac-38e51948f3b2",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long