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`.
This commit is contained in:
gnikit 2022-07-18 16:09:50 +01:00
parent 5d1f7d08e9
commit 673a458761
No known key found for this signature in database
GPG Key ID: E9A03930196133F0
13 changed files with 36 additions and 26 deletions

View File

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

View File

Before

Width:  |  Height:  |  Size: 250 KiB

After

Width:  |  Height:  |  Size: 250 KiB

View File

Before

Width:  |  Height:  |  Size: 304 KiB

After

Width:  |  Height:  |  Size: 304 KiB

View File

Before

Width:  |  Height:  |  Size: 268 KiB

After

Width:  |  Height:  |  Size: 268 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -25,7 +25,7 @@
"# This loads some custom styles for matplotlib\n",
"import json, matplotlib\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",
"\n",
"np.random.seed(\n",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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",
"\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>"
]
},
@ -46,13 +46,13 @@
"source": [
"This means that the part of our source code that looks like: \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",
"\n",
"will get rendered to [this][readthedocs_api]:\n",
"\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",
"\n",
"[readthedocs_api]: https://recode-mcmcff.readthedocs.io/en/latest/api_docs.html"
@ -215,9 +215,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:recode]",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "conda-env-recode-py"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
@ -229,7 +229,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.8.10"
},
"vscode": {
"interpreter": {
"hash": "f5403acae4671aac0ae5a29dd5903d33d0105a9e9d4148f755d3321f5023d387"
}
}
},
"nbformat": 4,

View File

@ -18,7 +18,7 @@ import pickle
# This loads some custom styles for matplotlib
import json, matplotlib
with open("../assets/matplotlibrc.json") as f:
with open("../../_static/matplotlibrc.json") as f:
matplotlib.rcParams.update(json.load(f))
from itertools import count