Skip to content

Commit

Permalink
fix: documentation build and typehints
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpbeing committed Dec 25, 2023
1 parent 69f42bb commit 3059f13
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

.. _changelog:

.. include:: ../CHANGELOG.rst
.. include:: ../../CHANGELOG.rst
14 changes: 9 additions & 5 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# -- Project information -----------------------------------------------------

project = "ansys-simai-core"
author = "ANSYS Inc."
author = "ANSYS, Inc."
release = version = __version__
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
cname = os.getenv("DOCUMENTATION_CNAME", "simai.docs.pyansys.com")
Expand Down Expand Up @@ -73,8 +73,9 @@

# Autodoc settings
autodoc_typehints = "both"
autodoc_typehints_description_target = "documented"
autodoc_member_order = "groupwise"
autoclass_content = "class"
autoclass_content = "both"

# Napoleon settings
napoleon_google_docstring = True
Expand All @@ -96,13 +97,15 @@
(r"py:obj", "ansys.simai.core.data.base.DataModelType"),
(r"py:class", "_io.BytesIO"),
(r"py:class", "pydantic_core._pydantic_core.Url"),
# FIXME: This shouldn't be ignored but it's not clear why it's failing to find it in some cases
(r"py:class", "Directory"),
}

source_suffix = ".rst"
master_doc = "index"

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

html_theme = "ansys_sphinx_theme"
html_short_title = html_title = "simai"
html_logo = pyansys_logo_black
html_favicon = ansys_favicon
html_static_path = ["_static"]
Expand All @@ -122,8 +125,9 @@
],
"switcher": {
"json_url": f"https://{cname}/versions.json",
"version_match": get_version_match(version),
"version_match": get_version_match(__version__),
},
"check_switcher": False,
# TODO
# "use_meilisearch": {
# "api_key": os.getenv("MEILISEARCH_PUBLIC_API_KEY", ""),
Expand Down

0 comments on commit 3059f13

Please sign in to comment.