Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize documentation for ReadtheDocs #677

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
version: 2
updates:
- 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
schedule:
interval: "daily"
labels:
- "m-DOC"
- "dependencies"
reviewers:
- "samjwu"
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ formats: [htmlzip, pdf, epub]

python:
install:
- requirements: docs/.sphinx/requirements.txt
- requirements: docs/sphinx/requirements.txt

build:
os: ubuntu-22.04
Expand Down
1 change: 0 additions & 1 deletion docs/.sphinx/requirements.in

This file was deleted.

23 changes: 22 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,31 @@
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import re
import subprocess

from rocm_docs import ROCmDocs

docs_core = ROCmDocs("RVS Documentation")
with open('../CMakeLists.txt', encoding='utf-8') as f:
match = re.search(r'.*\bset \( RVS_VERSION\s+\"?([0-9.]+)[^0-9.]+', f.read())
if not match:
raise ValueError("VERSION not found!")
version_number = match[1]
left_nav_title = f"RVS {version_number} Documentation"

# for PDF output on Read the Docs
project = "RVS 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.setup()

external_projects_current_project = "rocmvalidationsuite"

for sphinx_var in ROCmDocs.SPHINX_VARS:
globals()[sphinx_var] = getattr(docs_core, sphinx_var)
4 changes: 4 additions & 0 deletions docs/license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License

```{include} ../LICENSE
```
3 changes: 3 additions & 0 deletions docs/.sphinx/_toc.yml.in → docs/sphinx/_toc.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ subtrees:
- file: prerequisites
- file: cli
- file: regression
- caption: About
entries:
- file: license
1 change: 1 addition & 0 deletions docs/sphinx/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rocm-docs-core==0.28.0
12 changes: 11 additions & 1 deletion docs/.sphinx/requirements.txt → docs/sphinx/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ idna==3.4
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==6.8.0
# via sphinx
importlib-resources==6.1.1
# via rocm-docs-core
jinja2==3.1.2
# via
# myst-parser
Expand Down Expand Up @@ -83,6 +87,8 @@ pyjwt[crypto]==2.6.0
# via pygithub
pynacl==1.5.0
# via pygithub
pytz==2023.3.post1
# via babel
pyyaml==6.0
# via
# myst-parser
Expand All @@ -92,7 +98,7 @@ requests==2.31.0
# via
# pygithub
# sphinx
rocm-docs-core>=0.20.0
rocm-docs-core==0.28.0
# via -r requirements.in
smmap==5.0.0
# via gitdb
Expand Down Expand Up @@ -139,3 +145,7 @@ urllib3==1.26.15
# via requests
wrapt==1.15.0
# via deprecated
zipp==3.17.0
# via
# importlib-metadata
# importlib-resources