Skip to content

Commit 0c9e1de

Browse files
authored
Misc release script improvements (#692)
* Write a script to update the documentation versions file * Update GitLab CI scripts to avoid deployments for dev and alpha tags * Remove temporary link check exceptions Closes #680 ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing.md). - We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. - Any contribution which contains commits that are not Signed-Off will not be accepted. - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. Authors: - David Gardner (https://github.com/dagardner-nv) Approvers: - Will Killian (https://github.com/willkill07) URL: #692
1 parent e3a3d3b commit 0c9e1de

61 files changed

Lines changed: 138 additions & 82 deletions

File tree

Some content is hidden

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

ci/markdown-link-check-config.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414
},
1515
{
1616
"pattern": "^https://www\\.mysql\\.com"
17-
},
18-
{
19-
"pattern": "^https://docs\\.nvidia\\.com/nemo/agent-toolkit"
20-
},
21-
{
22-
"pattern": "^https://media\\.githubusercontent\\.com/media/NVIDIA/NeMo-Agent-Toolkit/refs/heads/main/docs/source/_static/banner\\.png"
2317
}
2418
]
2519
}

ci/release/update-version.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,8 @@ for TOML_FILE in "${NAT_PACKAGE_TOMLS[@]}"; do
9090
--new-version="${NAT_VERSION}" \
9191
--version-match="${VERSION_MATCH}"
9292
done
93+
94+
# Update the documentation versions1.json file
95+
${CUR_DIR}/update_doc_versions1.py \
96+
--versions-file=${PROJECT_ROOT}/docs/source/versions1.json \
97+
--new-version="${NEXT_SHORT_TAG}"

ci/release/update_doc_versions1.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/env python
2+
# SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
import json
18+
19+
import click
20+
21+
22+
@click.command()
23+
@click.option("--versions-file", required=True, type=click.Path(exists=True), help="Path to the versions file.")
24+
@click.option("--new-version", required=True, help="New version to set for the package.")
25+
def main(versions_file: str, new_version: str):
26+
if new_version.count('.') != 1:
27+
raise ValueError("Version string must only include <major>.<minor>")
28+
29+
with open(versions_file, "r", encoding="utf-8") as fh:
30+
version_list = json.load(fh)
31+
32+
for version_data in version_list:
33+
version_data.pop('preferred', None)
34+
if version_data['version'] == new_version:
35+
raise ValueError(f"Version {new_version} already exists in the versions file.")
36+
37+
version_list.insert(0, {"version": new_version, "preferred": True, "url": f"../{new_version}/"})
38+
39+
with open(versions_file, "w", encoding="utf-8") as fh:
40+
json.dump(version_list, fh, indent=4)
41+
fh.write("\n") # Add a trailing newline
42+
43+
44+
if __name__ == "__main__":
45+
main()

ci/scripts/gitlab/artifactory_upload.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GITLAB_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd
2222
source ${GITLAB_SCRIPT_DIR}/common.sh
2323

2424
GIT_TAG=$(get_git_tag)
25-
IS_TAGGED=$(is_current_commit_tagged)
25+
IS_TAGGED=$(is_current_commit_release_tagged)
2626
rapids-logger "Git Version: ${GIT_TAG} - Is Tagged: ${IS_TAGGED}"
2727

2828
# change this to ready to publish. this should be done programmatically once

ci/scripts/gitlab/build_wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ GITLAB_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd
2121
source ${GITLAB_SCRIPT_DIR}/common.sh
2222

2323
GIT_TAG=$(get_git_tag)
24-
IS_TAGGED=$(is_current_commit_tagged)
24+
IS_TAGGED=$(is_current_commit_release_tagged)
2525
rapids-logger "Git Version: ${GIT_TAG} - Is Tagged: ${IS_TAGGED}"
2626

2727
if [[ "${CI_CRON_NIGHTLY}" == "1" || ( ${IS_TAGGED} == "1" && "${CI_COMMIT_BRANCH}" != "main" ) ]]; then

ci/scripts/gitlab/common.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,33 @@ function get_git_tag() {
3434
exit 1;
3535
fi
3636

37-
# If the branch is a nightly build create a version which will be accepted by pypi
38-
# Note: We are intentionally creating an actual tag, just setting the variable
39-
GIT_TAG=$(echo $GIT_TAG | sed -e "s|-.*|a$(date +"%Y%m%d")|")
37+
# If the branch is a nightly build create a version which will be accepted by pypi,
38+
# The sed script here is splitting on either the first dash or 'a',
39+
# transforming a tag like `v1.3.0-dev-17-g7681cf9f` into `v1.3.0a20250821`
40+
# and a tag like `v1.3.0a5` into `v1.3.0a20250821`
41+
# Note: We are intentionally not ceating an actual tag, just setting the variable
42+
GIT_TAG=$(echo $GIT_TAG | sed -E -e "s/(-|a).*/a$(date +"%Y%m%d")/")
4043
fi
4144

4245
echo ${GIT_TAG}
4346
}
4447

