Skip to content

Commit 2775c68

Browse files
committed
Add review page
Signed-off-by: Mike McKiernan <mmckiernan@nvidia.com>
1 parent 2ff1f6f commit 2775c68

File tree

5 files changed

+144
-2
lines changed

5 files changed

+144
-2
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test_coverage:
2121
test_profile:
2222
poetry run pytest -vv tests/ --profile-svg
2323

24-
docs: docs-guardrails docs-community docs-colang
24+
docs: docs-guardrails docs-community docs-colang docs-review
2525

2626
docs-guardrails:
2727
poetry run sphinx-build -b html docs _build/docs/guardrails
@@ -32,6 +32,9 @@ docs-community:
3232
docs-colang:
3333
poetry run sphinx-build -b html docs/colang _build/docs/colang
3434

35+
docs-review:
36+
poetry run sphinx-build -b html docs/review _build/docs
37+
3538
pre_commit:
3639
pre-commit install
3740
pre-commit run --all-files

docs/review/conf.py

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# Copyright (c) 2024, NVIDIA CORPORATION.
17+
18+
from datetime import date
19+
from pathlib import Path
20+
21+
from toml import load
22+
23+
project = "NeMo Guardrails Product Documentation"
24+
this_year = date.today().year
25+
copyright = f"2023-{this_year}, NVIDIA Corporation"
26+
author = "NVIDIA Corporation"
27+
release = "0.0.0"
28+
29+
with open(
30+
Path(__file__).parent.parent.parent / "pyproject.toml", encoding="utf-8"
31+
) as f:
32+
t = load(f)
33+
release = t.get("tool").get("poetry").get("version")
34+
35+
extensions = [
36+
"myst_parser",
37+
"sphinx.ext.intersphinx",
38+
"sphinx_copybutton",
39+
"sphinx_reredirects",
40+
"sphinx_design",
41+
]
42+
43+
copybutton_exclude = ".linenos, .gp, .go"
44+
45+
myst_linkify_fuzzy_links = False
46+
myst_heading_anchors = 3
47+
myst_enable_extensions = [
48+
"deflist",
49+
"dollarmath",
50+
"fieldlist",
51+
"substitution",
52+
"colon_fence",
53+
]
54+
55+
myst_substitutions = {
56+
"version": release,
57+
}
58+
59+
exclude_patterns = [
60+
"_build/**",
61+
]
62+
63+
# intersphinx_mapping = {
64+
# 'gpu-op': ('https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest', None),
65+
# }
66+
67+
# suppress_warnings = ["etoc.toctree", "myst.header", "misc.highlighting_failure"]
68+
69+
html_theme = "nvidia_sphinx_theme"
70+
html_copy_source = False
71+
html_show_sourcelink = False
72+
html_show_sphinx = False
73+
74+
html_domain_indices = False
75+
html_use_index = False
76+
html_extra_path = ["project.json", "versions1.json"]
77+
highlight_language = "console"
78+
79+
html_theme_options = {
80+
"icon_links": [],
81+
"switcher": {
82+
"json_url": "../versions1.json",
83+
"version_match": release,
84+
},
85+
"secondary_sidebar_items": [],
86+
"primary_sidebar_end": [],
87+
}
88+
html_sidebars = {"**": []}
89+
90+
html_baseurl = "https://docs.nvidia.com/nemo/guardrails/community/latest/"

docs/review/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# NVIDIA NeMo Guardrails Product Documentation
2+
3+
::::{grid} 1 1 2 3
4+
5+
:::{grid-item-card} {octicon}`shield-check;1.5em;sd-mr-1` NeMo Guardrails
6+
:link: ./guardrails/index.html
7+
8+
Add safety checks to LLM-based applications between the application code and the LLM.
9+
:::
10+
11+
:::{grid-item-card} {octicon}`plug;1.5em;sd-mr-1` Community Integrations
12+
:link: ./community/index.html
13+
14+
Use popular safety checks with your NeMo Guardrails implementation.
15+
:::
16+
17+
:::{grid-item-card} {octicon}`code;1.5em;sd-mr-1` Colang Developer Guide
18+
:link: ./colang/index.html
19+
20+
Develop custom safety checks for conversational systems.
21+
:::
22+
23+
::::

poetry.lock

Lines changed: 26 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ sphinx = "<=7.5"
171171
myst-parser = "<=5"
172172
sphinx-copybutton = "<=0.6"
173173
nvidia-sphinx-theme = { version = ">=0.0.8", python = ">=3.10" }
174+
sphinx-design = "^0.6.1"
174175

175176

176177
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)