diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 9cdf2d6..0e0a252 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,7 +6,13 @@ 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: + - "documentation" + - "dependencies" + - "ci:docs-only" + reviewers: + - "samjwu" diff --git a/.readthedocs.yaml b/.readthedocs.yaml index e2bf130..da1d3ae 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,10 +10,10 @@ formats: [htmlzip, pdf, epub] python: install: - - requirements: docs/.sphinx/requirements.txt + - requirements: docs/sphinx/requirements.txt build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: python: "3.8" apt_packages: diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..e4d71f6 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,3 @@ +_doxygen/ +doxygen/html/ +doxygen/xml/ diff --git a/docs/.sphinx/requirements.in b/docs/.sphinx/requirements.in deleted file mode 100644 index 781cd3a..0000000 --- a/docs/.sphinx/requirements.in +++ /dev/null @@ -1 +0,0 @@ -rocm-docs-core>=0.20.0 diff --git a/docs/conf.py b/docs/conf.py index 0eedf91..4df97f3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,11 +4,31 @@ # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +import re + 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.run_doxygen() + +external_projects_current_project = "transferbench" for sphinx_var in ROCmDocs.SPHINX_VARS: globals()[sphinx_var] = getattr(docs_core, sphinx_var) diff --git a/docs/.doxygen/Doxyfile b/docs/doxygen/Doxyfile similarity index 99% rename from docs/.doxygen/Doxyfile rename to docs/doxygen/Doxyfile index fbebc2a..52cf3cb 100644 --- a/docs/.doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -58,7 +58,7 @@ PROJECT_LOGO = # entered, it will be relative to the location where doxygen was started. If # 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- # directories (in 2 levels) under the output directory of each output format and diff --git a/docs/license.md b/docs/license.md new file mode 100644 index 0000000..b6e36d7 --- /dev/null +++ b/docs/license.md @@ -0,0 +1,4 @@ +# License + +```{include} ../LICENSE.md +``` diff --git a/docs/.sphinx/_toc.yml.in b/docs/sphinx/_toc.yml.in similarity index 82% rename from docs/.sphinx/_toc.yml.in rename to docs/sphinx/_toc.yml.in index 27694f3..c1c5387 100644 --- a/docs/.sphinx/_toc.yml.in +++ b/docs/sphinx/_toc.yml.in @@ -11,3 +11,6 @@ subtrees: - file: instructions - file: examples/index - file: api + - caption: About + entries: + - file: license diff --git a/docs/sphinx/requirements.in b/docs/sphinx/requirements.in new file mode 100644 index 0000000..9b027ad --- /dev/null +++ b/docs/sphinx/requirements.in @@ -0,0 +1 @@ +rocm-docs-core==0.26.0 diff --git a/docs/.sphinx/requirements.txt b/docs/sphinx/requirements.txt similarity index 92% rename from docs/.sphinx/requirements.txt rename to docs/sphinx/requirements.txt index b0b4766..52a687b 100644 --- a/docs/.sphinx/requirements.txt +++ b/docs/sphinx/requirements.txt @@ -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.0 + # via rocm-docs-core jinja2==3.1.2 # via # myst-parser @@ -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 @@ -92,7 +98,7 @@ requests==2.28.2 # via # pygithub # sphinx -rocm-docs-core>=0.20.0 +rocm-docs-core==0.26.0 # via -r requirements.in smmap==5.0.0 # via gitdb @@ -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