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:
cometido por
Maisam Arif
ascendente
8dbc1d7d57
cometimento
7104b6fe31
@@ -0,0 +1,2 @@
|
||||
```{include} ../amdsmi_cli/README.md
|
||||
```
|
||||
+9
-5
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
```{include} ../README.md
|
||||
```
|
||||
@@ -1,2 +0,0 @@
|
||||
.. include:: ../README.md
|
||||
:parser: myst_parser.sphinx_
|
||||
@@ -0,0 +1,2 @@
|
||||
```{include} ../py-interface/README.md
|
||||
```
|
||||
@@ -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 @@
|
||||
rocm-docs-core[api_reference]==0.10.3
|
||||
rocm-docs-core[api_reference]==0.13.3
|
||||
|
||||
@@ -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
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador