Skip to content

Commit

Permalink
DOC: Add a few components to the sphinx example (#38)
Browse files Browse the repository at this point in the history
* Added testing of citations.
 * Added bibliography directive to .rst and .md files.
 * Added sample bibliography derived from QuantEcon.
 * Updated dependencies/conf with sphinxcontrib-bibtex
* Added ipython dependency for sphinx.
* Added dummy documents for testing {doc} inline token.
 * Added two dummy .md files as link targets
 * Added dummy files to hidden toctree in index.
  • Loading branch information
rossbar committed Feb 15, 2020
1 parent 935222b commit 8c7c7a7
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ["myst_parser"]
extensions = [
"myst_parser",
"sphinxcontrib.bibtex",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
1 change: 1 addition & 0 deletions docs/heavy_tails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# DUMMY DOCUMENT FOR TESTING :doc: ROLE
8 changes: 8 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ caption: Example pages
wealth_dynamics_rst.rst
wealth_dynamics_md.md
```

```{toctree}
---
hidden: True
---
heavy_tails.md
kesten_processes.md
```
1 change: 1 addition & 0 deletions docs/kesten_processes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# DUMMY DOCUMENT FOR TESTING :doc: ROLE
12 changes: 12 additions & 0 deletions docs/references.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
###
Single example from the QuantEcon Bib
###
@article{benhabib2018skewed,
title={Skewed wealth distributions: Theory and empirics},
author={Benhabib, Jess and Bisin, Alberto},
journal={Journal of Economic Literature},
volume={56},
number={4},
pages={1261--91},
year={2018}
}
3 changes: 3 additions & 0 deletions docs/wealth_dynamics_md.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,3 +466,6 @@ plt.show()

We see that greater volatility has the effect of increasing inequality
in this model.

```{bibliography} references.bib
```
2 changes: 2 additions & 0 deletions docs/wealth_dynamics_rst.rst
Original file line number Diff line number Diff line change
Expand Up @@ -483,3 +483,5 @@ volatility term :math:`\sigma_r` in financial returns.
We see that greater volatility has the effect of increasing inequality in this model.

.. bibliography:: references.bib
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@
"pytest-regressions",
"beautifulsoup4",
],
"sphinx": ["pyyaml", "docutils>=0.15", "sphinx>=2,<3"],
"sphinx": [
"pyyaml",
"docutils>=0.15",
"sphinx>=2,<3",
"sphinxcontrib-bibtex",
"ipython",
],
},
zip_safe=True,
)

0 comments on commit 8c7c7a7

Please sign in to comment.