Skip to content

Commit

Permalink
Use pydata theme for docs (#163)
Browse files Browse the repository at this point in the history
* Update requirements.txt

* Update conf.py

* moving things around
  • Loading branch information
dfm committed Nov 21, 2023
1 parent 32b29c8 commit 31f7654
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 69 deletions.
2 changes: 1 addition & 1 deletion docs/Makefile
Expand Up @@ -19,7 +19,7 @@ TUTORIALS = tutorials/hyper.rst tutorials/model.rst tutorials/new-kernel.rst \
tutorials/first.rst tutorials/scaling.rst tutorials/mixture.rst \
tutorials/bayesopt.rst

tutorials/%.rst: _static/notebooks/%.ipynb tutorials/tutorial_rst.tpl
tutorials/%.rst: _static/notebooks/%.ipynb
jupyter nbconvert --template tutorials/tutorial_rst --to rst $< --output-dir tutorials

.PHONY: clean
Expand Down
29 changes: 12 additions & 17 deletions docs/conf.py
Expand Up @@ -44,8 +44,8 @@
master_doc = "index"

# General information about the project.
project = u"George"
copyright = u"2012-2021 Dan Foreman-Mackey"
project = "george"
copyright = "2012-2023 Dan Foreman-Mackey"

version = george.__version__
release = george.__version__
Expand All @@ -54,22 +54,17 @@
pygments_style = "sphinx"

# Readthedocs.
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
if not on_rtd:
import sphinx_rtd_theme

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

html_theme = "pydata_sphinx_theme"
html_title = "george"
htmp_theme_options = dict(
analytics_id="analytics_id",
)
html_context = dict(
display_github=True,
github_user="dfm",
github_repo="george",
github_version="main",
conf_py_path="/docs/",
)
# html_context = dict(
# display_github=True,
# github_user="dfm",
# github_repo="george",
# github_version="main",
# conf_py_path="/docs/",
# )
html_static_path = ["_static"]
html_show_sourcelink = False
# html_show_sourcelink = False
25 changes: 4 additions & 21 deletions docs/index.rst
Expand Up @@ -30,26 +30,9 @@ George is being actively developed in `a public repository on GitHub

.. toctree::
:maxdepth: 2
:caption: User Guide

user/quickstart
user/kernels
user/gp
user/solvers
user/modeling


.. toctree::
:maxdepth: 1
:caption: Tutorials

tutorials/first
tutorials/model
tutorials/hyper
tutorials/scaling
tutorials/new-kernel
tutorials/mixture
tutorials/bayesopt
user/index
tutorials/index


Contributors
Expand All @@ -61,9 +44,9 @@ Contributors
License & Attribution
---------------------

Copyright 2012-2022 Daniel Foreman-Mackey and contributors.
Copyright 2012-2023 Daniel Foreman-Mackey and contributors.

George is being developed by `Dan Foreman-Mackey <http://dan.iel.fm>`_ in a
George is being developed by `Dan Foreman-Mackey <https://dfm.io>`_ in a
`public GitHub repository <https://github.com/dfm/george>`_.
The source code is made available under the terms of the MIT license.

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
@@ -1 +1,2 @@
pyyaml
pydata-sphinx-theme
3 changes: 0 additions & 3 deletions docs/tutorials/bayesopt.rst
@@ -1,6 +1,3 @@

.. module:: george

.. note:: This tutorial was generated from an IPython notebook that can be
downloaded `here <../../_static/notebooks/bayesopt.ipynb>`_.

Expand Down
3 changes: 0 additions & 3 deletions docs/tutorials/first.rst
@@ -1,6 +1,3 @@

.. module:: george

.. note:: This tutorial was generated from an IPython notebook that can be
downloaded `here <../../_static/notebooks/first.ipynb>`_.

Expand Down
3 changes: 0 additions & 3 deletions docs/tutorials/hyper.rst
@@ -1,6 +1,3 @@

.. module:: george

.. note:: This tutorial was generated from an IPython notebook that can be
downloaded `here <../../_static/notebooks/hyper.ipynb>`_.

Expand Down
14 changes: 14 additions & 0 deletions docs/tutorials/index.rst
@@ -0,0 +1,14 @@
Tutorials
=========

.. toctree::
:maxdepth: 2

first
model
hyper
scaling
new-kernel
mixture
bayesopt

3 changes: 0 additions & 3 deletions docs/tutorials/mixture.rst
@@ -1,6 +1,3 @@

.. module:: george

.. note:: This tutorial was generated from an IPython notebook that can be
downloaded `here <../../_static/notebooks/mixture.ipynb>`_.

Expand Down
3 changes: 0 additions & 3 deletions docs/tutorials/model.rst
@@ -1,6 +1,3 @@

.. module:: george

.. note:: This tutorial was generated from an IPython notebook that can be
downloaded `here <../../_static/notebooks/model.ipynb>`_.

Expand Down
3 changes: 0 additions & 3 deletions docs/tutorials/new-kernel.rst
@@ -1,6 +1,3 @@

.. module:: george

.. note:: This tutorial was generated from an IPython notebook that can be
downloaded `here <../../_static/notebooks/new-kernel.ipynb>`_.

Expand Down
3 changes: 0 additions & 3 deletions docs/tutorials/scaling.rst
@@ -1,6 +1,3 @@

.. module:: george

.. note:: This tutorial was generated from an IPython notebook that can be
downloaded `here <../../_static/notebooks/scaling.ipynb>`_.

Expand Down
2 changes: 0 additions & 2 deletions docs/tutorials/tutorial_rst.tpl
@@ -1,8 +1,6 @@
{%- extends 'display_priority.tpl' -%}

{% block header %}
.. module:: george

.. note:: This tutorial was generated from an IPython notebook that can be
downloaded `here <../../_static/notebooks/{{ resources.metadata.name }}.ipynb>`_.

Expand Down
12 changes: 12 additions & 0 deletions docs/user/index.rst
@@ -0,0 +1,12 @@
User Guide
==========

.. toctree::
:maxdepth: 2

quickstart
kernels
gp
solvers
modeling

2 changes: 1 addition & 1 deletion docs/user/kernels.rst.template
Expand Up @@ -68,7 +68,7 @@ This makes the code fast and consistent across interfaces but it also means
that it isn't currently possible to implement new kernel functions without
recompiling the code.
Almost every kernel has hyperparameters that you can set to control its
behavior and these are controlled using the :ref:`modeling`.
behavior and these are controlled using the :ref:`modeling-protocol`.

.. code-block:: python

Expand Down
6 changes: 0 additions & 6 deletions docs/user/upgrade.rst

This file was deleted.

0 comments on commit 31f7654

Please sign in to comment.