remove duplicated changelog

black format docs/conf.py
add seealso to python api reference

Change-Id: I60fa754f0af662669282dc90eea4b7dc5c5030cc
Signed-off-by: Peter Park <peter.park@amd.com>


[ROCm/amdsmi commit: cbfe403b1d]
This commit is contained in:
Peter Park
2024-11-12 09:43:55 -05:00
committed by Maisam Arif
parent f01eea6077
commit 49592ef24f
3 changed files with 20 additions and 1740 deletions
+9 -9
View File
@@ -5,18 +5,18 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import re
import shutil
# get version number to print in docs
def get_version_info(filepath):
with open(filepath, 'r') as f:
with open(filepath, "r") as f:
content = f.read()
version_pattern = (
r'^#define\s+AMDSMI_LIB_VERSION_YEAR\s+(\d+)\s*$|'
r'^#define\s+AMDSMI_LIB_VERSION_MAJOR\s+(\d+)\s*$|'
r'^#define\s+AMDSMI_LIB_VERSION_MINOR\s+(\d+)\s*$|'
r'^#define\s+AMDSMI_LIB_VERSION_RELEASE\s+(\d+)\s*$'
r"^#define\s+AMDSMI_LIB_VERSION_YEAR\s+(\d+)\s*$|"
r"^#define\s+AMDSMI_LIB_VERSION_MAJOR\s+(\d+)\s*$|"
r"^#define\s+AMDSMI_LIB_VERSION_MINOR\s+(\d+)\s*$|"
r"^#define\s+AMDSMI_LIB_VERSION_RELEASE\s+(\d+)\s*$"
)
matches = re.findall(version_pattern, content, re.MULTILINE)
@@ -29,10 +29,10 @@ def get_version_info(filepath):
else:
raise ValueError("Couldn't find all VERSION numbers.")
# copy changelog to docs/
shutil.copy2("../CHANGELOG.md", "./reference/changelog.md")
version_year, version_major, version_minor, version_release = get_version_info('../include/amd_smi/amdsmi.h')
version_year, version_major, version_minor, version_release = get_version_info(
"../include/amd_smi/amdsmi.h"
)
version_number = f"{version_year}.{version_major}.{version_minor}.{version_release}"
# project info