2
0

Sphinx Documentation Setup

Added README links to Python library and CLI tool
Get correct version number from header file
Updated base README with sphinx documentation steps

Change-Id: I60eb3d37d77dab4ff7c8334f94b9c1804edb524b
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Este cometimento está contido em:
Sam Wu
2023-06-01 17:14:35 -06:00
cometido por Maisam Arif
ascendente 8dbc1d7d57
cometimento 7104b6fe31
12 ficheiros modificados com 523 adições e 203 eliminações
+2
Ver ficheiro
@@ -0,0 +1,2 @@
```{include} ../amdsmi_cli/README.md
```
+9 -5
Ver ficheiro
@@ -9,11 +9,15 @@ import subprocess
from rocm_docs import ROCmDocs
name = "AMD SMI"
get_version = r'sed -n -e "s/^get_package_version_number(.*\"\([0-9\.]\{1,\}\).*/\1/p" ../CMakeLists.txt'
version = subprocess.getoutput(get_version)
if len(version) > 0:
name = f"{name} {version}"
get_version_year = r'sed -n -e "s/^#define\ AMDSMI_LIB_VERSION_YEAR\ //p" ../include/amd_smi/amdsmi.h'
get_version_major = r'sed -n -e "s/^#define\ AMDSMI_LIB_VERSION_MAJOR\ //p" ../include/amd_smi/amdsmi.h'
get_version_minor = r'sed -n -e "s/^#define\ AMDSMI_LIB_VERSION_MINOR\ //p" ../include/amd_smi/amdsmi.h'
get_version_release = r'sed -n -e "s/^#define\ AMDSMI_LIB_VERSION_RELEASE\ //p" ../include/amd_smi/amdsmi.h'
version_year = subprocess.getoutput(get_version_year)
version_major = subprocess.getoutput(get_version_major)
version_minor = subprocess.getoutput(get_version_minor)
version_release = subprocess.getoutput(get_version_release)
name = f"AMD SMI {version_year}.{version_major}.{version_minor}.{version_release}"
external_toc_path = "./sphinx/_toc.yml"
+1 -1
Ver ficheiro
@@ -44,7 +44,7 @@ PROJECT_NUMBER =
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "ROCm SMI Reference Manual"
PROJECT_BRIEF = "AMD SMI Reference Manual"
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
+2
Ver ficheiro
@@ -0,0 +1,2 @@
```{include} ../README.md
```
-2
Ver ficheiro
@@ -1,2 +0,0 @@
.. include:: ../README.md
:parser: myst_parser.sphinx_
+2
Ver ficheiro
@@ -0,0 +1,2 @@
```{include} ../py-interface/README.md
```
+9 -3
Ver ficheiro
@@ -5,10 +5,16 @@ defaults:
maxdepth: 6
root: index
subtrees:
- caption: API
- caption: AMD SMI APIs
entries:
- file: doxygen/docBin/html/index
title: API
- file: doxygen/docBin/html/index
title: C
- file: py-interface_readme_link
title: Python
- caption: CLI Tools
entries:
- file: amdsmi_cli_readme_link
title: Python CLI Tool
- caption: About
entries:
- file: license
+1 -1
Ver ficheiro
@@ -1 +1 @@
rocm-docs-core[api_reference]==0.10.3
rocm-docs-core[api_reference]==0.13.3
+6 -3
Ver ficheiro
@@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile sphinx/requirements.in
# pip-compile requirements.in
#
accessible-pygments==0.0.4
# via pydata-sphinx-theme
@@ -43,6 +43,8 @@ docutils==0.19
# sphinx
doxysphinx==3.3.3
# via rocm-docs-core
fastjsonschema==2.17.1
# via rocm-docs-core
gitdb==4.0.10
# via gitpython
gitpython==3.1.31
@@ -110,13 +112,14 @@ pytz==2023.3
pyyaml==6.0
# via
# myst-parser
# rocm-docs-core
# sphinx-external-toc
requests==2.30.0
# via
# pygithub
# sphinx
rocm-docs-core[api_reference]==0.10.3
# via -r sphinx/requirements.in
rocm-docs-core[api_reference]==0.13.3
# via -r requirements.in
smmap==5.0.0
# via gitdb
snowballstemmer==2.2.0