-
Notifications
You must be signed in to change notification settings - Fork 7
Add Sphinx support to documentation #224
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
Draft
derobins
wants to merge
21
commits into
develop
Choose a base branch
from
derobins/sphinx_docs
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+197
−16
Draft
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
92a6e82
Move .rst files to docs/sphinx
derobins eb4b9fc
Add .readthedocs.yaml
derobins 42dae52
Move Doxyfile.in to docs/doxygen/
derobins 3436ac4
Move API Sphinx docs to docs/api
derobins b99f1fd
Move misc Sphinx docs to docs/
derobins f22c3f1
Add toc and requirements
derobins 1ad6042
Add conf.py
derobins 4c8b45a
Fixes that make Sphinx "work"
derobins ce13873
Add stats_collection to Sphinx
derobins 4d0fa1a
Fix index.rst rocSHMEM comment
derobins bb6f6b4
Fix missing space in index.rst
derobins ad76aff
Add a comment block to _toc.yml.in
derobins a7029f6
Fix correctness and formatting in .readthedocs.yaml
derobins 683372d
Suppress pylint complaints on conf.py
derobins dbb58b8
Add rocm_docs to pip list
derobins 3a4e70b
Fix rocm_docs package typo
derobins fc9c853
First cut at moving sphinx generation to CMake
derobins 371ac3a
Fixed a lot of CMake issues
derobins 722d08a
Fix cmakelint issues
derobins e662d83
Fix pylint issues
derobins e358e95
Fix quotes on conf.py
derobins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Read the Docs configuration file | ||
| # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
|
||
| version: 2 | ||
|
|
||
| sphinx: | ||
| configuration: docs/conf.py | ||
|
|
||
| formats: [] | ||
|
|
||
| python: | ||
| install: | ||
| - requirements: docs/sphinx/requirements.txt | ||
|
|
||
| build: | ||
| os: ubuntu-22.04 | ||
| tools: | ||
| python: "3.10" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| hipify | ||
| ====== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| .. meta:: | ||
| :description: hipFile does hipFile stuff | ||
| :keywords: hipFile, ROCm, storage, library, API, DMA | ||
|
|
||
| ********************* | ||
| hipFile documentation | ||
| ********************* | ||
|
|
||
| hipFile introduction goes here. For more information, see :doc:`introduction`. | ||
|
|
||
| The hipFile public repository is located at `<https://github.com/ROCm/hipFile>`_. | ||
|
|
||
| .. grid:: 2 | ||
| :gutter: 3 | ||
|
|
||
| .. grid-item-card:: Build and install | ||
|
|
||
| * :doc:`Configure and build <./config_build>` | ||
| * :doc:`Sanitizers <./sanitizers>` | ||
|
|
||
| .. grid-item-card:: Using hipFile | ||
|
|
||
| * :doc:`hipify <./hipify>` | ||
| * :doc:`NVIDIA compatibility <./nvidia_compat>` | ||
| * :doc:`fio <./fio>` | ||
| * :doc:`Collecting statistics <./stats_collection>` | ||
|
|
||
| .. grid-item-card:: API reference | ||
|
|
||
| * :doc:`Errors <./api/errors>` | ||
| * :doc:`Core API <./api/core>` | ||
| * :doc:`Drivers <./api/driver>` | ||
| * :doc:`File operations <./api/file>` | ||
| * :doc:`Asynchronous operations <./api/async>` | ||
| * :doc:`Batch operations <./api/batch>` | ||
| * :doc:`RDMA <./api/rdma>` | ||
| * :doc:`Other <./api/misc_api>` | ||
|
|
||
| To contribute to the documentation, refer to | ||
| `Contributing to ROCm <https://rocm.docs.amd.com/en/latest/contribute/contributing.html>`_. | ||
|
|
||
| You can find licensing information on the | ||
| `Licensing <https://rocm.docs.amd.com/en/latest/about/license.html>`_ page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| defaults: | ||
| numbered: False | ||
| root: index | ||
| subtrees: | ||
|
|
||
| - entries: | ||
| - file: introduction.rst | ||
| title: Introduction | ||
|
|
||
| - caption: Build and install | ||
| entries: | ||
| - file: config_build.rst | ||
| title: Configure and build | ||
| - file: sanitizers.rst | ||
| title: Sanitizers | ||
|
|
||
| - caption: Using hipFile | ||
| entries: | ||
| - file: hipify.rst | ||
| title: hipify | ||
| - file: nvidia_compat.rst | ||
| title: cuFile compatibility | ||
| - file: fio.rst | ||
| title: fio support | ||
| - file: stats_collection.rst | ||
| title: Collecting statistics | ||
|
|
||
| - caption: API reference | ||
| entries: | ||
| - file: api/errors.rst | ||
| title: Errors | ||
| - file: api/core.rst | ||
| title: Core | ||
| - file: api/driver.rst | ||
| title: Drivers | ||
| - file: api/file.rst | ||
| title: File operations | ||
| - file: api/async.rst | ||
| title: Asynchronous operations | ||
| - file: api/batch.rst | ||
| title: Batch operations | ||
| - file: api/rdma.rst | ||
| title: RDMA | ||
| - file: api/misc_api.rst | ||
| title: Other | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Configuration file for the Sphinx documentation builder. | ||
| # | ||
| # This file only contains a selection of the most common options. For a full | ||
| # list see the documentation: | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
|
||
| # Pylint is NOT happy with the naming scheme ROCm chose | ||
| # pylint: disable=invalid-name | ||
|
|
||
| """This file is for configuring hipFile documentation""" | ||
|
|
||
| import os | ||
| from rocm_docs import ROCmDocs | ||
|
|
||
| version_number = "0.2.0" | ||
| left_nav_title = f"hipFile {version_number} documentation" | ||
|
|
||
| # for PDF output on Read the Docs | ||
| project = "rocSHMEM" | ||
| author = "Advanced Micro Devices, Inc." | ||
| # pylint: disable=redefined-builtin | ||
| copyright = "Copyright (c) Advanced Micro Devices, Inc. All rights reserved." | ||
| # pylint: enable=redefined-builtin | ||
| version = version_number | ||
| release = version_number | ||
| external_projects_current_project = "rocshmem" | ||
| extensions = ["sphinx_design"] | ||
| external_toc_path = "./sphinx/_toc.yml" | ||
derobins marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| docs_core = ROCmDocs(left_nav_title) | ||
|
|
||
| doxygen_root = os.environ.get("DOXYGEN_ROOT") | ||
| doxygen_xml_dir = os.environ.get("DOXYGEN_XML_DIR") | ||
|
|
||
| if not doxygen_root or not doxygen_xml_dir: | ||
| raise RuntimeError( | ||
| "DOXYGEN_ROOT and DOXYGEN_XML_DIR must be set. " | ||
| "Build this documentation via CMake, not directly with sphinx-build." | ||
| ) | ||
|
|
||
| docs_core.run_doxygen(doxygen_root=doxygen_root, doxygen_path=doxygen_xml_dir) | ||
|
|
||
| docs_core.setup() | ||
|
|
||
| # Transfer all Sphinx config variables into this module's global scope | ||
| for sphinx_var in ROCmDocs.SPHINX_VARS: | ||
| globals()[sphinx_var] = getattr(docs_core, sphinx_var) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.