Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 24 additions & 19 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

# -- Project information -----------------------------------------------------

project = u"Viam Python SDK"
copyright = u"2022, Viam Inc"
author = u"Viam Inc"
project = "Viam Python SDK"
copyright = "2022-2023, Viam Inc"
author = "Viam Inc"

# -- General configuration ---------------------------------------------------

Expand All @@ -22,13 +22,14 @@
"sphinx.ext.viewcode",
]
autoapi_dirs = ["../src"]
autoapi_file_patterns = ['*.pyi', '*.py']
autoapi_file_patterns = ["*.pyi", "*.py"]
autoapi_options = [
'undoc-members',
'show-inhertiance',
'show-module-summary',
'special-members',
'imported-members',
"undoc-members",
"show-inheritance",
"inherited-members",
"show-module-summary",
"special-members",
"imported-members",
]

# List of patterns, relative to source directory, that match files and
Expand All @@ -38,24 +39,28 @@


def skip_member(app, what, name, obj, skip, options) -> bool:
if 'gen.proto' in name:
if "gen.proto" in name:
return True
if 'proto' in name:
if 'google' in name:
if "proto" in name:
if "google" in name:
return True
if what == 'attribute':
if '_FIELD_NUMBER' in name:
should_keep = ["from_robot", "do_command", "get_resource_name", "get_operation"]
if obj.inherited and not any(method in name for method in should_keep):
return True
if what == "attribute":
if "_FIELD_NUMBER" in name:
return True
if 'DESCRIPTOR' in name:
if "DESCRIPTOR" in name:
return True
if what == 'method':
if 'ClearField' in name:
if what == "method":
if "ClearField" in name:
return True
return skip


def setup(sphinx):
sphinx.connect('autoapi-skip-member', skip_member)
sphinx.connect("autoapi-skip-member", skip_member)


# -- Options for HTML output -------------------------------------------------

Expand All @@ -66,5 +71,5 @@ def setup(sphinx):
html_theme = "sphinx_rtd_theme"

html_theme_options = {
'navigation_depth': -1,
"navigation_depth": -1,
}