From 13fcd25a5f5ec87248b7ed82b61637da222d5512 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Mon, 19 Feb 2024 15:32:51 +0100 Subject: [PATCH] adapt doc to new format. --- docs/source/conf.py | 9 +++------ examples/example_lasso_forward_backward.py | 1 + pyproject.toml | 11 ++++++----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index cd39ee08..e9d88229 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,9 +21,6 @@ copyright = f"2020, {author}" gh_user = "sfarrens" -# If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = "3.3" - # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. @@ -38,7 +35,7 @@ "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", - "sphinxawesome_theme", + "sphinxawesome_theme.highlighting", "sphinxcontrib.bibtex", "myst_parser", "nbsphinx", @@ -103,7 +100,7 @@ } html_collapsible_definitions = True html_awesome_headerlinks = True -html_logo = "modopt_logo.jpg" +html_logo = "modopt_logo.png" html_permalinks_icon = ( '' @@ -148,7 +145,7 @@ # -- Options for Sphinx Gallery ---------------------------------------------- sphinx_gallery_conf = { - "examples_dirs": ["../../modopt/examples/"], + "examples_dirs": ["../../examples/"], "filename_pattern": "/example_", "ignore_pattern": r"/(__init__|conftest)\.py", } diff --git a/examples/example_lasso_forward_backward.py b/examples/example_lasso_forward_backward.py index 7e650e05..f3e5091d 100644 --- a/examples/example_lasso_forward_backward.py +++ b/examples/example_lasso_forward_backward.py @@ -132,6 +132,7 @@ # # sphinx_gallery_start_ignore assert mse(fb_pogm.x_final, BETA_TRUE) < 1 +# sphinx_gallery_end_ignore # %% # Comparing the Two algorithms diff --git a/pyproject.toml b/pyproject.toml index 6f9637d1..3b94735c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,11 +15,12 @@ dependencies = ["numpy", "scipy", "tqdm", "importlib_metadata"] [project.optional-dependencies] gpu=["torch", "ptwt"] -doc=["myst-parser==0.16.1", -"nbsphinx==0.8.7", -"nbsphinx-link==1.3.0", -"sphinx-gallery==0.11.1", -"sphinxawesome-theme==3.2.1", +doc=["myst-parser", +"nbsphinx", +"nbsphinx-link", +"sphinx-gallery", +"numpydoc", +"sphinxawesome-theme", "sphinxcontrib-bibtex"] dev=["black", "ruff"] test=["pytest<8.0.0", "pytest-cases", "pytest-cov", "pytest-xdist", "pytest-sugar"]