Update documentation and add python API documentation
Change-Id: Ibccf5b6a5fba81cea42e04a022deac8a3207b9b8
This commit is contained in:
@@ -5,9 +5,18 @@
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
import re
|
||||
import pathlib
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
from rocm_docs import ROCmDocs
|
||||
|
||||
# We need to add the location of the rocrand Python module to the PATH
|
||||
# in order to build the documentation of that module
|
||||
docs_dir_path = pathlib.Path(__file__).parent
|
||||
python_dir_path = docs_dir_path.parent / 'python_smi_tools'
|
||||
sys.path.append(str(python_dir_path))
|
||||
|
||||
with open('../CMakeLists.txt', encoding='utf-8') as f:
|
||||
match = re.search(r'get_package_version_number\(\"?([0-9.]+)[^0-9.]+', f.read())
|
||||
if not match:
|
||||
@@ -15,6 +24,8 @@ with open('../CMakeLists.txt', encoding='utf-8') as f:
|
||||
version_number = match[1]
|
||||
left_nav_title = f"ROCm SMI LIB {version_number} Documentation"
|
||||
|
||||
shutil.copy2('../CHANGELOG.md','./CHANGELOG.md')
|
||||
|
||||
# for PDF output on Read the Docs
|
||||
project = "ROCm SMI LIB Documentation"
|
||||
author = "Advanced Micro Devices, Inc."
|
||||
@@ -31,5 +42,9 @@ docs_core.setup()
|
||||
|
||||
external_projects_current_project = "rocm_smi_lib"
|
||||
|
||||
suppress_warnings = ["etoc.toctree"]
|
||||
|
||||
for sphinx_var in ROCmDocs.SPHINX_VARS:
|
||||
globals()[sphinx_var] = getattr(docs_core, sphinx_var)
|
||||
|
||||
extensions += ['sphinx.ext.mathjax']
|
||||
Reference in New Issue
Block a user