Unverified Commit f60cd9d7 authored by Sam Wu's avatar Sam Wu Committed by GitHub
Browse files

Standardize documentation for ReadtheDocs (#1057)

Relates to https://github.com/RadeonOpenCompute/rocm-docs-core/issues/330
parent ff24b537
...@@ -10,3 +10,9 @@ updates: ...@@ -10,3 +10,9 @@ updates:
open-pull-requests-limit: 10 open-pull-requests-limit: 10
schedule: schedule:
interval: "daily" interval: "daily"
labels:
- "documentation"
- "dependencies"
- "ci:docs-only"
reviewers:
- "samjwu"
...@@ -54,5 +54,4 @@ _images/ ...@@ -54,5 +54,4 @@ _images/
_static/ _static/
_templates/ _templates/
_toc.yml _toc.yml
docBin/
_doxygen/ _doxygen/
...@@ -3,11 +3,6 @@ ...@@ -3,11 +3,6 @@
version: 2 version: 2
build:
os: ubuntu-22.04
tools:
python: "3.8"
sphinx: sphinx:
configuration: docs/conf.py configuration: docs/conf.py
...@@ -16,3 +11,8 @@ formats: [htmlzip, pdf, epub] ...@@ -16,3 +11,8 @@ formats: [htmlzip, pdf, epub]
python: python:
install: install:
- requirements: docs/sphinx/requirements.txt - requirements: docs/sphinx/requirements.txt
build:
os: ubuntu-22.04
tools:
python: "3.8"
...@@ -4,23 +4,34 @@ ...@@ -4,23 +4,34 @@
# 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 subprocess import re
from rocm_docs import ROCmDocs from rocm_docs import ROCmDocs
html_theme_options = {"flavor": "list"}
name = "Composable Kernel" with open('../CMakeLists.txt', encoding='utf-8') as f:
get_version = r'sed -n -e "s/^rocm_setup_version(.* \([0-9\.]\{1,\}\).*/\1/p" ../CMakeLists.txt' match = re.search(r'.*set\(version ([0-9.]+)[^0-9.]+', f.read())
version = subprocess.getoutput(get_version) if not match:
if len(version) > 0: raise ValueError("VERSION not found!")
name = f"{name} {version}" version_number = match[1]
left_nav_title = f"Composable Kernel {version_number} Documentation"
# for PDF output on Read the Docs
project = "Composable Kernel 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" external_toc_path = "./sphinx/_toc.yml"
docs_core = ROCmDocs(f"{name} Documentation") docs_core = ROCmDocs(left_nav_title)
docs_core.run_doxygen(doxygen_root="doxygen", doxygen_path="doxygen/docBin/xml") docs_core.run_doxygen(doxygen_root="doxygen", doxygen_path="doxygen/xml")
docs_core.setup() docs_core.setup()
external_projects_current_project = "composable_kernel"
mathjax3_config = { mathjax3_config = {
'tex': { 'tex': {
'macros': { 'macros': {
......
...@@ -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
......
...@@ -5,6 +5,6 @@ defaults: ...@@ -5,6 +5,6 @@ defaults:
maxdepth: 6 maxdepth: 6
root: index root: index
subtrees: subtrees:
- caption: About - caption: About
entries: entries:
- file: license - file: license
rocm-docs-core>=0.20.0 rocm-docs-core==0.29.0
sphinxcontrib-bibtex==2.6.1 sphinxcontrib-bibtex==2.6.1
...@@ -96,9 +96,7 @@ pygments==2.14.0 ...@@ -96,9 +96,7 @@ pygments==2.14.0
# pydata-sphinx-theme # pydata-sphinx-theme
# sphinx # sphinx
pyjwt[crypto]==2.6.0 pyjwt[crypto]==2.6.0
# via # via pygithub
# pygithub
# pyjwt
pynacl==1.5.0 pynacl==1.5.0
# via pygithub # via pygithub
pytz==2023.3.post1 pytz==2023.3.post1
...@@ -113,7 +111,7 @@ requests==2.28.2 ...@@ -113,7 +111,7 @@ requests==2.28.2
# via # via
# pygithub # pygithub
# sphinx # sphinx
rocm-docs-core==0.27.0 rocm-docs-core==0.29.0
# via -r requirements.in # via -r requirements.in
six==1.16.0 six==1.16.0
# via # via
......
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