Skip to content

Commit

Permalink
Generate API docs for kernel_api
Browse files Browse the repository at this point in the history
  • Loading branch information
Diptorup Deb committed Feb 14, 2024
1 parent f9467d3 commit 84bfa04
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
apidoc
sources/_build
source/autoapi
3 changes: 2 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = ./source
BUILDDIR = _build
AUTOAPIDIR = source/autoapi

# Put it first so that "make" without argument is like "make help".
help:
Expand All @@ -20,4 +21,4 @@ help:
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

clean:
rm -rf "$(BUILDDIR)"
rm -rf "$(BUILDDIR)" "$(AUTOAPIDIR)"
4 changes: 3 additions & 1 deletion docs/_templates/autoapi/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ API Reference
This page contains auto-generated API reference documentation [#f1]_.

.. toctree::
:titlesonly:
:maxdepth: 2

numba_dpex/kernel_api/index

{% for page in pages %}
{% if page.top_level_object and page.display %}
Expand Down
8 changes: 0 additions & 8 deletions docs/source/api_reference/index.rst

This file was deleted.

15 changes: 14 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,20 @@
add_module_names = False

# -- Auto API configurations ---------------------------------------------------
autoapi_dirs = ["../numba_dpex/kernel_api"]


# def skip_util_classes(app, what, name, obj, skip, options):
# if what == "module" and "experimental" in name:
# if what == "module" and "decorators" not in name:
# skip = True
# return skip


# def setup(sphinx):
# sphinx.connect("autoapi-skip-member", skip_util_classes)


autoapi_dirs = ["../../numba_dpex/kernel_api"]
autoapi_type = "python"

autoapi_template_dir = "_templates/autoapi"
Expand Down

0 comments on commit 84bfa04

Please sign in to comment.