Skip to content

Commit 19ae9a3

Browse files
authored
Check links in markdown files (#323)
* We currently check links for Markdown/RST files included in the documentation builds, however this only covers files under `docs/source` * This PR checks all Markdown files including those at the root of the repo and in the `examples` dir. * Fixes some mal-formatted MD markup * Fixes a broken link in eval documentation Closes #176 ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/AIQToolkit/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: - Michael Demoret (https://github.com/mdemoret-nv) URL: #323
1 parent fd9316a commit 19ae9a3

File tree

7 files changed

+29
-8
lines changed

7 files changed

+29
-8
lines changed

‎.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,32 @@ repos:
1919
hooks:
2020
- id: isort
2121
args: ["--filter-files", "--settings-file=./pyproject.toml"]
22+
2223
- repo: https://github.com/PyCQA/flake8
2324
rev: 7.0.0
2425
hooks:
2526
- id: flake8
2627
entry: pflake8
2728
additional_dependencies: [pyproject-flake8]
2829
args: ["--config=./pyproject.toml"]
30+
2931
- repo: https://github.com/google/yapf
3032
rev: v0.43.0
3133
hooks:
3234
- id: yapf
3335
args: ["-i", "--style", "./pyproject.toml"]
36+
3437
- repo: https://github.com/astral-sh/uv-pre-commit
3538
rev: 0.6.2
3639
hooks:
3740
- id: uv-lock
3841

42+
- repo: https://github.com/tcort/markdown-link-check
43+
rev: v3.12.2
44+
hooks:
45+
- id: markdown-link-check
46+
args: ["-q", "--config", "ci/markdown-link-check-config.json"]
47+
exclude: "^src/aiq/meta/pypi\\.md$"
48+
3949
default_language_version:
4050
python: python3

‎ci/markdown-link-check-config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"ignorePatterns": [
3+
{"pattern": "^https?://localhost:.*$"},
4+
{"pattern": "^https?://$"},
5+
{"pattern": "^https://(platform\\.)?openai\\.com"},
6+
{
7+
"pattern": "^https://code\\.visualstudio\\.com$"
8+
}
9+
]
10+
}

‎docs/source/reference/cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ Options:
419419
-f, --fields [all|package|version|component_name|description|developer_notes]
420420
Fields used when applying query.
421421
--help Show this message and exit.
422-
```
422+
```
423423

424424
### Channels Information
425425

@@ -440,7 +440,7 @@ Usage: aiq info channels [OPTIONS] COMMAND [ARGS]...
440440
Options:
441441
-t, --type TEXT Filter the results by channel type.
442442
--help Show this message and exit.
443-
```
443+
```
444444

445445
## Configuration Commands
446446

@@ -549,7 +549,7 @@ Commands:
549549
pull Pull AIQ toolkit artifacts from a remote registry by package name.
550550
remove Remove AIQ toolkit artifact from a remote registry by name and version.
551551
search Search for AIQ toolkit artifacts from remote registry.
552-
```
552+
```
553553

554554
#### Publishing AIQ Toolkit Components
555555

‎docs/source/workflows/evaluate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ Evaluation is dependent on the judge LLM's ability to accurately evaluate the ge
124124
3)- meta/llama-3.1-70b-instruct
125125
4)- meta/llama-3.3-70b-instruct
126126
```
127-
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/src/ragas/metrics/_nv_metrics.py)
127+
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)
128128

129129
### Trajectory Evaluator
130130
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/agno_personal_finance/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ curl -X 'POST' \
157157
-H 'accept: application/json' \
158158
-H 'Content-Type: application/json' \
159159
-d '{"inputs": "My financial goal is to retire at age 60. I am currently 40 years old, working as a Machine Learning engineer at NVIDIA."}'
160-
```
160+
```
161161

162162
### Expected API Output
163163
The API response should look like this:

‎examples/email_phishing_analyzer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ curl -X 'POST' \
155155
-H 'accept: application/json' \
156156
-H 'Content-Type: application/json' \
157157
-d '{"input_message": "Dear [Customer], Thank you for your purchase on [Date]. We have processed a refund of $[Amount] to your account. Please provide your account and routing numbers so we can complete the transaction. Thank you, [Your Company]"}'
158-
```
158+
```
159159

160160
### Expected API Output
161161
The API response should look like this:

‎examples/simple_calculator/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ curl -X 'POST' \
246246
-H 'accept: application/json' \
247247
-H 'Content-Type: application/json' \
248248
-d '{"input_message": "Is the product of 2 * 4 greater than the current hour of the day?"}'
249-
```
249+
```
250250

251251
### Expected API Output
252252
The API response should be similar to the following:
@@ -257,6 +257,7 @@ The API response should be similar to the following:
257257
"output": "No, the product of 2 * 4 (which is 8) is less than the current hour of the day (which is 16)."
258258
}
259259
```
260+
260261
## Accessing Request Metadata
261262
Users can define custom routes that are dynamically added to the API server, and capture HTTP request metadata such
262263
as the method, URL path, URL scheme, headers, query parameters, path parameters, host, port, and cookies.
@@ -274,7 +275,7 @@ general:
274275
method: POST
275276
description: Gets the request attributes from the request.
276277
function_name: current_request_attributes
277-
```
278+
```
278279
279280
### Access the request metadata
280281
Get the instance of the `aiq.builder.context.AIQContext` object using the `aiq.builder.context.AIQContext.get()` method. This will give you access to the metadata method which holds the request attributes defined by the user on request. A complete example of the function can be found in `src/aiq/tool/server_tools.py.`

0 commit comments

Comments
 (0)