Skip to content

Commit e0668db

Browse files
authored
docs: generate cli_options.md based on cyclopts app (#476)
1 parent 8936dba commit e0668db

File tree

5 files changed

+734
-189
lines changed

5 files changed

+734
-189
lines changed

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ jobs:
2424

2525
- name: Install dependencies
2626
run: |
27-
make setup-venv
28-
make setup-mkinit
27+
make first-time-setup PYTHON_VERSION=3.10
2928
3029
- uses: pre-commit/action@v3.0.1
3130
env:

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33
repos:
4+
- repo: local
5+
hooks:
6+
- id: generate-cli-docs
7+
name: generate-cli-docs
8+
entry: make generate-cli-docs
9+
language: python
10+
types: [python]
11+
pass_filenames: false
12+
args: []
413
- repo: https://github.com/pre-commit/pre-commit-hooks
514
rev: v5.0.0 # Use the latest stable version
615
hooks:

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717

1818
.PHONY: ruff lint ruff-fix lint-fix format fmt check-format check-fmt \
1919
test coverage clean install install-app docker docker-run first-time-setup \
20-
test-verbose init-files setup-venv setup-mkinit install-mock-server \
20+
test-verbose init-files setup-venv install-mock-server \
2121
integration-tests integration-tests-ci integration-tests-verbose integration-tests-ci-macos \
2222
test-integration test-integration-ci test-integration-verbose test-integration-ci-macos \
23-
test-stress stress-tests internal-help help
23+
generate-cli-docs test-stress stress-tests internal-help help
2424

2525

2626
# Include user-defined environment variables
@@ -160,9 +160,6 @@ setup-venv: #? create the virtual environment.
160160
printf "$(bold)$(green)Virtual environment already exists$(reset)\n"; \
161161
fi
162162

163-
setup-mkinit: #? install the mkinit and ruff packages for pre-commit.
164-
$(activate_venv) && uv pip install mkinit ruff
165-
166163
first-time-setup: #? convenience command to setup the environment for the first time
167164
$(MAKE) setup-venv --no-print-directory
168165

@@ -206,3 +203,6 @@ integration-tests-verbose test-integration-verbose: #? run integration tests wit
206203
@printf "$(yellow)Note: Sequential mode shows real-time AIPerf output$(reset)\n"
207204
$(activate_venv) && pytest tests/integration/ -m 'integration and not stress and not performance' -vv -s --tb=short --log-cli-level=INFO --capture=no $(args)
208205
@printf "$(bold)$(green)AIPerf Mock Server integration tests passed!$(reset)\n"
206+
207+
generate-cli-docs: #? generate the CLI documentation.
208+
$(activate_venv) && tools/generate_cli_docs.py

0 commit comments

Comments
 (0)