45-
function is_current_commit_tagged() {
46-
# Check if the current commit is tagged
48+
function is_current_commit_release_tagged() {
49+
# Check if the current commit is tagged for release, either an RC tag or the release tag
4750
set +e
48-
git describe --tags --exact-match HEAD >/dev/null 2>&1
51+
GIT_TAG=$(git describe --tags --exact-match HEAD 2>/dev/null)
4952
local status_code=$?
5053
set -e
5154

5255
# Convert the unix status code to a boolean value
5356
local is_tagged=0
5457
if [[ ${status_code} -eq 0 ]]; then
55-
is_tagged=1
58+
local is_pre_release=0
59+
60+
# Ensure we don't have a dev or alpha tag
61+
if [[ ! (${GIT_TAG} =~ "-dev" || ${GIT_TAG} =~ "a") ]]; then
62+
is_tagged=1
63+
fi
5664
fi
5765
echo ${is_tagged}
5866
}

docs/source/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@
138138
r'https://code.visualstudio.com',
139139
r'https://www.mysql.com',
140140
r'https://api.service.com',
141-
r'https://media.githubusercontent.com/media/NVIDIA/NeMo-Agent-Toolkit/refs/heads/main/docs/source/_static/banner.png', # noqa: E501
142141
r'http://custom-server'
143142
]
144143

docs/source/versions1.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
[
22
{
3+
"version": "1.3",
34
"preferred": true,
5+
"url": "../1.3/"
6+
},
7+
{
48
"version": "1.2",
59
"url": "../1.2/"
610
},

docs/source/workflows/evaluate.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,10 @@ Evaluation is dependent on the judge LLM's ability to accurately evaluate the ge
129129
3)- meta/llama-3.1-70b-instruct
130130
4)- meta/llama-3.3-70b-instruct
131131
```
132-
For a complete list of up-to-date judge LLMs, refer to the [RAGAS NV metrics leadership board](https://github.com/explodinggradients/ragas/blob/main/ragas/src/ragas/metrics/_nv_metrics.py)
132+
<!-- Update the link here when ragas is updated -->
133+
For a complete list of up-to-date judge LLMs, refer to the [RAGAS NV metrics leadership board](https://github.com/explodinggradients/ragas/blob/v0.2.14/src/ragas/metrics/_nv_metrics.py)
133134

134-
For more information on the prompt used by the judge LLM, refer to the [RAGAS NV metrics](https://github.com/explodinggradients/ragas/blob/main/ragas/src/ragas/metrics/_nv_metrics.py). The prompt for these metrics is not configurable. If you need a custom prompt, you can use the [Tunable RAG Evaluator](../reference/evaluate.md#tunable-rag-evaluator) or implement your own evaluator using the [Custom Evaluator](../extend/custom-evaluator.md) documentation.
135+
For more information on the prompt used by the judge LLM, refer to the [RAGAS NV metrics](https://github.com/explodinggradients/ragas/blob/v0.2.14/src/ragas/metrics/_nv_metrics.py). The prompt for these metrics is not configurable. If you need a custom prompt, you can use the [Tunable RAG Evaluator](../reference/evaluate.md#tunable-rag-evaluator) or implement your own evaluator using the [Custom Evaluator](../extend/custom-evaluator.md) documentation.
135136

136137
### Trajectory Evaluator
137138
This evaluator uses the intermediate steps generated by the workflow to evaluate the workflow trajectory. The evaluator configuration includes the evaluator type and any additional parameters required by the evaluator.

examples/HITL/por_to_jiratickets/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ root = "../../.."
88
[project]
99
name = "nat_por_to_jiratickets"
1010
dynamic = ["version"]
11-
dependencies = ["nvidia-nat[langchain]~=1.2"]
11+
dependencies = ["nvidia-nat[langchain]~=1.3"]
1212
requires-python = ">=3.11,<3.13"
1313
description = "Custom NeMo Agent toolkit Workflow"
1414
classifiers = ["Programming Language :: Python"]

0 commit comments

Comments
 (0)