Skip to content

Commit 785129b

Browse files
committed
DOC: Change to improved theme
Switch from the not maintained sphinx-material to sphinx-immaterial
1 parent 4fee62a commit 785129b

13 files changed

+204
-63
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ docs/source/generated
99
docs/source/dev/generated
1010
docs/source/examples/generated
1111
docs/source/datasets/generated
12+
docs/source/examples/index.rst
1213
docs/source/examples/notebooks/generated
1314
docs/source/datasets/statsmodels.datasets.*
1415
docs/source/savefig
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,53 @@
1-
.md-typeset div.deprecated {
2-
font-size: 0.85rem;
3-
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.2);
4-
position: relative;
5-
margin: 1.5625em 0;
1+
span.versionmodified.deprecated {
2+
color: #c00;
3+
font-weight: bold;
4+
}
5+
6+
span.classifier:before {
7+
font-style: normal;
8+
margin: 0 0.5em;
9+
content: ":";
10+
display: inline-block;
11+
}
12+
13+
div.deprecated, div.versionadded, div.versionchanged {
14+
background-color: #FFFFFF;
15+
border: .05rem solid;
16+
border-color: #459db9;
17+
border-radius: .2rem;
18+
/* box-shadow: 0 .2rem .5rem #d8d8d8,0 0 .0625rem #d8d8d8!important; */
19+
margin: 1.5625em auto;
20+
overflow: hidden;
621
padding: 0 .6rem;
7-
border-left: .2rem solid #ff1744;
8-
border-radius: .1rem;
9-
overflow: auto;
22+
page-break-inside: avoid;
23+
position: relative;
24+
transition: color .25s,background-color .25s,border-color .25s;
25+
vertical-align: middle;
26+
font-size: 0.64rem;
27+
}
28+
div.deprecated>p, div.versionadded>p, div.versionchanged>p {
29+
margin-bottom: .6rem;
30+
margin-top: .6rem;
31+
}
32+
33+
div.deprecated {
34+
border-color: #dc3545;
35+
background-color: rgba(255, 0, 0, 0.1);
36+
}
37+
38+
span.versionmodified {
39+
font-weight: 600;
40+
}
41+
42+
.versionmodified {
43+
font-style: italic;
44+
}
45+
46+
div.deprecated p:before {
47+
background-color: #dc3545;
1048
}
1149

12-
.md-typeset span.deprecated {
13-
font-weight: 700;
14-
color: #ff1744;
50+
span.versionmodified.deprecated:before {
51+
color: #dc3545;
1552
}
53+

docs/source/conf.py

+115-24
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
import os
1818
from os.path import dirname, join
1919
import sys
20+
from jinja2 import FileSystemLoader, Environment
2021

2122
import yaml
2223
from numpydoc.xref import DEFAULT_LINKS
2324

24-
import sphinx_material
2525
from statsmodels import __version__
2626

2727
# -- Monkey Patch ----------------------------------------------------------
@@ -56,6 +56,7 @@
5656
'matplotlib.sphinxext.plot_directive',
5757
'IPython.sphinxext.ipython_console_highlighting',
5858
'IPython.sphinxext.ipython_directive',
59+
"sphinx_immaterial",
5960
]
6061

6162
try:
@@ -162,34 +163,117 @@
162163

163164
# The theme to use for HTML and HTML Help pages. See the documentation for
164165
# a list of builtin themes.
165-
extensions.append('sphinx_material')
166-
html_theme_path = sphinx_material.html_theme_path()
167-
html_context = sphinx_material.get_html_context()
168-
html_theme = 'sphinx_material'
166+
167+
html_theme = 'sphinx_immaterial'
169168
html_title = project
170169
html_short_title = project
171170
# material theme options (see theme.conf for more information)
172171

