|
4 | 4 | # list see the documentation: |
5 | 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html |
6 | 6 |
|
| 7 | +import os |
| 8 | + |
7 | 9 | # -- Path setup -------------------------------------------------------------- |
8 | 10 |
|
9 | 11 | # If extensions (or modules to document with autodoc) are in another directory, |
10 | 12 | # add these directories to sys.path here. If the directory is relative to the |
11 | 13 | # documentation root, use os.path.abspath to make it absolute, like shown here. |
12 | 14 | # |
13 | | -# import os |
14 | 15 | # import sys |
15 | 16 | # sys.path.insert(0, os.path.abspath('.')) |
16 | 17 |
|
17 | | -import sphinx_rtd_theme |
18 | | - |
19 | 18 | # -- Project information ----------------------------------------------------- |
20 | 19 |
|
21 | 20 | project = "sklearn-ann" |
|
31 | 30 | extensions = [ |
32 | 31 | "sphinx.ext.autodoc", |
33 | 32 | "sphinx.ext.autosummary", |
34 | | - "numpydoc", |
| 33 | + "sphinx.ext.napoleon", |
| 34 | + "scanpydoc.definition_list_typed_field", |
| 35 | + "scanpydoc.rtd_github_links", |
35 | 36 | "sphinx_issues", |
36 | | - "sphinx.ext.viewcode", |
| 37 | + "sphinx.ext.linkcode", |
37 | 38 | ] |
38 | 39 |
|
39 | 40 | # Add any paths that contain templates here, relative to this directory. |
|
45 | 46 | exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
46 | 47 |
|
47 | 48 | autosummary_generate = True |
| 49 | +autodoc_default_options = { |
| 50 | + "undoc-members": True, |
| 51 | +} |
48 | 52 |
|
49 | 53 |
|
50 | 54 | # -- Options for HTML output ------------------------------------------------- |
51 | 55 |
|
52 | 56 | # The theme to use for HTML and HTML Help pages. See the documentation for |
53 | 57 | # a list of builtin themes. |
54 | 58 | # |
55 | | -html_theme = "sphinx_rtd_theme" |
56 | | - |
57 | | -# Add any paths that contain custom static files (such as style sheets) here, |
58 | | -# relative to this directory. They are copied after the builtin static files, |
59 | | -# so a file named "default.css" will overwrite the builtin "default.css". |
60 | | -# html_static_path = ["_static"] |
61 | | -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 59 | +html_theme = "sphinx_book_theme" |
| 60 | +html_theme_options = dict( |
| 61 | + repository_url="https://github.com/frankier/sklearn-ann", |
| 62 | + repository_branch=os.environ.get("READTHEDOCS_GIT_IDENTIFIER", "main"), |
| 63 | +) |
| 64 | +rtd_links_prefix = "src" |
62 | 65 |
|
63 | 66 | autodoc_mock_imports = ["annoy", "faiss", "pynndescent", "nmslib"] |
0 commit comments