Skip to content

theme update and doc fixes #473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tmtags
tags
.DS_Store
.cache
_version.py
# IntelliJ IDE
.idea
*.iml
Expand Down
11 changes: 11 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@ python:
sphinx:
fail_on_warning: false
configuration: docs/conf.py

search:
ranking:
_sources/*: -10
_modules/*: -5
genindex.html: -9

ignore:
- 404.html
- search.html
- index.html
26 changes: 14 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,18 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys

import pymc_extras # isort:skip

sys.path.insert(0, os.path.abspath("../"))
import pymc_extras

# -- Project information -----------------------------------------------------

project = "pymc_extras"
copyright = "2022, pymc-devs"
author = "pymc-devs"

# The short X.Y version
version = pymc_extras.__version__
# The full version, including alpha/beta/rc tags
release = version
release = pymc_extras.__version__
# The short X.Y version
version = release.split("+")[0] if "+" in release else release


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -112,9 +107,16 @@
"collapse_navigation": True,
"show_toc_level": 2,
"navigation_depth": 4,
"search_bar_text": "Search the docs...",
"use_search_override": False,
"search_bar_text": "Search within PyMC-extras...",
"use_search_override": True,
"logo": {"text": project},
"icon_links": [
{
"url": "https://github.com/pymc-devs/pymc-extras",
"icon": "fa-brands fa-github",
"name": "GitHub",
},
],
}
html_context = {
"github_user": "pymc-devs",
Expand All @@ -128,7 +130,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["../_static"]
# html_static_path = ["../_static"]

# -- Options for HTMLHelp output ---------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Where we grow the next batch of cool PyMC features
Installation
============

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

.. code-block:: bash

Expand Down
5 changes: 3 additions & 2 deletions pymc_extras/distributions/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class GenExtreme(Continuous):

\left\{x: 1 + \xi\left(\frac{x-\mu}{\sigma}\right) > 0 \right\}.

Note that this parametrization is per Coles (2001), and differs from that of
Note that this parametrization is per Coles (2001) [1]_, and differs from that of
Scipy in the sign of the shape parameter, :math:`\xi`.

.. plot::
Expand Down Expand Up @@ -132,7 +132,7 @@ class GenExtreme(Continuous):

References
----------
.. [Coles2001] Coles, S.G. (2001).
.. [1] Coles, S.G. (2001).
An Introduction to the Statistical Modeling of Extreme Values
Springer-Verlag, London

Expand Down Expand Up @@ -260,6 +260,7 @@ class Chi:
Examples
--------
.. code-block:: python

import pymc as pm
from pymc_extras.distributions import Chi

Expand Down
4 changes: 3 additions & 1 deletion pymc_extras/distributions/discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class GeneralizedPoisson(pm.distributions.Discrete):

.. math:: f(x \mid \mu, \lambda) =
\frac{\mu (\mu + \lambda x)^{x-1} e^{-\mu - \lambda x}}{x!}

======== ======================================
Support :math:`x \in \mathbb{N}_0`
Mean :math:`\frac{\mu}{1 - \lambda}`
Expand All @@ -135,9 +136,10 @@ class GeneralizedPoisson(pm.distributions.Discrete):
When lam < 0, the mean is greater than the variance (underdispersion).
When lam > 0, the mean is less than the variance (overdispersion).

The PMF is taken from [1]_ and the random generator function is adapted from [2]_.

References
----------
The PMF is taken from [1] and the random generator function is adapted from [2].
.. [1] Consul, PoC, and Felix Famoye. "Generalized Poisson regression model."
Communications in Statistics-Theory and Methods 21.1 (1992): 89-109.
.. [2] Famoye, Felix. "Generalized Poisson random variate generation." American
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ dev = [
]
docs = [
"nbsphinx>=0.4.2",
"pydata-sphinx-theme>=0.6.3",
"sphinx>=4.0",
"pymc-sphinx-theme@git+https://github.com/pymc-devs/pymc-sphinx-theme",
"pymc-sphinx-theme>=0.16",
]
dask_histogram = [
"dask[complete]<2025.1.1",
Expand Down