173-
base_url = 'https://statsmodels.org/'
174-
base_url += 'stable/' if full_version == version else 'devel/'
172+
site_url = 'https://statsmodels.org/'
173+
site_url += 'stable/' if full_version == version else 'devel/'
174+
175+
# sphinx_immaterial theme options
175176
html_theme_options = {
176-
'base_url': base_url,
177-
'repo_url': 'https://github.com/statsmodels/statsmodels',
178-
'repo_name': 'statsmodels',
179-
'globaltoc_depth': 3,
180-
'globaltoc_collapse': True,
181-
'globaltoc_includehidden': True,
182-
'color_primary': 'indigo',
183-
'color_accent': 'blue',
184-
'nav_title': 'statsmodels {0}'.format(version),
185-
'master_doc': False,
186-
'nav_links': [],
187-
'heroes': {'index': 'statistical models, hypothesis tests, and data '
188-
'exploration',
189-
'examples/index': 'examples and tutorials to get started with '
190-
'statsmodels'},
177+
"icon": {"repo": "fontawesome/brands/github"},
178+
"site_url": site_url,
179+
"repo_url": "https://github.com/statsmodels/statsmodels/",
180+
"repo_name": "statsmodels",
181+
"repo_type": "github",
182+
"palette": {"primary": "indigo", "accent": "blue"},
183+
"globaltoc_collapse": True,
184+
"toc_title": "Contents",
191185
"version_dropdown": True,
192-
"version_json": "../versions-v2.json",
186+
"version_info": [
187+
{
188+
"version": "https://statsmodels.org/stable/",
189+
"title": "Release",
190+
"aliases": [],
191+
},
192+
{
193+
"version": "https://statsmodels.org/devel/",
194+
"title": "Development",
195+
"aliases": [],
196+
},
197+
{
198+
"version": "https://statsmodels.org/0.13.0/",
199+
"title": "Version v0.13.0",
200+
"aliases": [],
201+
},
202+
{
203+
"version": "https://statsmodels.org/0.12.2/",
204+
"title": "Version v0.12.2",
205+
"aliases": [],
206+
},
207+
{
208+
"version": "https://statsmodels.org/0.12.1/",
209+
"title": "Version v0.12.1",
210+
"aliases": [],
211+
},
212+
{
213+
"version": "https://statsmodels.org/0.12.0/",
214+
"title": "Version v0.12.0",
215+
"aliases": [],
216+
},
217+
{
218+
"version": "https://statsmodels.org/0.11.1/",
219+
"title": "Version v0.11.1",
220+
"aliases": [],
221+
},
222+
{
223+
"version": "https://statsmodels.org/0.11.0/",
224+
"title": "Version v0.11.0",
225+
"aliases": [],
226+
},
227+
{
228+
"version": "https://statsmodels.org/0.10.2/",
229+
"title": "Version v0.10.2",
230+
"aliases": [],
231+
},
232+
{
233+
"version": "https://statsmodels.org/0.10.1/",
234+
"title": "Version v0.10.1",
235+
"aliases": [],
236+
},
237+
{
238+
"version": "https://statsmodels.org/0.10.0/",
239+
"title": "Version v0.10.0",
240+
"aliases": [],
241+
},
242+
243+
{
244+
"version": "https://statsmodels.org/0.9.0/",
245+
"title": "Version 0.9.0",
246+
"aliases": [],
247+
},
248+
249+
{
250+
"version": "https://statsmodels.org/0.8.0/",
251+
"title": "Version 0.8.0",
252+
"aliases": [],
253+
},
254+
{
255+
"version": "https://statsmodels.org/0.6.1/",
256+
"title": "Version 0.6.1",
257+
"aliases": [],
258+
},
259+
260+
],
261+
"toc_title_is_page_title": True,
262+
"social": [
263+
{
264+
"icon": "fontawesome/brands/github",
265+
"link": "https://github.com/statsmodels/statsmodels/",
266+
"name": "Source on github.com",
267+
},
268+
{
269+
"icon": "fontawesome/brands/python",
270+
"link": "https://pypi.org/project/statsmodels/",
271+
},
272+
{
273+
"icon": "fontawesome/solid/quote-left",
274+
"link": "https://doi.org/10.5281/zenodo.593847",
275+
},
276+
],
193277
}
194278

195279
language = 'en'
@@ -406,7 +490,14 @@
406490
github_project_url = 'https://github.com/statsmodels/statsmodels'
407491

408492
example_context = yaml.safe_load(open('examples/landing.yml', encoding="utf-8"))
409-
html_context.update({'examples': example_context})
493+
494+
example_loader = FileSystemLoader("examples")
495+
example_env = Environment(loader=example_loader)
496+
example_tmpl = example_env.get_template("index.jinja2")
497+
with open("examples/index.rst", "w") as example_index:
498+
example_index.write(example_tmpl.render(examples=example_context))
499+
500+
# html_context.update({'examples': example_context})
410501

