Skip to content

Commit c568b80

Browse files
authored
Merge branch 'NVIDIA:develop' into develop
2 parents 60c885e + 960e0b8 commit c568b80

File tree

141 files changed

+19696
-1177
lines changed

Some content is hidden

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

141 files changed

+19696
-1177
lines changed

.github/workflows/create-tag.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Create Release Tag
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches: [develop]
7+
8+
jobs:
9+
create-tag:
10+
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'chore/release-')
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
ref: develop
20+
fetch-depth: 0
21+
22+
- name: Extract version from pyproject.toml
23+
id: version
24+
run: |
25+
VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
26+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
27+
echo "tag=v${VERSION}" >> $GITHUB_OUTPUT
28+
29+
- name: Check if tag already exists
30+
id: check-tag
31+
run: |
32+
if git tag -l "${{ steps.version.outputs.tag }}" | grep -q "${{ steps.version.outputs.tag }}"; then
33+
echo "exists=true" >> $GITHUB_OUTPUT
34+
echo "Tag ${{ steps.version.outputs.tag }} already exists"
35+
else
36+
echo "exists=false" >> $GITHUB_OUTPUT
37+
echo "Tag ${{ steps.version.outputs.tag }} does not exist"
38+
fi
39+
40+
- name: Create and push tag
41+
if: steps.check-tag.outputs.exists == 'false'
42+
run: |
43+
git config user.name "github-actions[bot]"
44+
git config user.email "github-actions[bot]@users.noreply.github.com"
45+
git tag -a ${{ steps.version.outputs.tag }} -m "Release ${{ steps.version.outputs.tag }}"
46+
git push origin ${{ steps.version.outputs.tag }}
47+
48+
- name: Tag already exists
49+
if: steps.check-tag.outputs.exists == 'true'
50+
run: |
51+
echo "::warning::Tag ${{ steps.version.outputs.tag }} already exists, skipping tag creation"

