Skip to content

Commit

Permalink
rtds version
Browse files Browse the repository at this point in the history
  • Loading branch information
dfm committed Mar 7, 2021
1 parent 65661af commit 2fc00b7
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 37 deletions.
42 changes: 20 additions & 22 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
# -*- coding: utf-8 -*-

import os

import corner

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"nbsphinx",
"myst_nb",
]
templates_path = ["_templates"]
source_suffix = ".rst"
master_doc = "index"

Expand All @@ -21,23 +18,24 @@
version = corner.__version__
release = corner.__version__

exclude_patterns = ["_build", "_static/notebooks/profile"]
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()]

exclude_patterns = ["_build"]
html_theme = "sphinx_book_theme"
html_title = "corner.py"
html_static_path = ["_static"]
html_show_sourcelink = False

nbsphinx_execute = "always"
nbsphinx_prolog = """
.. note:: This page was generated from an IPython notebook that can be downloaded
`here <https://github.com/dfm/corner.py/blob/main/docs/{{ env.doc2path(env.docname, base=None) }}>`_.
"""
html_theme_options = {
"path_to_docs": "docs",
"repository_url": "https://github.com/dfm/corner.py",
"launch_buttons": {
"binderhub_url": "https://mybinder.org",
"colab_url": "https://colab.research.google.com/",
"notebook_interface": "jupyterlab",
},
"use_edit_page_button": True,
"use_issues_button": True,
"use_repository_button": True,
"use_download_button": True,
}
html_baseurl = "https://corner.readthedocs.io/en/latest/"

jupyter_execute_notebooks = "force"
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ If you make use of this code, please cite `the JOSS paper
Authors & License
-----------------

Copyright 2013-2020 Dan Foreman-Mackey
Copyright 2013-2021 Dan Foreman-Mackey

Built by `Dan Foreman-Mackey <https://github.com/dfm>`_ and contributors (see
`the contribution graph <https://github.com/dfm/corner.py/graphs/contributors>`_ for the most
Expand Down
10 changes: 5 additions & 5 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ with `pip <http://www.pip-installer.org/>`_:

.. code-block:: bash
pip install corner
python -m pip install corner
From source
Expand All @@ -38,18 +38,18 @@ directory and run:

.. code-block:: bash
python setup.py install
python -m pip install .
Tests
-----

If you installed from source, you can run the unit tests using `nose
<http://nose.readthedocs.org/>`_. From the root of the source directory, run:
If you installed from source, you can run the unit tests. From the root of the
source directory, run:

.. code-block:: bash
nosetests corner
python -m pip install pytest -v tests
This might take a few minutes but you shouldn't get any errors if all went
as planned.
7 changes: 0 additions & 7 deletions docs/pages/custom.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@
"corner.overplot_lines(figure, value2, color=\"C2\")\n",
"corner.overplot_points(figure, value2[None], marker=\"s\", color=\"C2\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
2 changes: 1 addition & 1 deletion readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2

python:
version: 3.9
version: 3.8
install:
- method: pip
path: .
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"isort",
"toml",
],
"docs": ["sphinx>=1.7.5", "pandoc", "nbsphinx"],
"docs": ["sphinx>=1.7.5", "pandoc", "myst-nb", "sphinx-book-theme"],
}
EXTRA_REQUIRE["dev"] = (
EXTRA_REQUIRE["test"]
Expand Down

0 comments on commit 2fc00b7

Please sign in to comment.