Skip to content

Commit

Permalink
DOC: use sphinx-apipages extension (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw authored Jan 10, 2024
1 parent 121f374 commit 73b1efc
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 50 deletions.
5 changes: 0 additions & 5 deletions docs/_templates/autosummary/base.rst

This file was deleted.

19 changes: 0 additions & 19 deletions docs/_templates/autosummary/class.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/_templates/autosummary/function.rst

This file was deleted.

22 changes: 1 addition & 21 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from datetime import date
import os
import shutil

import toml

Expand Down Expand Up @@ -30,17 +28,15 @@
'Thumbs.db',
'.DS_Store',
]
templates_path = ['_templates']
pygments_style = None
extensions = [
'jupyter_sphinx',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.autosummary',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'sphinx_autodoc_typehints',
'sphinx_copybutton',
'sphinx_apipages',
]

napoleon_use_ivar = True # List of class attributes
Expand All @@ -59,10 +55,6 @@
'pandas',
]

# 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'
Expand All @@ -75,15 +67,3 @@
'display_github': True,
}
html_title = title


# Copy API (sub-)module RST files to docs/api/ folder ---------------------
audeer.rmdir('api')
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)
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ipykernel
jupyter-sphinx
sphinx
sphinx-apipages
sphinx-audeering-theme >=1.2.1
sphinx-autodoc-typehints
sphinx-copybutton
Expand Down

0 comments on commit 73b1efc

Please sign in to comment.