Skip to content

Commit 04b838a

Browse files
authored
theme update and doc fixes (#473)
* theme update and doc fixes * configure search and use pypi release
1 parent 0b4098f commit 04b838a

File tree

7 files changed

+34
-18
lines changed

7 files changed

+34
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tmtags
1111
tags
1212
.DS_Store
1313
.cache
14+
_version.py
1415
# IntelliJ IDE
1516
.idea
1617
*.iml

.readthedocs.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,14 @@ python:
1717
sphinx:
1818
fail_on_warning: false
1919
configuration: docs/conf.py
20+
21+
search:
22+
ranking:
23+
_sources/*: -10
24+
_modules/*: -5
25+
genindex.html: -9
26+
27+
ignore:
28+
- 404.html
29+
- search.html
30+
- index.html

docs/conf.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,18 @@
2626
# add these directories to sys.path here. If the directory is relative to the
2727
# documentation root, use os.path.abspath to make it absolute, like shown here.
2828
#
29-
import os
30-
import sys
31-
32-
import pymc_extras # isort:skip
33-
34-
sys.path.insert(0, os.path.abspath("../"))
29+
import pymc_extras
3530

3631
# -- Project information -----------------------------------------------------
3732

3833
project = "pymc_extras"
3934
copyright = "2022, pymc-devs"
4035
author = "pymc-devs"
4136

42-
# The short X.Y version
43-
version = pymc_extras.__version__
4437
# The full version, including alpha/beta/rc tags
45-
release = version
38+
release = pymc_extras.__version__
39+
# The short X.Y version
40+
version = release.split("+")[0] if "+" in release else release
4641

4742

4843
# -- General configuration ---------------------------------------------------
@@ -112,9 +107,16 @@
112107
"collapse_navigation": True,
113108
"show_toc_level": 2,
114109
"navigation_depth": 4,
115-
"search_bar_text": "Search the docs...",
116-
"use_search_override": False,
110+
"search_bar_text": "Search within PyMC-extras...",
111+
"use_search_override": True,
117112
"logo": {"text": project},
113+
"icon_links": [
114+
{
115+
"url": "https://github.com/pymc-devs/pymc-extras",
116+
"icon": "fa-brands fa-github",
117+
"name": "GitHub",
118+
},
119+
],
118120
}
119121
html_context = {
120122
"github_user": "pymc-devs",
@@ -128,7 +130,7 @@
128130
# Add any paths that contain custom static files (such as style sheets) here,
129131
# relative to this directory. They are copied after the builtin static files,
130132
# so a file named "default.css" will overwrite the builtin "default.css".
131-
html_static_path = ["../_static"]
133+
# html_static_path = ["../_static"]
132134

133135
# -- Options for HTMLHelp output ---------------------------------------------
134136

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Where we grow the next batch of cool PyMC features
2121
Installation
2222
============
2323

24-
To install the latest release on [PyPI](https://pypi.org/project/pymc-extras/), you can use a package manager like pip:
24+
To install the latest release on `PyPI <https://pypi.org/project/pymc-extras/>`_, you can use a package manager like pip:
2525

2626
.. code-block:: bash
2727

pymc_extras/distributions/continuous.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class GenExtreme(Continuous):
8181
8282
\left\{x: 1 + \xi\left(\frac{x-\mu}{\sigma}\right) > 0 \right\}.
8383
84-
Note that this parametrization is per Coles (2001), and differs from that of
84+
Note that this parametrization is per Coles (2001) [1]_, and differs from that of
8585
Scipy in the sign of the shape parameter, :math:`\xi`.
8686
8787
.. plot::
@@ -132,7 +132,7 @@ class GenExtreme(Continuous):
132132
133133
References
134134
----------
135-
.. [Coles2001] Coles, S.G. (2001).
135+
.. [1] Coles, S.G. (2001).
136136
An Introduction to the Statistical Modeling of Extreme Values
137137
Springer-Verlag, London
138138
@@ -260,6 +260,7 @@ class Chi:
260260
Examples
261261
--------
262262
.. code-block:: python
263+
263264
import pymc as pm
264265
from pymc_extras.distributions import Chi
265266

pymc_extras/distributions/discrete.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ class GeneralizedPoisson(pm.distributions.Discrete):
116116
117117
.. math:: f(x \mid \mu, \lambda) =
118118
\frac{\mu (\mu + \lambda x)^{x-1} e^{-\mu - \lambda x}}{x!}
119+
119120
======== ======================================
120121
Support :math:`x \in \mathbb{N}_0`
121122
Mean :math:`\frac{\mu}{1 - \lambda}`
@@ -135,9 +136,10 @@ class GeneralizedPoisson(pm.distributions.Discrete):
135136
When lam < 0, the mean is greater than the variance (underdispersion).
136137
When lam > 0, the mean is less than the variance (overdispersion).
137138
139+
The PMF is taken from [1]_ and the random generator function is adapted from [2]_.
140+
138141
References
139142
----------
140-
The PMF is taken from [1] and the random generator function is adapted from [2].
141143
.. [1] Consul, PoC, and Felix Famoye. "Generalized Poisson regression model."
142144
Communications in Statistics-Theory and Methods 21.1 (1992): 89-109.
143145
.. [2] Famoye, Felix. "Generalized Poisson random variate generation." American

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ dev = [
5353
]
5454
docs = [
5555
"nbsphinx>=0.4.2",
56-
"pydata-sphinx-theme>=0.6.3",
5756
"sphinx>=4.0",
58-
"pymc-sphinx-theme@git+https://github.com/pymc-devs/pymc-sphinx-theme",
57+
"pymc-sphinx-theme>=0.16",
5958
]
6059
dask_histogram = [
6160
"dask[complete]<2025.1.1",

0 commit comments

Comments
 (0)