docs: moves notebook figures to _assets for sphinx
There was an issue with static assets not being properly copied in the sphinx documentation. The assets have now been moved to `_static` to ensure that sphinx is able to copy them during build. The Jupyter notebooks use the images from `_static`.
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 125 KiB |
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 250 KiB |
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 304 KiB |
Before Width: | Height: | Size: 268 KiB After Width: | Height: | Size: 268 KiB |
@ -25,7 +25,7 @@
|
|||||||
"# This loads some custom styles for matplotlib\n",
|
"# This loads some custom styles for matplotlib\n",
|
||||||
"import json, matplotlib\n",
|
"import json, matplotlib\n",
|
||||||
"\n",
|
"\n",
|
||||||
"with open(\"assets/matplotlibrc.json\") as f:\n",
|
"with open(\"../_static/matplotlibrc.json\") as f:\n",
|
||||||
" matplotlib.rcParams.update(json.load(f))\n",
|
" matplotlib.rcParams.update(json.load(f))\n",
|
||||||
"\n",
|
"\n",
|
||||||
"np.random.seed(\n",
|
"np.random.seed(\n",
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"The classic way to do this in the python community is to use a tool called [Sphinx](https://www.sphinx-doc.org/en/master/), you'll probably be quite familiar with pages generated by Sphinx if you've ever used any python packages. To give you teaser by the end of this chapter we will have an autogenerated website for the project that looks like [this](https://recode-mcmcff.readthedocs.io/en/latest/)\n",
|
"The classic way to do this in the python community is to use a tool called [Sphinx](https://www.sphinx-doc.org/en/master/), you'll probably be quite familiar with pages generated by Sphinx if you've ever used any python packages. To give you teaser by the end of this chapter we will have an autogenerated website for the project that looks like [this](https://recode-mcmcff.readthedocs.io/en/latest/)\n",
|
||||||
"\n",
|
"\n",
|
||||||
"<div style=\"margin:auto;max-width:800px;\">\n",
|
"<div style=\"margin:auto;max-width:800px;\">\n",
|
||||||
"<img src=\"assets/readthedocs_screenshot.png\" alt=\"A screenshot of the read the docs page linked above\"/>\n",
|
"<img src=\"../_static/readthedocs_screenshot.png\" alt=\"A screenshot of the read the docs page linked above\"/>\n",
|
||||||
"</div>"
|
"</div>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -46,13 +46,13 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"This means that the part of our source code that looks like: \n",
|
"This means that the part of our source code that looks like: \n",
|
||||||
"<div style=\"margin:auto;max-width:800px;\">\n",
|
"<div style=\"margin:auto;max-width:800px;\">\n",
|
||||||
"<img src=\"assets/sourcecode_screenshot.png\" alt=\"A screenshot of lines 50-77 of MCFF/mcmc.py\"/>\n",
|
"<img src=\"../_static/sourcecode_screenshot.png\" alt=\"A screenshot of lines 50-77 of MCFF/mcmc.py\"/>\n",
|
||||||
"</div>\n",
|
"</div>\n",
|
||||||
"\n",
|
"\n",
|
||||||
"will get rendered to [this][readthedocs_api]:\n",
|
"will get rendered to [this][readthedocs_api]:\n",
|
||||||
"\n",
|
"\n",
|
||||||
"<div style=\"margin:auto;max-width:800px;\">\n",
|
"<div style=\"margin:auto;max-width:800px;\">\n",
|
||||||
"<img src=\"assets/readthedocs_api_screenshot.png\" alt=\"A screenshot of the previous link showing what mcmc.py gets rendered to\"/>\n",
|
"<img src=\"../_static/readthedocs_api_screenshot.png\" alt=\"A screenshot of the previous link showing what mcmc.py gets rendered to\"/>\n",
|
||||||
"</div>\n",
|
"</div>\n",
|
||||||
"\n",
|
"\n",
|
||||||
"[readthedocs_api]: https://recode-mcmcff.readthedocs.io/en/latest/api_docs.html"
|
"[readthedocs_api]: https://recode-mcmcff.readthedocs.io/en/latest/api_docs.html"
|
||||||
@ -215,9 +215,9 @@
|
|||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python [conda env:recode]",
|
"display_name": "Python 3 (ipykernel)",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "conda-env-recode-py"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
"language_info": {
|
"language_info": {
|
||||||
"codemirror_mode": {
|
"codemirror_mode": {
|
||||||
@ -229,7 +229,12 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.9.12"
|
"version": "3.8.10"
|
||||||
|
},
|
||||||
|
"vscode": {
|
||||||
|
"interpreter": {
|
||||||
|
"hash": "f5403acae4671aac0ae5a29dd5903d33d0105a9e9d4148f755d3321f5023d387"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
@ -18,7 +18,7 @@ import pickle
|
|||||||
# This loads some custom styles for matplotlib
|
# This loads some custom styles for matplotlib
|
||||||
import json, matplotlib
|
import json, matplotlib
|
||||||
|
|
||||||
with open("../assets/matplotlibrc.json") as f:
|
with open("../../_static/matplotlibrc.json") as f:
|
||||||
matplotlib.rcParams.update(json.load(f))
|
matplotlib.rcParams.update(json.load(f))
|
||||||
|
|
||||||
from itertools import count
|
from itertools import count
|
||||||
|