diff --git a/docs/_templates/autosummary/base.rst b/docs/_templates/autosummary/base.rst deleted file mode 100644 index 01a0408..0000000 --- a/docs/_templates/autosummary/base.rst +++ /dev/null @@ -1,5 +0,0 @@ -{{ name | escape | underline}} - -.. currentmodule:: {{ module }} - -.. auto{{ objtype }}:: {{ fullname }} diff --git a/docs/_templates/autosummary/class.rst b/docs/_templates/autosummary/class.rst deleted file mode 100644 index 85d580f..0000000 --- a/docs/_templates/autosummary/class.rst +++ /dev/null @@ -1,19 +0,0 @@ -{{ objname | escape | underline}} - -.. currentmodule:: {{ module }} - -.. autoclass:: {{ objname }} - -{% block methods %} -{%- for item in (all_methods + attributes)|sort %} - {%- if not item.startswith('_') or item in ['__call__'] %} - {%- if item in all_methods %} -{{ (item + '()') | escape | underline(line='-') }} -.. automethod:: {{ name }}.{{ item }} - {%- elif item in attributes %} -{{ item | escape | underline(line='-') }} -.. autoattribute:: {{ name }}.{{ item }} - {%- endif %} - {% endif %} -{%- endfor %} -{% endblock %} diff --git a/docs/_templates/autosummary/function.rst b/docs/_templates/autosummary/function.rst deleted file mode 100644 index 528f222..0000000 --- a/docs/_templates/autosummary/function.rst +++ /dev/null @@ -1,5 +0,0 @@ -{{ (name + '()') | escape | underline}} - -.. currentmodule:: {{ module }} - -.. auto{{ objtype }}:: {{ fullname }} diff --git a/docs/conf.py b/docs/conf.py index ddb1909..8c11fbe 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,18 +29,16 @@ '.DS_Store', 'api-src', ] -templates_path = ['_templates'] pygments_style = None extensions = [ 'jupyter_sphinx', - 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', # support for Google-style docstrings - 'sphinx.ext.autosummary', 'sphinx_autodoc_typehints', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx', 'sphinx.ext.autosectionlabel', 'sphinx_copybutton', # for "copy to clipboard" buttons + 'sphinx_apipages', ] intersphinx_mapping = { 'audformat': ('https://audeering.github.io/audformat/', None), @@ -70,10 +68,6 @@ copybutton_prompt_text = r'>>> |\.\.\. |$ ' copybutton_prompt_is_regexp = True -# Disable auto-generation of TOC entries in the API -# https://github.com/sphinx-doc/sphinx/issues/6316 -toc_object_entries = False - # HTML -------------------------------------------------------------------- html_theme = 'sphinx_audeering_theme' html_theme_options = { @@ -85,13 +79,3 @@ 'display_github': True, } html_title = title - -# Copy API (sub-)module RST files to docs/api/ folder --------------------- -audeer.mkdir('api') -api_src_files = audeer.list_file_names('api-src') -api_dst_files = [ - audeer.path('api', os.path.basename(src_file)) - for src_file in api_src_files -] -for src_file, dst_file in zip(api_src_files, api_dst_files): - shutil.copyfile(src_file, dst_file) diff --git a/docs/requirements.txt b/docs/requirements.txt index 45da2c1..7c26937 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -6,6 +6,7 @@ jupyter-sphinx librosa pyarrow sphinx +sphinx-apipages >=0.1.2 sphinx-audeering-theme >=1.2.1 sphinx-autodoc-typehints sphinx-copybutton