diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 09a5ddb..62858bd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -33,7 +33,7 @@ jobs: uses: FedericoCarboni/setup-ffmpeg@v3 - name: Install opencv - run: python -m pip install opencv-python-headless ipywidgets "numpy<2.0" "sphinx<8.0" + run: python -m pip install opencv-python-headless ipywidgets "numpy<2.0" - name: Checkout code uses: actions/checkout@v4 diff --git a/docs/_templates/custom-module-template.rst b/docs/_templates/custom-module-template.rst index ce05886..71670e5 100644 --- a/docs/_templates/custom-module-template.rst +++ b/docs/_templates/custom-module-template.rst @@ -1,7 +1,7 @@ {{ fullname | escape | underline}} -{% block modules %} -{% if modules %} +{%- block modules %} +{%- if modules %} .. rubric:: Modules .. autosummary:: @@ -9,16 +9,16 @@ :template: custom-module-template.rst :recursive: {% for item in modules %} - {{ item }} + {{ fullname }}.{{ item }} {%- endfor %} {% endif %} -{% endblock %} +{%- endblock %} .. automodule:: {{ fullname }} :members: {% block attributes %} - {% if attributes %} + {%- if attributes %} .. rubric:: {{ _('Module Attributes') }} .. autosummary:: @@ -26,10 +26,10 @@ {{ item }} {%- endfor %} {% endif %} - {% endblock %} + {%- endblock %} - {% block functions %} - {% if functions %} + {%- block functions %} + {%- if functions %} .. rubric:: {{ _('Functions') }} .. autosummary:: @@ -37,22 +37,21 @@ {{ item }} {%- endfor %} {% endif %} - {% endblock %} + {%- endblock %} - {% block classes %} - {% if classes %} + {%- block classes %} + {%- if classes %} .. rubric:: {{ _('Classes') }} .. autosummary:: - :template: custom-class-template.rst {% for item in classes %} {{ item }} {%- endfor %} {% endif %} - {% endblock %} + {%- endblock %} - {% block exceptions %} - {% if exceptions %} + {%- block exceptions %} + {%- if exceptions %} .. rubric:: {{ _('Exceptions') }} .. autosummary:: @@ -60,4 +59,4 @@ {{ item }} {%- endfor %} {% endif %} - {% endblock %} + {%- endblock %} diff --git a/docs/conf.py b/docs/conf.py index 07b4438..868a505 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -100,7 +100,7 @@ def remove_markdown(cell): nb_execution_mode = "cache" nb_execution_timeout = 600 # seconds nb_execution_excludepatterns = ['tutorials/converted/*'] -jupyter_cache = str(Path(__file__).parent / ".jupyter_cache") +nb_execution_cache_path = str(Path(__file__).parent / ".jupyter_cache") # add_module_names = False # napoleon_google_docstring = False diff --git a/setup.py b/setup.py index fc2e53f..6254379 100644 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ ], "test": ["pytest"], "docs": [ - "sphinx", + "sphinx>=7.4.6", "sphinxcontrib-napoleon", "sphinxcontrib-bibtex", "sphinxcontrib-video",