.github/workflows/release.yml

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
name: Prepare Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "New version (e.g. 0.15.1)"
8+
required: true
9+
type: string
10+
bump_type:
11+
description: "Version bump type (only used if version is not provided)"
12+
required: false
13+
type: choice
14+
options:
15+
- patch
16+
- minor
17+
- major
18+
default: patch
19+
20+
jobs:
21+
release:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: write
25+
pull-requests: write
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Set up Python
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: "3.10"
38+
39+
- name: Bootstrap poetry
40+
run: |
41+
curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.2 python -
42+
43+
- name: Update PATH
44+
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
45+
46+
- name: Configure poetry
47+
run: poetry config virtualenvs.in-project true
48+
49+
- name: Install git-cliff
50+
# not allowed by NVIDIA
51+
# uses: kenji-miyake/setup-git-cliff@v2
52+
run: |
53+
# download and install git-cliff binary directly
54+
CLIFF_VERSION="2.7.0"
55+
wget -q https://github.com/orhun/git-cliff/releases/download/v${CLIFF_VERSION}/git-cliff-${CLIFF_VERSION}-x86_64-unknown-linux-gnu.tar.gz
56+
tar -xzf git-cliff-${CLIFF_VERSION}-x86_64-unknown-linux-gnu.tar.gz
57+
sudo mv git-cliff-${CLIFF_VERSION}/git-cliff /usr/local/bin/
58+
rm -rf git-cliff-${CLIFF_VERSION}*
59+
# verify installation
60+
git cliff --version
61+
62+
- name: Determine version
63+
id: version
64+
run: |
65+
if [ -n "${{ github.event.inputs.version }}" ]; then
66+
VERSION="${{ github.event.inputs.version }}"
67+
else
68+
# Use git-cliff to determine the next version based on commits
69+
VERSION=$(git cliff --bumped-version)
70+
fi
71+
72+
# Remove 'v' prefix if present
73+
VERSION=${VERSION#v}
74+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
75+
echo "tag=v${VERSION}" >> $GITHUB_OUTPUT
76+
77+
- name: Generate changelog block
78+
run: |
79+
git cliff \
80+
--unreleased \
81+
--tag v${{ steps.version.outputs.version }} \
82+
--strip all \
83+
> CHANGELOG.new.md
84+
85+
- name: Inject release block just above the previous entry
86+
run: |
87+
awk '
88+
BEGIN { done = 0 }
89+
# On the *first* version header, insert the new block
90+
/^## \[/ && done == 0 {
91+
system("cat CHANGELOG.new.md")
92+
print "" # blank line between blocks
93+
done = 1
94+
}
95+
{ print }
96+
' CHANGELOG.md > CHANGELOG.tmp \
97+
&& mv CHANGELOG.tmp CHANGELOG.md \
98+
&& rm CHANGELOG.new.md
99+
100+
- name: Update version with Poetry
101+
run: |
102+
# Use Poetry to update the version
103+
poetry version ${{ steps.version.outputs.version }}
104+
105+
- name: Update version in README.md
106+
run: |
107+
# Update the version reference in README.md
108+
sed -i "s/\[0\.[0-9]*\.[0-9]*\](https:\/\/github\.com\/NVIDIA\/NeMo-Guardrails\/tree\/v0\.[0-9]*\.[0-9]*)/[${{ steps.version.outputs.version }}](https:\/\/github.com\/NVIDIA\/NeMo-Guardrails\/tree\/v${{ steps.version.outputs.version }})/g" README.md
109+
sed -i "s/version: \[0\.[0-9]*\.[0-9]*\]/version: [${{ steps.version.outputs.version }}]/g" README.md
110+
111+
- name: Create Pull Request
112+
uses: peter-evans/create-pull-request@v5
113+
with:
114+
token: ${{ secrets.GITHUB_TOKEN }}
115+
branch: chore/release-${{ steps.version.outputs.version }}
116+
base: develop
117+
title: "chore: prepare for release v${{ steps.version.outputs.version }}"
118+
body: |
119+
## 🚀 Release v${{ steps.version.outputs.version }}
120+
121+
This PR was automatically created by the release workflow.
122+
123+
### Changes included:
124+
- ✅ Updated version to v${{ steps.version.outputs.version }}
125+
- ✅ Updated CHANGELOG.md with latest changes
126+
- ✅ Updated version references in README.md
127+
128+
---
129+
130+
After merging this PR, a tag will be created and a GitHub release will be published.
131+
labels: |
132+
release
133+
automated
134+
add-paths: |
135+
CHANGELOG.md
136+
pyproject.toml
137+
poetry.lock
138+
README.md
139+
commit-message: "chore(release): prepare for v${{ steps.version.outputs.version }}"
140+
141+
- name: Clean up
142+
run: rm -f RELEASE_NOTES.md

CHANGELOG-Colang.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to the Colang language and runtime will be documented in thi
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.0-beta.7] - 2025-07-16
8+
9+
### Fixed
10+
11+
* Use processed user and bot messages after input/output rails transformations to prevent leakage of unfiltered data ([#1297](https://github.com/NVIDIA/NeMo-Guardrails/pull/1297)) by @lapinek
12+
713
## [2.0-beta.6] - 2025-01-16
814

915
### Added

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,36 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
99
>
1010
> The changes related to the Colang language and runtime have moved to [CHANGELOG-Colang](./CHANGELOG-Colang.md) file.
1111
12+
## [0.15.0] - 2025-08-08
13+
14+
### 🚀 Features
15+
16+
- *(tracing)* [**breaking**] Update tracing to use otel api ([#1269](https://github.com/NVIDIA/NeMo-Guardrails/issues/1269))
17+
- *(streaming)* Implement parallel streaming output rails execution ([#1263](https://github.com/NVIDIA/NeMo-Guardrails/issues/1263), [#1324](https://github.com/NVIDIA/NeMo-Guardrails/pull/1324))
18+
- *(streaming)* Support external async token generators ([#1286](https://github.com/NVIDIA/NeMo-Guardrails/issues/1286))
19+
- Support parallel rails execution ([#1234](https://github.com/NVIDIA/NeMo-Guardrails/issues/1234), [#1323](https://github.com/NVIDIA/NeMo-Guardrails/pull/1323))
20+
21+
### 🐛 Bug Fixes
22+
23+
- *(streaming)* Resolve word concatenation in streaming output rails ([#1259](https://github.com/NVIDIA/NeMo-Guardrails/issues/1259))
24+
- *(streaming)* Enable token usage tracking for streaming LLM calls ([#1264](https://github.com/NVIDIA/NeMo-Guardrails/issues/1264), [#1285](https://github.com/NVIDIA/NeMo-Guardrails/issues/1285))
25+
- *(tracing)* Prevent mutation of user options when tracing is enabled ([#1273](https://github.com/NVIDIA/NeMo-Guardrails/issues/1273))
26+
- *(rails)* Prevent LLM parameter contamination in rails ([#1306](https://github.com/NVIDIA/NeMo-Guardrails/issues/1306))
27+
28+
### 📚 Documentation
29+
30+
- Release notes 0.14.1 ([#1272](https://github.com/NVIDIA/NeMo-Guardrails/issues/1272))
31+
- Update guardrails-library.md to include Clavata as a third party API ([#1294](https://github.com/NVIDIA/NeMo-Guardrails/issues/1294))
32+
- *(streaming)* Add section on token usage tracking ([#1282](https://github.com/NVIDIA/NeMo-Guardrails/issues/1282))
33+
- Add parallel rail section and split config page ([#1295](https://github.com/NVIDIA/NeMo-Guardrails/issues/1295))
34+
- Show complete prompts.yml content in getting started tutorial ([#1311](https://github.com/NVIDIA/NeMo-Guardrails/issues/1311))
35+
- *(tracing)* Update and streamline tracing guide ([#1307](https://github.com/NVIDIA/NeMo-Guardrails/issues/1307))
36+
37+
### ⚙️ Miscellaneous Tasks
38+
39+
- *(dependabot)* Remove dependabot configuration ([#1281](https://github.com/NVIDIA/NeMo-Guardrails/issues/1281))
40+
- *(CI)* Add release workflow ([#1309](https://github.com/NVIDIA/NeMo-Guardrails/issues/1309), [#1318](https://github.com/NVIDIA/NeMo-Guardrails/issues/1318))
41+
1242
## [0.14.1] - 2025-07-02
1343

1444
### 🚀 Features

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
99
[![arXiv](https://img.shields.io/badge/arXiv-2310.10501-b31b1b.svg)](https://arxiv.org/abs/2310.10501)
1010

11-
> **LATEST RELEASE / DEVELOPMENT VERSION**: The [main](https://github.com/NVIDIA/NeMo-Guardrails/tree/main) branch tracks the latest released beta version: [0.14.1](https://github.com/NVIDIA/NeMo-Guardrails/tree/v0.14.1). For the latest development version, checkout the [develop](https://github.com/NVIDIA/NeMo-Guardrails/tree/develop) branch.
11+
> **LATEST RELEASE / DEVELOPMENT VERSION**: The [main](https://github.com/NVIDIA/NeMo-Guardrails/tree/main) branch tracks the latest released beta version: [0.15.0](https://github.com/NVIDIA/NeMo-Guardrails/tree/v0.15.0). For the latest development version, checkout the [develop](https://github.com/NVIDIA/NeMo-Guardrails/tree/develop) branch.
1212
1313
> **DISCLAIMER**: The beta release is undergoing active development and may be subject to changes and improvements, which could cause instability and unexpected behavior. We currently do not recommend deploying this beta version in a production setting. We appreciate your understanding and contribution during this stage. Your support and feedback are invaluable as we advance toward creating a robust, ready-for-production LLM guardrails toolkit. The examples provided within the documentation are for educational purposes to get started with NeMo Guardrails, and are not meant for use in production applications.
1414

cliff.toml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# git-cliff ~ default configuration file
2+
# https://git-cliff.org/docs/configuration
3+
#
4+
# Lines starting with "#" are comments.
5+
# Configuration options are organized into tables and keys.
6+
# See documentation for more information on available options.
7+
8+
[changelog]
9+
# template for the changelog header
10+
header = """
11+
# Changelog\n
12+
All notable changes to this project will be documented in this file.\n
13+
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n
14+
NOTE:\n
15+
The changes related to the Colang language and runtime have moved to [CHANGELOG-Colang](./CHANGELOG-Colang.md) file.\n
16+
"""
17+
# template for the changelog body
18+
# https://keats.github.io/tera/docs/#introduction
19+
body = """
20+
{% if version %}\
21+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
22+
{% else %}\
23+
## [unreleased]
24+
{% endif %}\
25+
{% for group, commits in commits | group_by(attribute="group") %}
26+
### {{ group | striptags | trim | upper_first }}
27+
{% for commit in commits %}
28+
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
29+
{% if commit.breaking %}[**breaking**] {% endif %}\
30+
{{ commit.message | upper_first }} \
31+
{% endfor %}
32+
{% endfor %}\n
33+
"""
34+
# template for the changelog footer
35+
footer = """
36+
<!-- NeMo Guardrails Changelog -->
37+
"""
38+
# remove the leading and trailing s
39+
trim = true
40+
# postprocessors
41+
#
42+
postprocessors = [
43+
{ pattern = '<REPO>', replace = "https://github.com/NVIDIA/NeMo-Guardrails" }, # replace repository URL
44+
]
45+
# render body even when there are no releases to process
46+
# render_always = true
47+
# output file path
48+
# output = "test.md"
49+
50+
[git]
51+
# parse the commits based on https://www.conventionalcommits.org
52+
conventional_commits = true
53+
# filter out the commits that are not conventional
54+
filter_unconventional = true
55+
# process each line of a commit as an individual commit
56+
split_commits = false
57+
# regex for preprocessing the commit messages
58+
commit_preprocessors = [
59+
# Replace issue numbers
60+
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" },
61+
# Check spelling of the commit with https://github.com/crate-ci/typos
62+
# If the spelling is incorrect, it will be automatically fixed.
63+
# { pattern = '.*', replace_command = 'typos --write-changes -' },
64+
#
65+
{ pattern = '^feat\\(docs\\)', replace = 'doc' },
66+
{ pattern = '^fix\\(docs\\)', replace = 'doc' },
67+
]
68+
# regex for parsing and grouping commits
69+
commit_parsers = [
70+
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
71+
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
72+
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
73+
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
74+
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
75+
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
76+
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
77+
78+
{ message = "^chore\\(release\\): prepare for", skip = true },
79+
{ message = "^chore\\(deps.*\\)", skip = true },
80+
{ message = "^chore\\(pr\\)", skip = true },
81+
{ message = "^chore\\(pull\\)", skip = true },
82+
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
83+
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
84+
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
85+
{ message = ".*", group = "<!-- 10 -->💼 Other" },
86+
]
87+
# filter out the commits that are not matched by commit parsers
88+
filter_commits = false
89+
# sort the tags topologically
90+
topo_order = false
91+
# sort the commits inside sections by oldest/newest order
92+
sort_commits = "oldest"
93+
[bump]
94+
features_always_bump_minor = true
95+
breaking_always_bump_major = true
96+
initial_tag = "0.14.1"

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"fieldlist",
5555
"substitution",
5656
]
57+
myst_links_external_new_tab = True
5758

5859
myst_substitutions = {
5960
"version": release,

0 commit comments

Comments
 (0)