Skip to content

Commit 4b92934

Browse files
committed
WIP: Separate documents
Signed-off-by: Mike McKiernan <[email protected]>
1 parent f86d047 commit 4b92934

File tree

101 files changed

+225
-595
lines changed

Some content is hidden

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

101 files changed

+225
-595
lines changed

Makefile

+10-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,16 @@ test_coverage:
2121
test_profile:
2222
poetry run pytest -vv tests/ --profile-svg
2323

24-
docs:
25-
poetry run sphinx-build -b html docs _build/docs
24+
docs: docs-guardrails docs-community docs-colang
25+
26+
docs-guardrails:
27+
poetry run sphinx-build -b html docs _build/docs/guardrails
28+
29+
docs-community:
30+
poetry run sphinx-build -b html docs/community _build/docs/community
31+
32+
docs-colang:
33+
poetry run sphinx-build -b html docs/colang _build/docs/colang
2634

2735
pre_commit:
2836
pre-commit install
File renamed without changes.
File renamed without changes.

docs/colang/conf.py

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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 and Colang"
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+
]
41+
42+
copybutton_exclude = ".linenos, .gp, .go"
43+
44+
myst_linkify_fuzzy_links = False
45+
myst_heading_anchors = 3
46+
myst_enable_extensions = [
47+
"deflist",
48+
"dollarmath",
49+
"fieldlist",
50+
"substitution",
51+
]
52+
53+
myst_substitutions = {
54+
"version": release,
55+
}
56+
57+
exclude_patterns = [
58+
"_build/**",
59+
]
60+
61+
# intersphinx_mapping = {
62+
# 'gpu-op': ('https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest', None),
63+
# }
64+
65+
# suppress_warnings = ["etoc.toctree", "myst.header", "misc.highlighting_failure"]
66+
67+
html_theme = "nvidia_sphinx_theme"
68+
html_copy_source = False
69+
html_show_sourcelink = False
70+
html_show_sphinx = False
71+
72+
html_domain_indices = False
73+
html_use_index = False
74+
html_extra_path = ["project.json", "versions1.json"]
75+
highlight_language = "console"
76+
77+
html_theme_options = {
78+
"icon_links": [],
79+
"switcher": {
80+
"json_url": "../versions1.json",
81+
"version_match": release,
82+
},
83+
}
84+
85+
html_baseurl = "https://docs.nvidia.com/nemo/guardrails/community/latest/"

docs/community/conf.py

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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 = "Community Integrations with NeMo Guardrails"
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+
]
41+
42+
copybutton_exclude = ".linenos, .gp, .go"
43+
44+
myst_linkify_fuzzy_links = False
45+
myst_heading_anchors = 3
46+
myst_enable_extensions = [
47+
"deflist",
48+
"dollarmath",
49+
"fieldlist",
50+
"substitution",
51+
]
52+
53+
myst_substitutions = {
54+
"version": release,
55+
}
56+
57+
exclude_patterns = [
58+
"_build/**",
59+
]
60+
61+
# intersphinx_mapping = {
62+
# 'gpu-op': ('https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest', None),
63+
# }
64+
65+
# suppress_warnings = ["etoc.toctree", "myst.header", "misc.highlighting_failure"]
66+
67+
html_theme = "nvidia_sphinx_theme"
68+
html_copy_source = False
69+
html_show_sourcelink = False
70+
html_show_sphinx = False
71+
72+
html_domain_indices = False
73+
html_use_index = False
74+
html_extra_path = ["project.json", "versions1.json"]
75+
highlight_language = "console"
76+
77+
html_theme_options = {
78+
"icon_links": [],
79+
"switcher": {
80+
"json_url": "../versions1.json",
81+
"version_match": release,
82+
},
83+
}
84+
85+
html_baseurl = "https://docs.nvidia.com/nemo/guardrails/community/latest/"

docs/community/index.md

+8

docs/community/project.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "name": "nemo-guardrails-community-integrations", "version": "0.13.0" }

docs/conf.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444

4545
exclude_patterns = [
4646
"README.md",
47+
"community",
48+
"colang",
4749
]
4850

4951
myst_linkify_fuzzy_links = False
@@ -59,10 +61,6 @@
5961
"version": release,
6062
}
6163

62-
exclude_patterns = [
63-
"_build/**",
64-
]
65-
6664
# intersphinx_mapping = {
6765
# 'gpu-op': ('https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest', None),
6866
# }

docs/getting-started/1-hello-world/config/config.yml

-4
This file was deleted.

docs/getting-started/1-hello-world/config/rails.co

-16
This file was deleted.

docs/getting-started/2-core-colang-concepts/config/config.yml

-4
This file was deleted.

docs/getting-started/2-core-colang-concepts/config/rails.co

-16
This file was deleted.

docs/getting-started/4-input-rails/config/config.yml

-29
This file was deleted.

docs/getting-started/4-input-rails/config/prompts.yml

-21
This file was deleted.

docs/getting-started/5-output-rails/config/actions.py

-32
This file was deleted.

0 commit comments

Comments
 (0)