Commit bbd61829 authored by Sam Wu's avatar Sam Wu Committed by Lisa Delaney
Browse files

Standardize documentation (#59)

* Standardize documentation

Applies changes noted in https://github.com/RadeonOpenCompute/rocm-docs-core/issues/330

* Fix typo in conf.py

* Import re for conf.py

* Search EnvVars.hpp for version number instead of CMakeLists.txt

* Update Doxyfile output dir

* Change line endings to LF
parent 7e118b0e
...@@ -6,7 +6,13 @@ ...@@ -6,7 +6,13 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: "pip" # See documentation for possible values - package-ecosystem: "pip" # See documentation for possible values
directory: "/docs/.sphinx" # Location of package manifests directory: "/docs/sphinx" # Location of package manifests
open-pull-requests-limit: 10 open-pull-requests-limit: 10
schedule: schedule:
interval: "daily" interval: "daily"
labels:
- "documentation"
- "dependencies"
- "ci:docs-only"
reviewers:
- "samjwu"
...@@ -10,10 +10,10 @@ formats: [htmlzip, pdf, epub] ...@@ -10,10 +10,10 @@ formats: [htmlzip, pdf, epub]
python: python:
install: install:
- requirements: docs/.sphinx/requirements.txt - requirements: docs/sphinx/requirements.txt
build: build:
os: ubuntu-20.04 os: ubuntu-22.04
tools: tools:
python: "3.8" python: "3.8"
apt_packages: apt_packages:
......
_doxygen/
doxygen/html/
doxygen/xml/
...@@ -4,11 +4,31 @@ ...@@ -4,11 +4,31 @@
# list see the documentation: # list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html # https://www.sphinx-doc.org/en/master/usage/configuration.html
import re
from rocm_docs import ROCmDocs from rocm_docs import ROCmDocs
docs_core = ROCmDocs("TransferBench Documentation") with open('../src/include/EnvVars.hpp', encoding='utf-8') as f:
match = re.search(r'#define TB_VERSION "([0-9.]+)[^0-9.]+', f.read())
if not match:
raise ValueError("VERSION not found!")
version_number = match[1]
left_nav_title = f"TransferBench {version_number} Documentation"
# for PDF output on Read the Docs
project = "TransferBench Documentation"
author = "Advanced Micro Devices, Inc."
copyright = "Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved."
version = version_number
release = version_number
external_toc_path = "./sphinx/_toc.yml"
docs_core = ROCmDocs(left_nav_title)
docs_core.run_doxygen(doxygen_root="doxygen", doxygen_path="doxygen/xml")
docs_core.setup() docs_core.setup()
docs_core.run_doxygen()
external_projects_current_project = "transferbench"
for sphinx_var in ROCmDocs.SPHINX_VARS: for sphinx_var in ROCmDocs.SPHINX_VARS:
globals()[sphinx_var] = getattr(docs_core, sphinx_var) globals()[sphinx_var] = getattr(docs_core, sphinx_var)
...@@ -58,7 +58,7 @@ PROJECT_LOGO = ...@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If # entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used. # left blank the current directory will be used.
OUTPUT_DIRECTORY = docBin OUTPUT_DIRECTORY = .
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and # directories (in 2 levels) under the output directory of each output format and
......
# License
```{include} ../LICENSE.md
```
...@@ -11,3 +11,6 @@ subtrees: ...@@ -11,3 +11,6 @@ subtrees:
- file: instructions - file: instructions
- file: examples/index - file: examples/index
- file: api - file: api
- caption: About
entries:
- file: license
rocm-docs-core==0.26.0
...@@ -46,6 +46,10 @@ idna==3.4 ...@@ -46,6 +46,10 @@ idna==3.4
# via requests # via requests
imagesize==1.4.1 imagesize==1.4.1
# via sphinx # via sphinx
importlib-metadata==6.8.0
# via sphinx
importlib-resources==6.1.0
# via rocm-docs-core
jinja2==3.1.2 jinja2==3.1.2
# via # via
# myst-parser # myst-parser
...@@ -83,6 +87,8 @@ pyjwt[crypto]==2.6.0 ...@@ -83,6 +87,8 @@ pyjwt[crypto]==2.6.0
# via pygithub # via pygithub
pynacl==1.5.0 pynacl==1.5.0
# via pygithub # via pygithub
pytz==2023.3.post1
# via babel
pyyaml==6.0 pyyaml==6.0
# via # via
# myst-parser # myst-parser
...@@ -92,7 +98,7 @@ requests==2.28.2 ...@@ -92,7 +98,7 @@ requests==2.28.2
# via # via
# pygithub # pygithub
# sphinx # sphinx
rocm-docs-core>=0.20.0 rocm-docs-core==0.26.0
# via -r requirements.in # via -r requirements.in
smmap==5.0.0 smmap==5.0.0
# via gitdb # via gitdb
...@@ -139,3 +145,7 @@ urllib3==1.26.15 ...@@ -139,3 +145,7 @@ urllib3==1.26.15
# via requests # via requests
wrapt==1.15.0 wrapt==1.15.0
# via deprecated # via deprecated
zipp==3.17.0
# via
# importlib-metadata
# importlib-resources
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment