forked from NVIDIA/NeMo-Guardrails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from NVIDIA/develop
Syncing Fork
- Loading branch information
Showing
287 changed files
with
15,034 additions
and
2,378 deletions.
There are no files selected for viewing
This file contains 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 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,49 @@ | ||
name: "Documentation Issue" | ||
labels: ["documentation", "status: needs triage"] | ||
title: "doc: " | ||
description: "Did you find any errors, omissions, or unclear sections in the documentation?" | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Thank you for taking the time to file a complete bug report. | ||
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. | ||
- type: checkboxes | ||
attributes: | ||
label: Please also confirm the following | ||
options: | ||
- 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 | ||
required: true | ||
- type: dropdown | ||
attributes: | ||
label: Issue Kind | ||
description: | | ||
What best describes the issue? | ||
options: | ||
- "Improving documentation" | ||
- "Error in existing documentation" | ||
- "Missing documentation" | ||
- "Unclear documentation" | ||
- "Other concerns with documentation" | ||
validations: | ||
required: true | ||
|
||
- type: input | ||
attributes: | ||
label: Existing Link | ||
description: | | ||
If the documentation in question exists, please provide a link to it. | ||
placeholder: "https://github.com/NVIDIA/NeMo-Guardrails/blob/develop/docs/" | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
attributes: | ||
label: Description | ||
description: | | ||
Please provide a detailed description of the feature, including any relevant information. You can use markdown syntax. | ||
validations: | ||
required: true |
This file contains 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 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,22 @@ | ||
#!/bin/bash | ||
|
||
# Exit immediately if a command exits with a non-zero status. | ||
set -e | ||
|
||
# Define variables for paths | ||
PACKAGE_DIR="nemoguardrails" | ||
CHAT_UI_SRC="chat-ui" | ||
EXAMPLES_SRC="examples" | ||
CHAT_UI_DST="$PACKAGE_DIR/chat-ui" | ||
EXAMPLES_DST="$PACKAGE_DIR/examples" | ||
|
||
# Copy the directories into the package directory | ||
cp -r "$CHAT_UI_SRC" "$CHAT_UI_DST" | ||
cp -r "$EXAMPLES_SRC" "$EXAMPLES_DST" | ||
|
||
# Build the wheel using Poetry | ||
poetry build | ||
|
||
# Remove the copied directories after building | ||
rm -rf "$CHAT_UI_DST" | ||
rm -rf "$EXAMPLES_DST" |
This file contains 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,81 @@ | ||
name: Reusable Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
description: "Operating system name" | ||
required: true | ||
default: Ubuntu | ||
type: string | ||
image: | ||
description: "Runner image" | ||
required: true | ||
default: ubuntu-latest | ||
type: string | ||
python-version: | ||
description: "Python version to test against" | ||
required: true | ||
default: "3.10" | ||
type: string | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
POETRY_VERSION: 1.8.2 | ||
|
||
jobs: | ||
tests: | ||
name: ${{ inputs.os }} / Python ${{ inputs.python-version }} | ||
runs-on: ${{ inputs.image }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ inputs.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Get full Python version | ||
id: full-python-version | ||
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT | ||
|
||
- name: Bootstrap poetry (Linux and macOS) | ||
run: | | ||
curl -sSL https://install.python-poetry.org | POETRY_VERSION=${{ env.POETRY_VERSION }} python - | ||
- name: Update PATH (Linux and macOS) | ||
if: runner.os != 'Windows' | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
||
- name: Update PATH for Windows | ||
if: runner.os == 'Windows' | ||
run: echo "$APPDATA\\Python\\Scripts" >> $GITHUB_PATH | ||
|
||
- name: Configure poetry | ||
run: poetry config virtualenvs.in-project true | ||
|
||
- name: Set up cache | ||
uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Ensure cache is healthy | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
run: timeout 10s poetry run pip --version || rm -rf .venv | ||
|
||
- name: Check Poetry .lock | ||
run: poetry check --lock | ||
|
||
- name: Install dependencies | ||
run: poetry install --with dev | ||
|
||
- name: Run pre-commit hooks | ||
run: poetry run make pre_commit | ||
|
||
- name: Run pytest | ||
run: poetry run pytest -v |
This file was deleted.
Oops, something went wrong.
This file contains 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,32 @@ | ||
name: Full Tests | ||
|
||
on: | ||
pull_request: | ||
types: [review_requested, ready_for_review] | ||
paths-ignore: | ||
- "**/*.md" | ||
push: | ||
tags: | ||
- "v*" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
call-tests: | ||
strategy: | ||
matrix: | ||
os: [Windows, macOS] # exclude Ubuntu as it is available in pr-tests | ||
python-version: ["3.9", "3.10", "3.11"] | ||
include: | ||
- os: Ubuntu | ||
image: ubuntu-latest | ||
- os: Windows | ||
image: windows-2022 | ||
- os: macOS | ||
image: macos-14 | ||
fail-fast: false | ||
|
||
uses: ./.github/workflows/_test.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
image: ${{ matrix.image }} | ||
python-version: ${{ matrix.python-version }} |
This file contains 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,42 @@ | ||
name: "Lock Closed Threads" | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # 12:00 midnight UTC, daily | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
|
||
jobs: | ||
lock-issues: | ||
if: github.repository_owner == 'NVIDIA' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- uses: dessant/lock-threads@v5 | ||
with: | ||
process-only: issues | ||
issue-inactive-days: 30 | ||
issue-comment: > | ||
This issue has been automatically locked since there | ||
has not been any recent activity after it was closed. | ||
Please open a new issue for related bugs and reference this issue there. | ||
lock-prs: | ||
if: github.repository_owner == 'NVIDIA' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: dessant/lock-threads@v5 | ||
with: | ||
process-only: prs | ||
pr-inactive-days: 30 | ||
pr-comment: > | ||
This pull request has been automatically locked since there | ||
has not been any recent activity after it was closed. | ||
Please open a new issue and reference this PR there. |
This file contains 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,23 @@ | ||
name: PR Tests | ||
|
||
# we don't ignore markdkowns to run pre-commits | ||
on: | ||
push: | ||
paths-ignore: | ||
- ".github/workflows/**" | ||
|
||
jobs: | ||
call-tests: | ||
strategy: | ||
matrix: | ||
os: [Ubuntu] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
include: | ||
- os: Ubuntu | ||
image: ubuntu-latest | ||
fail-fast: false | ||
uses: ./.github/workflows/_test.yml | ||
with: | ||
os: ${{ matrix.os }} | ||
image: ${{ matrix.image }} | ||
python-version: ${{ matrix.python-version }} |
Oops, something went wrong.