From 432eca8a80fec54abf51644ce5ba042058140aeb Mon Sep 17 00:00:00 2001 From: Kai Striega Date: Sat, 11 Nov 2023 12:16:25 +0800 Subject: [PATCH 1/3] Initial change to pydata_sphinx_theme This applies the pydata_sphinx_theme theme to NumPy Financial. The theme builds and the documentation is rendered _almost_ correctly, except that LaTeX is rendered to the far right of the page. --- doc/source/conf.py | 4 ++-- pyproject.toml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index abc1a48..e074d26 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -20,7 +20,7 @@ # -- Project information ----------------------------------------------------- project = 'numpy-financial' -copyright = '2019, numpy-financial developers' +copyright = '2023, numpy-financial developers' author = 'numpy-financial developers' @@ -50,7 +50,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'bizstyle' +html_theme = 'pydata_sphinx_theme' html_copy_source = False # Add any paths that contain custom static files (such as style sheets) here, diff --git a/pyproject.toml b/pyproject.toml index c7bd3ad..6e17759 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ pytest = "^7.4" [tool.poetry.group.docs.dependencies] sphinx = "^7.0" numpydoc = "^1.5" +pydata-sphinx-theme = "^0.14.3" [tool.poetry.group.lint.dependencies] From 7c807f716fba3f6c997b9ff50bafaa6ab8a72045 Mon Sep 17 00:00:00 2001 From: Kai Striega Date: Fri, 17 Nov 2023 07:34:10 +0800 Subject: [PATCH 2/3] MAINT: Ignore poetry.lock file As this is a library it doesn't need to have pinned dependencies. --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 1ccdafb..e03204a 100644 --- a/.gitignore +++ b/.gitignore @@ -105,5 +105,9 @@ Thumbs.db ########################## /.pytest_cache +# Poetry lock file # +#################### +poetry.lock + # Things specific to this project # ################################### From e018682929c5fbb3c6b5b98a3086dad24db4c38c Mon Sep 17 00:00:00 2001 From: Kai Striega Date: Sun, 19 Nov 2023 08:41:52 +0800 Subject: [PATCH 3/3] DOC: Use mathjax instead of imgmath imgmath renders LaTeX to the far right of the page. This is not what we want. Instead we tried mathjax that renders to the correct location. --- doc/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index e074d26..da27bcf 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -32,7 +32,7 @@ extensions = [ 'sphinx.ext.autodoc', 'numpydoc', - 'sphinx.ext.imgmath', + 'sphinx.ext.mathjax', ] # Add any paths that contain templates here, relative to this directory.