Skip to content

Commit b164cf9

Browse files
lbliiisarahyurick
andauthored
docs: refactor all the things (#826)
* docs: refactor all the things Signed-off-by: Lawrence Lane <llane@nvidia.com> * remove auto api docs Signed-off-by: Lawrence Lane <llane@nvidia.com> * api docs to gitignore Signed-off-by: Lawrence Lane <llane@nvidia.com> * updated readme Signed-off-by: Lawrence Lane <llane@nvidia.com> * python linting fixes batch 1 Signed-off-by: Lawrence Lane <llane@nvidia.com> * batch 2 Signed-off-by: Lawrence Lane <llane@nvidia.com> * batch 3 Signed-off-by: Lawrence Lane <llane@nvidia.com> * update Signed-off-by: Lawrence Lane <llane@nvidia.com> --------- Signed-off-by: Lawrence Lane <llane@nvidia.com> Co-authored-by: Sarah Yurick <53962159+sarahyurick@users.noreply.github.com>
1 parent 9041c21 commit b164cf9

File tree

222 files changed

+30650
-6121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

222 files changed

+30650
-6121
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ instance/
7272

7373
# Sphinx documentation
7474
docs/_build/
75+
docs/apidocs/
7576

7677
# PyBuilder
7778
.pybuilder/

Makefile

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Makefile targets for Sphinx documentation (all targets prefixed with 'docs-')
2+
3+
.PHONY: docs-html docs-clean docs-live docs-env docs-publish \
4+
docs-html-internal docs-html-ga docs-html-ea docs-html-draft \
5+
docs-live-internal docs-live-ga docs-live-ea docs-live-draft \
6+
docs-publish-internal docs-publish-ga docs-publish-ea docs-publish-draft
7+
8+
# Usage:
9+
# make docs-html DOCS_ENV=internal # Build docs for internal use
10+
# make docs-html DOCS_ENV=ga # Build docs for GA
11+
# make docs-html # Build docs with no special tag
12+
# make docs-live DOCS_ENV=draft # Live server with draft tag
13+
# make docs-publish DOCS_ENV=ga # Production build (fails on warnings)
14+
15+
DOCS_ENV ?=
16+
17+
# Detect OS for cross-platform compatibility
18+
ifeq ($(OS),Windows_NT)
19+
VENV_PYTHON = $(CURDIR)/.venv-docs/Scripts/python.exe
20+
VENV_ACTIVATE = .venv-docs\Scripts\activate
21+
VENV_ACTIVATE_PS = .venv-docs\Scripts\Activate.ps1
22+
RM_CMD = if exist docs\_build rmdir /s /q docs\_build
23+
else
24+
VENV_PYTHON = $(CURDIR)/.venv-docs/bin/python
25+
VENV_ACTIVATE = source .venv-docs/bin/activate
26+
RM_CMD = cd docs && rm -rf _build
27+
endif
28+
29+
# Pass DOCS_ENV to sphinx-build if set
30+
31+
# Makefile targets for Sphinx documentation (all targets prefixed with 'docs-')
32+
33+
.PHONY: docs-html docs-clean docs-live docs-env
34+
35+
36+
docs-html:
37+
@echo "Building HTML documentation..."
38+
cd docs && $(VENV_PYTHON) -m sphinx -b html $(if $(DOCS_ENV),-t $(DOCS_ENV)) . _build/html
39+
40+
docs-publish:
41+
@echo "Building HTML documentation for publication (fail on warnings)..."
42+
cd docs && $(VENV_PYTHON) -m sphinx --fail-on-warning --builder html $(if $(DOCS_ENV),-t $(DOCS_ENV)) . _build/html
43+
44+
docs-clean:
45+
@echo "Cleaning built documentation..."
46+
$(RM_CMD)
47+
48+
docs-live:
49+
@echo "Starting live-reload server (sphinx-autobuild)..."
50+
cd docs && $(VENV_PYTHON) -m sphinx_autobuild $(if $(DOCS_ENV),-t $(DOCS_ENV)) . _build/html
51+
52+
docs-env:
53+
@echo "Setting up docs virtual environment with uv..."
54+
uv venv .venv-docs
55+
uv pip install -r requirements-docs.txt --python .venv-docs
56+
@echo "\nTo activate the docs environment, run:"
57+
ifeq ($(OS),Windows_NT)
58+
@echo " For Command Prompt: $(VENV_ACTIVATE)"
59+
@echo " For PowerShell: $(VENV_ACTIVATE_PS)"
60+
else
61+
@echo " $(VENV_ACTIVATE)"
62+
endif
63+
64+
# HTML build shortcuts
65+
66+
docs-html-internal:
67+
$(MAKE) docs-html DOCS_ENV=internal
68+
69+
docs-html-ga:
70+
$(MAKE) docs-html DOCS_ENV=ga
71+
72+
docs-html-ea:
73+
$(MAKE) docs-html DOCS_ENV=ea
74+
75+
docs-html-draft:
76+
$(MAKE) docs-html DOCS_ENV=draft
77+
78+
# Publish build shortcuts
79+
80+
docs-publish-internal:
81+
$(MAKE) docs-publish DOCS_ENV=internal
82+
83+
docs-publish-ga:
84+
$(MAKE) docs-publish DOCS_ENV=ga
85+
86+
docs-publish-ea:
87+
$(MAKE) docs-publish DOCS_ENV=ea
88+
89+
docs-publish-draft:
90+
$(MAKE) docs-publish DOCS_ENV=draft
91+
92+
# Live server shortcuts
93+
94+
docs-live-internal:
95+
$(MAKE) docs-live DOCS_ENV=internal
96+
97+
docs-live-ga:
98+
$(MAKE) docs-live DOCS_ENV=ga
99+
100+
docs-live-ea:
101+
$(MAKE) docs-live DOCS_ENV=ea
102+
103+
docs-live-draft:
104+
$(MAKE) docs-live DOCS_ENV=draft

README.md

Lines changed: 58 additions & 187 deletions
Large diffs are not rendered by default.

docs/.DS_Store

8 KB
Binary file not shown.

0 commit comments

Comments
 (0)