Skip to content

Commit 6a1c9b5

Browse files
authored
DOC: implement initial documentation layout (#8)
1 parent f6693e3 commit 6a1c9b5

File tree

9 files changed

+52
-6
lines changed

9 files changed

+52
-6
lines changed

doc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXOPTS = -j auto
5+
SPHINXOPTS = -j auto -W --color
66
SPHINXBUILD = sphinx-build
77
SOURCEDIR = source
88
BUILDDIR = _build
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
API reference
2+
=============
3+
4+
This page contains the ``ansys-geometry-core`` API reference.
5+
6+
.. toctree::
7+
:titlesonly:
8+
9+
{% for page in pages %}
10+
{% if page.top_level_object and page.display %}
11+
{{ page.include_path }}
12+
{% endif %}
13+
{% endfor %}

doc/source/conf.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
# Sphinx extensions
2828
extensions = [
29+
"autoapi.extension",
2930
"sphinx.ext.autodoc",
3031
"sphinx.ext.autosummary",
3132
"numpydoc",
@@ -55,7 +56,7 @@
5556
numpydoc_validation_checks = {
5657
"GL06", # Found unknown section
5758
"GL07", # Sections are in the wrong order.
58-
"GL08", # The object does not have a docstring
59+
# "GL08", # The object does not have a docstring
5960
"GL09", # Deprecation warning should precede extended summary
6061
"GL10", # reST directives {directives} must be followed by two colons
6162
"SS01", # No summary found
@@ -79,3 +80,16 @@
7980

8081
# The master toctree document.
8182
master_doc = "index"
83+
84+
# Configuration for Sphinx autoapi
85+
autoapi_type = "python"
86+
autoapi_dirs = ["../../src/"]
87+
autoapi_options = [
88+
"members",
89+
"undoc-members",
90+
"show-inheritance",
91+
"show-module-summary",
92+
"special-members",
93+
]
94+
autoapi_template_dir = "_autoapi_templates"
95+
exclude_patterns = ["_autoapi_templates/index.rst"]

doc/source/contributing.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Contributing
2+
############

doc/source/examples/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Examples
2+
########

doc/source/getting_started.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Getting started
2+
###############

doc/source/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,13 @@
44
here.
55
66
.. include:: ../../README.rst
7+
8+
.. toctree::
9+
:hidden:
10+
:maxdepth: 3
11+
12+
getting_started
13+
user_guide
14+
examples/index
15+
autoapi/index
16+
contributing

doc/source/user_guide.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
User guide
2+
##########

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ python = ">=3.7,<4.0"
3030
importlib-metadata = {version = "^4.0", python = "<3.8"}
3131

3232
# Optional dependencies
33-
Sphinx = {version = "==5.1.1", optional = true}
34-
numpydoc = {version = "==1.4.0", optional = true}
3533
ansys-sphinx-theme = {version = "==0.5.2", optional = true}
36-
sphinx-copybutton = {version = "==0.5", optional = true}
34+
numpydoc = {version = "==1.4.0", optional = true}
3735
pytest = {version = "==7.1.2", optional = true}
3836
pytest-cov = {version = "==3.0.0", optional = true}
37+
Sphinx = {version = "==5.1.1", optional = true}
38+
sphinx-autoapi = {version = "==1.9.0", optional = true}
39+
sphinx-copybutton = {version = "==0.5", optional = true}
3940

4041
[tool.poetry.extras]
4142
test = ["pytest","pytest-cov"]
42-
docs = ["Sphinx", "sphinx-copybutton", "numpydoc", "ansys-sphinx-theme"]
43+
docs = ["ansys-sphinx-theme", "numpydoc", "Sphinx", "sphinx-autoapi", "sphinx-copybutton"]
4344

4445
[tool.black]
4546
line-length = 100

0 commit comments

Comments
 (0)