|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# For the full list of built-in configuration values, see the documentation: |
| 4 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 5 | + |
| 6 | +# -- Project information ----------------------------------------------------- |
| 7 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
| 8 | + |
| 9 | +project = 'ObjectBox Python API' |
| 10 | +copyright = '2024, ObjectBox Ltd.' |
| 11 | +author = 'ObjectBox Ltd.' |
| 12 | +release = '4.0.0' |
| 13 | + |
| 14 | +# -- General configuration --------------------------------------------------- |
| 15 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
| 16 | + |
| 17 | +extensions = [ |
| 18 | + 'sphinx.ext.autodoc', |
| 19 | + 'autoapi.extension', |
| 20 | +] |
| 21 | +# 'sphinx.ext.inheritance_diagram', |
| 22 | +# 'sphinx.ext.autodoc', |
| 23 | + |
| 24 | +# -- autoapi configuration --------------------------------------------------- |
| 25 | +# https://sphinx-autoapi.readthedocs.io/en/latest/reference/config.html |
| 26 | + |
| 27 | +autoapi_dirs = ['../objectbox'] |
| 28 | +# autoapi_template_dir = '' |
| 29 | +# autoapi_file_patterns = ['*.py', '*.pyi'] |
| 30 | +# autoapi_generate_api_docs = True |
| 31 | +autoapi_options = [ |
| 32 | + 'members', |
| 33 | + 'inherited-members', |
| 34 | + 'undoc-members', |
| 35 | + # 'private-members', |
| 36 | + # 'special-members', |
| 37 | + # 'show-inheritance', |
| 38 | + # 'show-inheritance-diagram', |
| 39 | + 'show-module-summary', |
| 40 | + 'imported-members', |
| 41 | +] |
| 42 | +# autoapi_ignore = ['*migrations'] |
| 43 | +# autoapi_root = 'autoapi' |
| 44 | +autoapi_add_toctree_entry = False # default: True |
| 45 | +autoapi_python_class_content = "both" # default: "class" |
| 46 | +# autoapi_member_order = 'bysource' |
| 47 | +# autoapi_python_use_implicit_namespaces = False |
| 48 | +# autoapi_own_page_level = 'module' |
| 49 | + |
| 50 | +# Advanced: |
| 51 | +# autoapi_keep_files = False |
| 52 | + |
| 53 | +# Experimental: |
| 54 | +autodoc_typehints = 'description' |
| 55 | + |
| 56 | +only_top_level : bool = True |
| 57 | + |
| 58 | +if only_top_level: |
| 59 | + def skip_submodules(app, what, name, obj, skip, options): |
| 60 | + if what == "module": |
| 61 | + skip = True |
| 62 | + elif what == "package" and name != "objectbox": |
| 63 | + skip = True |
| 64 | + return skip |
| 65 | + |
| 66 | + |
| 67 | + def setup(sphinx): |
| 68 | + sphinx.connect("autoapi-skip-member", skip_submodules) |
| 69 | + |
| 70 | +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '.venv'] |
| 71 | + |
| 72 | +# -- Options for HTML output ------------------------------------------------- |
| 73 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
| 74 | + |
| 75 | +html_theme = 'sphinx_rtd_theme' |
| 76 | + |
| 77 | +html_static_path = ['_static'] |
| 78 | +html_logo = '_static/logo-white-500px.png' |
0 commit comments