411502
# --------------- DOCTEST -------------------
412503
doctest_global_setup = """

docs/source/examples/index.rst renamed to docs/source/examples/index.jinja2

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:hero: examples and tutorials to get started with statsmodels
2+
13
:orphan:
24

35
.. _statsmodels-examples:

docs/source/index.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:hero: statistical models, hypothesis tests, and data exploration
2+
13
.. image:: images/statsmodels-logo-v2-horizontal.svg
24
:width: 50%
35
:alt: statsmodels

docs/source/release/version0.10.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ A new issue label `type-bug-wrong` indicates bugs that cause that incorrect
292292
numbers are returned without warnings.
293293
(Regular bugs are mostly usability bugs or bugs that raise an exception for
294294
unsupported use cases.)
295-
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.10/>`_
295+
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.10>`_
296296

297297
- :issue:`5475`
298298
- :issue:`5316`
@@ -303,8 +303,8 @@ Major Bugs Fixed
303303

304304
See github issues for a list of bug fixes included in this release
305305

306-
- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.10+label%3Atype-bug/>`_
307-
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.10+label%3Atype-bug-wrong/>`_
306+
- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.10+label%3Atype-bug>`_
307+
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.10+label%3Atype-bug-wrong>`_
308308

309309

310310
Development summary and credits

docs/source/release/version0.11.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -518,16 +518,16 @@ A new issue label `type-bug-wrong` indicates bugs that cause that incorrect
518518
numbers are returned without warnings.
519519
(Regular bugs are mostly usability bugs or bugs that raise an exception for
520520
unsupported use cases.)
521-
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.11/>`_
521+
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.11>`_
522522

523523

524524
Major Bugs Fixed
525525
================
526526

527527
See github issues for a list of bug fixes included in this release
528528

529-
- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.11+label%3Atype-bug/>`_
530-
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.11+label%3Atype-bug-wrong/>`_
529+
- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.11+label%3Atype-bug>`_
530+
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.11+label%3Atype-bug-wrong>`_
531531

532532

533533
Development summary and credits

docs/source/release/version0.12.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -479,16 +479,16 @@ A new issue label `type-bug-wrong` indicates bugs that cause that incorrect
479479
numbers are returned without warnings.
480480
(Regular bugs are mostly usability bugs or bugs that raise an exception for
481481
unsupported use cases.)
482-
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.12/>`_
482+
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.12>`_
483483

484484

485485
Major Bugs Fixed
486486
================
487487

488488
See github issues for a list of bug fixes included in this release
489489

490-
- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.12+label%3Atype-bug/>`_
491-
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.12+label%3Atype-bug-wrong/>`_
490+
- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.12+label%3Atype-bug>`_
491+
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.12+label%3Atype-bug-wrong>`_
492492

493493

494494
Development summary and credits

docs/source/release/version0.13.0.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -468,16 +468,16 @@ A new issue label `type-bug-wrong` indicates bugs that cause that incorrect
468468
numbers are returned without warnings.
469469
(Regular bugs are mostly usability bugs or bugs that raise an exception for
470470
unsupported use cases.)
471-
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.13/>`_
471+
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.13>`_
472472

473473

474474
Major Bugs Fixed
475475
================
476476

477477
See github issues for a list of bug fixes included in this release
478478

479-
- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.13+label%3Atype-bug/>`_
480-
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.13+label%3Atype-bug-wrong/>`_
479+
- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.13+label%3Atype-bug>`_
480+
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.13+label%3Atype-bug-wrong>`_
481481

482482

483483
Development summary and credits

docs/source/release/version0.14.rst

+16-9
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,23 @@ extended only to dimensions 3 and 4.
9898
New class ECDFDiscrete for empirical distribution function when observations
9999
are not unique as in discrete distributions.
100100

101+
Multiseason STL decomposition (MSTL)
102+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103+
The existing :class:`~statsmodels.tsa.seasonal.STL` class has been extended to handle multiple seasonal
104+
components in :class:`~statsmodels.tsa.seasonal.MSTL`
105+
101106

102107
Other Notable Enhancments
103108
-------------------------
104109

105-
- burg option in pacf #8113
106-
- new link for GLM: logc #8155
107-
- rename class names for links for GLM, lower case names are deprecated #8569?
108-
- allow singular covariance in gaussian copula #8504
109-
- GLM: Tweedie full loglikelihood #8560
110-
- x13: option for location of temporary files #8564
110+
- burg option in pacf :pr:`8113`
111+
- new link for GLM: logc :pr:`8155`
112+
- rename class names for links for GLM, lower case names are deprecated :pr:`8569`
113+
- allow singular covariance in gaussian copula :pr:`8504`
114+
- GLM: Tweedie full loglikelihood :pr:`8560`
115+
- x13: option for location of temporary files :pr:`8564`
116+
- Added an information set argument to ``get_prediction`` and ``predict`` methods of statespace models
117+
that lets the user decide on which information set to use when making forecasts. :pr:`8002`
111118

112119
What's new - an overview
113120
========================
@@ -543,16 +550,16 @@ A new issue label `type-bug-wrong` indicates bugs that cause that incorrect
543550
numbers are returned without warnings.
544551
(Regular bugs are mostly usability bugs or bugs that raise an exception for
545552
unsupported use cases.)
546-
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.14/>`_
553+
`see tagged issues <https://github.com/statsmodels/statsmodels/issues?q=is%3Aissue+label%3Atype-bug-wrong+is%3Aclosed+milestone%3A0.14>`_
547554

548555

549556
Major Bugs Fixed
550557
================
551558

552559
See github issues for a list of bug fixes included in this release
553560

554-
- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.14+label%3Atype-bug/>`_
555-
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.14+label%3Atype-bug-wrong/>`_
561+
- `Closed bugs <https://github.com/statsmodels/statsmodels/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Amerged+milestone%3A0.14+label%3Atype-bug>`_
562+
- `Closed bugs (wrong result) <https://github.com/statsmodels/statsmodels/pulls?q=is%3Apr+is%3Amerged+milestone%3A0.14+label%3Atype-bug-wrong>`_
556563

557564

558565
Development summary and credits

0 commit comments

Comments
 (0)