From 3e6e05e99609c2b8f3396bac2a8d9997710f237a Mon Sep 17 00:00:00 2001 From: 12rambau Date: Sat, 7 Jan 2023 18:57:39 +0100 Subject: [PATCH 1/9] docs: change the theme --- .vscode/settings.json | 3 +++ docs/conf.py | 49 ++++++++++++++++++++++++++++++------------- docs/index.rst | 22 ------------------- docs/requirements.txt | 2 +- 4 files changed, 39 insertions(+), 37 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..a7d0fc7b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "esbonio.sphinx.confDir": "" +} \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 6d0f8eb0..5991139e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,7 +4,7 @@ # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html -# -- Path setup -------------------------------------------------------------- +# -- Path setup ---------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -15,7 +15,7 @@ # sys.path.insert(0, os.path.abspath('.')) -# -- Project information ----------------------------------------------------- +# -- Project information ------------------------------------------------------- project = 'ipyvuetify' copyright = '2020, Mario Buikhuizen' @@ -25,14 +25,13 @@ release = '1.2.2' -# -- General configuration --------------------------------------------------- +# -- General configuration ----------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'jupyter_sphinx.execute', - 'sphinx_rtd_theme' + 'jupyter_sphinx', ] # Add any paths that contain templates here, relative to this directory. @@ -44,21 +43,43 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] -# -- Options for HTML output ------------------------------------------------- +# -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -#html_theme = 'alabaster' -html_theme = 'sphinx_rtd_theme' +html_theme = 'pydata_sphinx_theme' +#html_theme = "alabaster" # 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'] - -master_doc = 'index' - -html_css_files = [ - 'custom.css', -] +html_css_files = ['custom.css'] + +# -- Theme configuration ------------------------------------------------------- + +html_theme_options = { + "use_edit_page_button": True, + "show_prev_next": True, + "navbar_start": ["navbar-logo"], + "secondary_sidebar_items": ["page-toc.html", "searchbox.html", "edit-this-page.html", "sourcelink.html"], + "icon_links": [ + { + "name": "GitHub", + "url": "https://github.com/widgetti/ipyvuetify", + "icon": "fa-brands fa-github", + }, + { + "name": "Pypi", + "url": "https://pypi.org/project/ipyvuetify/", + "icon": "fa-brands fa-python", + }, + ], +} +html_context = { + "github_user": "widgetti", + "github_repo": "ipyvuetify", + "github_version": "master", + "doc_path": "docs", +} diff --git a/docs/index.rst b/docs/index.rst index 4909eb7f..113fb406 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,31 +2,9 @@ ipyvuetify: Jupyter widgets based on Vuetify UI components ========================================================== .. toctree:: - :caption: Introduction - :maxdepth: 2 introduction - -.. toctree:: - :caption: Installation - :maxdepth: 2 - installation - -.. toctree:: - :caption: Usage - :maxdepth: 2 - usage - -.. toctree:: - :caption: Advanced usage - :maxdepth: 2 - advanced_usage - -.. toctree:: - :caption: Template usage - :maxdepth: 2 - template_usage diff --git a/docs/requirements.txt b/docs/requirements.txt index 253d5677..6e134055 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ ipyvuetify>=1.2.2<2 jupyter-sphinx==0.2.4a1 -sphinx_rtd_theme +pydata-sphinx-theme From 778613ec3afceb5765d451005797aa01c924825e Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Tue, 22 Aug 2023 21:51:29 +0200 Subject: [PATCH 2/9] fix: use same version number in docs --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 355e94a3..1672d3fa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = "Mario Buikhuizen" # The full version, including alpha/beta/rc tags -release = "1.2.2" +release = "1.8.10" # -- General configuration ----------------------------------------------------- From 2eec590f2faef08603b3aefe4b333057ac61b7ae Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Tue, 22 Aug 2023 22:08:58 +0200 Subject: [PATCH 3/9] fix: only use required requirements --- docs/conf.py | 40 +++++----------------------------------- docs/requirements.txt | 4 ---- noxfile.py | 1 - pyproject.toml | 2 +- 4 files changed, 6 insertions(+), 41 deletions(-) delete mode 100644 docs/requirements.txt diff --git a/docs/conf.py b/docs/conf.py index 1672d3fa..946262e5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,56 +1,26 @@ -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup ---------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# 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 -# sys.path.insert(0, os.path.abspath('.')) +"""Configuration file for the Sphinx documentation builder. +This file only contains a selection of the most common options. For a full +list see the documentation: +https://www.sphinx-doc.org/en/master/usage/configuration.html +""" # -- Project information ------------------------------------------------------- project = "ipyvuetify" copyright = "2020, Mario Buikhuizen" author = "Mario Buikhuizen" - -# The full version, including alpha/beta/rc tags release = "1.8.10" - # -- General configuration ----------------------------------------------------- -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. extensions = ["jupyter_sphinx"] - -# Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] - # -- Options for HTML output --------------------------------------------------- -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# html_theme = "pydata_sphinx_theme" - -# 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_css_files = ["custom.css"] diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index d01d2981..00000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -ipyvuetify>=1.2.2<2 -jupyter-sphinx==0.2.4a1 -pydata-sphinx-theme -ipykernel diff --git a/noxfile.py b/noxfile.py index bad5b5a4..9ebf1493 100644 --- a/noxfile.py +++ b/noxfile.py @@ -17,6 +17,5 @@ def lint(session): @nox.session(reuse_venv=True) def docs(session): """Build the documentation.""" - session.install("jupyter-packaging", "jupyterlab") session.install(".[doc]") session.run("sphinx-build", "-v", "-b", "html", "docs", "docs/_build/html") diff --git a/pyproject.toml b/pyproject.toml index 6ced8785..6a308ef9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,7 @@ content-type = "text/markdown" [project.optional-dependencies] dev = ["nox", "pre-commit", "mypy"] test = ["pytest", "pytest-playwright", "jupyterlab<4", "solara[pytest]"] -doc = ["sphinx<7", "jupyter-sphinx", "ipykernel"] +doc = ["sphinx<7", "jupyter-sphinx", "ipykernel", "pydata-sphinx-theme"] [tool.setuptools] include-package-data = true From 5f4a6fbe03cb4f92de1c6b35e9c9e81702a6861e Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Tue, 22 Aug 2023 22:24:19 +0200 Subject: [PATCH 4/9] refactor: remove .vscode --- .vscode/settings.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index a7d0fc7b..00000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "esbonio.sphinx.confDir": "" -} \ No newline at end of file From c6f15c84035bf5dad2eeab0c02ccefb1cdb38d4d Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Thu, 24 Aug 2023 23:20:22 +0200 Subject: [PATCH 5/9] fix: rollback the requirements.txt file --- docs/requirements.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 docs/requirements.txt diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..7ddf733e --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,4 @@ +ipyvuetify>=1.2.2<2 +jupyter-sphinx==0.2.4a1 +sphinx_rtd_theme +ipykernel \ No newline at end of file From 07149b8e8b2dd7db74188edb52d454460da37342 Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Thu, 24 Aug 2023 23:21:31 +0200 Subject: [PATCH 6/9] refacctor: rollback the conf.py to previous state --- docs/conf.py | 63 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 946262e5..8b4663bb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,30 +1,67 @@ -"""Configuration file for the Sphinx documentation builder. +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html -This file only contains a selection of the most common options. For a full -list see the documentation: -https://www.sphinx-doc.org/en/master/usage/configuration.html -""" +# -- Path setup -------------------------------------------------------------- -# -- Project information ------------------------------------------------------- +# If extensions (or modules to document with autodoc) are in another directory, +# 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 +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- project = "ipyvuetify" copyright = "2020, Mario Buikhuizen" author = "Mario Buikhuizen" -release = "1.8.10" -# -- General configuration ----------------------------------------------------- +# The full version, including alpha/beta/rc tags +release = "1.2.2" + -extensions = ["jupyter_sphinx"] +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ["jupyter_sphinx", "sphinx_rtd_theme"] + +# Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] -# -- Options for HTML output --------------------------------------------------- -html_theme = "pydata_sphinx_theme" +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +# html_theme = 'alabaster' +html_theme = "sphinx_rtd_theme" + +# 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_css_files = ["custom.css"] -# -- Theme configuration ------------------------------------------------------- +master_doc = "index" + +html_css_files = [ + "custom.css", +] + + +# -- Theme configuration ----------------------------------------------------- html_theme_options = { "use_edit_page_button": True, From 0b1ed98e06847520eba79157d20e8c5bd35f474e Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Thu, 24 Aug 2023 23:25:25 +0200 Subject: [PATCH 7/9] fix: rollback the requirements.txt file --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 7ddf733e..75af79df 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,4 +1,4 @@ ipyvuetify>=1.2.2<2 jupyter-sphinx==0.2.4a1 sphinx_rtd_theme -ipykernel \ No newline at end of file +ipykernel From 92f3576f1050d40784bfa5b7f0b5ed075643be74 Mon Sep 17 00:00:00 2001 From: Pierrick Rambaud Date: Thu, 24 Aug 2023 23:27:23 +0200 Subject: [PATCH 8/9] fix: rollback noxfile.py --- noxfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/noxfile.py b/noxfile.py index 9ebf1493..bad5b5a4 100644 --- a/noxfile.py +++ b/noxfile.py @@ -17,5 +17,6 @@ def lint(session): @nox.session(reuse_venv=True) def docs(session): """Build the documentation.""" + session.install("jupyter-packaging", "jupyterlab") session.install(".[doc]") session.run("sphinx-build", "-v", "-b", "html", "docs", "docs/_build/html") From 7c7bdf42f1591bf9b55ddfcb4ea2620abddc097f Mon Sep 17 00:00:00 2001 From: Rambaud Pierrick <12rambau@users.noreply.github.com> Date: Fri, 25 Aug 2023 12:25:50 +0200 Subject: [PATCH 9/9] fix: use the correct theme --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 1ca63fb6..893c20d2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ # -- Options for HTML output ------------------------------------------------- -html_theme = "sphinx_rtd_theme" +html_theme = "pydata_sphinx_theme" html_static_path = ["_static"] html_css_files = ["custom.css"]