Skip to content

Commit 539109a

Browse files
authored
Merge branch 'NVIDIA:develop' into feat/guardrails-ai-integration
2 parents 707c92e + 8575b88 commit 539109a

File tree

562 files changed

+56372
-4609
lines changed

Some content is hidden

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

562 files changed

+56372
-4609
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Bug Report
22
description: File a bug/issue
33
title: "bug: "
4-
labels: [bug]
4+
labels: ["bug", "status: needs triage"]
55
body:
66
- type: markdown
77
attributes:
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: "Documentation Issue"
2+
labels: ["documentation", "status: needs triage"]
3+
title: "doc: "
4+
description: "Did you find any errors, omissions, or unclear sections in the documentation?"
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thank you for taking the time to file a complete bug report.
11+
12+
Before submitting your issue, please review the [relevant section](https://github.com/NVIDIA/NeMo-Guardrails/tree/develop/CONTRIBUTING.md#suggesting-enhancements-and-new-features) of our documentation.
13+
14+
- type: checkboxes
15+
attributes:
16+
label: Please also confirm the following
17+
options:
18+
- label: I have searched the [main issue tracker](https://github.com/NVIDIA/NeMo-Guardrails/issues) of NeMo Guardrails repository and believe that this is not a duplicate
19+
required: true
20+
- type: dropdown
21+
attributes:
22+
label: Issue Kind
23+
description: |
24+
What best describes the issue?
25+
options:
26+
- "Improving documentation"
27+
- "Error in existing documentation"
28+
- "Missing documentation"
29+
- "Unclear documentation"
30+
- "Other concerns with documentation"
31+
validations:
32+
required: true
33+
34+
- type: input
35+
attributes:
36+
label: Existing Link
37+
description: |
38+
If the documentation in question exists, please provide a link to it.
39+
placeholder: "https://github.com/NVIDIA/NeMo-Guardrails/blob/develop/docs/"
40+
validations:
41+
required: true
42+
43+
- type: textarea
44+
attributes:
45+
label: Description
46+
description: |
47+
Please provide a detailed description of the feature, including any relevant information. You can use markdown syntax.
48+
validations:
49+
required: true

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Feature Request
22
description: Suggest a new feature
33
title: "feature: "
4-
labels: [enhancement]
4+
labels: ["enhancement", "status: needs triage"]
55
body:
66
- type: checkboxes
77
attributes:

.github/codecov.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
informational: true
6+
patch:
7+
default:
8+
informational: true
9+
10+
comment:
11+
layout: " diff, flags, files"
12+
behavior: default
13+
require_changes: false # if true: only post the comment if coverage changes
14+
require_base: false # [true :: must have a base report to post]
15+
require_head: true # [true :: must have a head report to post]
16+
hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]

.github/scripts/build.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
# Exit immediately if a command exits with a non-zero status.
4+
set -e
5+
6+
# Define variables for paths
7+
PACKAGE_DIR="nemoguardrails"
8+
CHAT_UI_SRC="chat-ui"
9+
EXAMPLES_SRC="examples"
10+
CHAT_UI_DST="$PACKAGE_DIR/chat-ui"
11+
EXAMPLES_DST="$PACKAGE_DIR/examples"
12+
13+
# Copy the directories into the package directory
14+
cp -r "$CHAT_UI_SRC" "$CHAT_UI_DST"
15+
cp -r "$EXAMPLES_SRC" "$EXAMPLES_DST"
16+
17+
# Build the wheel using Poetry
18+
poetry build
19+
20+
# Remove the copied directories after building
21+
rm -rf "$CHAT_UI_DST"
22+
rm -rf "$EXAMPLES_DST"

.github/workflows/_test.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Reusable Tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
description: "Operating system name"
8+
required: true
9+
default: Ubuntu
10+
type: string
11+
image:
12+
description: "Runner image"
13+
required: true
14+
default: ubuntu-latest
15+
type: string
16+
python-version:
17+
description: "Python version to test against"
18+
required: true
19+
default: "3.10"
20+
type: string
21+
upgrade-deps:
22+
description: "Whether to install all extras"
23+
required: false
24+
default: false
25+
type: boolean
26+
27+
defaults:
28+
run:
29+
shell: bash
30+
env:
31+
POETRY_VERSION: 1.8.2
32+
33+
jobs:
34+
tests:
35+
name: ${{ inputs.os }} / Python ${{ inputs.python-version }}
36+
runs-on: ${{ inputs.image }}
37+
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- name: Set up Python ${{ inputs.python-version }}
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ inputs.python-version }}
45+
46+
- name: Get full Python version
47+
id: full-python-version
48+
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT
49+
50+
- name: Get runner architecture
51+
id: runner-arch
52+
run: echo "arch=$(uname -m)" >> $GITHUB_OUTPUT
53+
54+
- name: Bootstrap poetry (Linux and macOS)
55+
run: |
56+
curl -sSL https://install.python-poetry.org | POETRY_VERSION=${{ env.POETRY_VERSION }} python -
57+
58+
- name: Update PATH (Linux and macOS)
59+
if: runner.os != 'Windows'
60+
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
61+
62+
- name: Update PATH for Windows
63+
if: runner.os == 'Windows'
64+
run: echo "$APPDATA\\Python\\Scripts" >> $GITHUB_PATH
65+
66+
- name: Configure poetry
67+
run: poetry config virtualenvs.in-project true
68+
69+
- name: Set up cache
70+
uses: actions/cache@v4
71+
id: cache
72+
with:
73+
path: .venv
74+
key: venv-${{ runner.os }}-${{ steps.runner-arch.outputs.arch }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
75+
76+
- name: Ensure cache is healthy
77+
if: steps.cache.outputs.cache-hit == 'true'
78+
run: timeout 10s poetry run pip --version || rm -rf .venv
79+
80+
- name: Check Poetry .lock
81+
run: poetry check --lock
82+
83+
- name: Install dependencies
84+
run: |
85+
if [ "${{ inputs.upgrade-deps}}" = "true" ]; then
86+
poetry update
87+
poetry install --all-extras --with dev
88+
else
89+
poetry install --with dev
90+
fi
91+
92+
- name: Run pre-commit hooks
93+
run: poetry run make pre_commit
94+
95+
- name: Run pytest
96+
run: poetry run pytest -v

.github/workflows/build-wheel.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)