docs: Update Doxygen, Sphinx, and readthedocs configs (#719)

* conf: update RTD config to ub24.04 (doxygen 1.9.8) and py3.12
* update generate-docs workflow
* Update "modules" to "topics" due to Doxygen 1.9.8
* bump rocm-docs-core to 1.25.0 and pip-compile requirements.txt
* doxygen: fill in version string in Doxyfile from conf.py
* remove unneeded rocm-smi-lib tutorials
* remove wikipedia references in doxyfile to satisfy ci check

Signed-off-by: Park, Peter <Peter.Park@amd.com>
This commit is contained in:
Park, Peter
2025-09-26 18:30:48 -04:00
committed by GitHub
parent e61eac1368
commit 311eade5b1
14 changed files with 305 additions and 507 deletions
+25 -2
View File
@@ -8,7 +8,8 @@ import re
import sys
from pathlib import Path
sys.path.append(str(Path('_extension').resolve()))
sys.path.append(str(Path("_extension").resolve()))
# get version number to print in docs
def get_version_info(filepath):
@@ -47,7 +48,6 @@ release = version_number
html_theme = "rocm_docs_theme"
html_theme_options = {"flavor": "rocm"}
html_title = f"AMD SMI {version_number} documentation"
exclude_patterns = ["rocm-smi-lib"]
suppress_warnings = ["etoc.toctree"]
external_toc_path = "./sphinx/_toc.yml"
@@ -60,3 +60,26 @@ doxygen_project = {
"name": "AMD SMI C++ API reference",
"path": "doxygen/docBin/xml",
}
def generate_doxyfile(app, _):
doxyfile_in = Path(app.confdir) / doxygen_root / "Doxyfile.in"
doxyfile_out = Path(app.confdir) / doxygen_root / "Doxyfile"
if not doxyfile_in.exists():
from sphinx.errors import ConfigError
raise ConfigError(f"Missing Doxyfile.in at {doxyfile_in}")
with open(doxyfile_in) as f:
content = f.read()
content = content.replace("@PROJECT_NUMBER@", version_number)
with open(doxyfile_out, "w") as f:
f.write(content)
def setup(app):
app.connect("config-inited", generate_doxyfile, priority=100)
return {"parallel_read_safe": True, "parallel_write_safe": True}