Skip to content

Commit 03fbbbe

Browse files
committed
Add doc and format.sh
Signed-off-by: "Yikun Jiang" <[email protected]>
1 parent e196c98 commit 03fbbbe

File tree

5 files changed

+39
-342
lines changed

5 files changed

+39
-342
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ repos:
1313
args: [--in-place, --verbose]
1414
# Keep the same list from yapfignore here to avoid yapf failing without any inputs
1515
exclude: '(.github|benchmarks|examples|docs)/.*'
16-
- repo: https://github.com/rhysd/actionlint
17-
rev: v1.7.7
18-
hooks:
19-
- id: actionlint
2016
- repo: https://github.com/astral-sh/ruff-pre-commit
2117
rev: v0.11.7
2218
hooks:
@@ -44,6 +40,10 @@ repos:
4440
# hooks:
4541
# - id: pymarkdown
4642
# args: [fix]
43+
- repo: https://github.com/rhysd/actionlint
44+
rev: v1.7.7
45+
hooks:
46+
- id: actionlint
4747
- repo: local
4848
hooks:
4949
# For local development, you can run mypy using tools/mypy.sh script if needed.
@@ -56,24 +56,27 @@ repos:
5656
- id: mypy-3.9 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
5757
name: Run mypy for Python 3.9
5858
entry: tools/mypy.sh 1 "3.9"
59+
# Use system python because vllm installation is required
5960
language: system
6061
types: [python]
6162
stages: [manual] # Only run in CI
6263
- id: mypy-3.10 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
6364
name: Run mypy for Python 3.10
6465
entry: tools/mypy.sh 1 "3.10"
66+
# Use system python because vllm installation is required
6567
language: system
6668
types: [python]
67-
stages: [manual] # Only run in CI
6869
- id: mypy-3.11 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
6970
name: Run mypy for Python 3.11
7071
entry: tools/mypy.sh 1 "3.11"
72+
# Use system python because vllm installation is required
7173
language: system
7274
types: [python]
7375
stages: [manual] # Only run in CI
7476
- id: mypy-3.12 # TODO: Use https://github.com/pre-commit/mirrors-mypy when mypy setup is less awkward
7577
name: Run mypy for Python 3.12
7678
entry: tools/mypy.sh 1 "3.12"
79+
# Use system python because vllm installation is required
7780
language: system
7881
types: [python]
7982
stages: [manual] # Only run in CI

docs/source/developer_guide/contributing.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,17 @@ cd ..
2828
# Clone vllm-ascend and install
2929
git clone https://github.com/vllm-project/vllm-ascend.git
3030
cd vllm-ascend
31-
# install system requirement
32-
apt install -y gcc g++ cmake libnuma-dev
33-
# install project requirement
31+
32+
# (Linux dev) Install project and system requirement
3433
pip install -r requirements-dev.txt
3534

35+
# (Non Linux) Install every pkg manually
36+
cat requirements.txt | grep -Ev '^#|^--|^$' | while read PACKAGE; do pip install "$PACKAGE"; done
37+
cat requirements-lint.txt | grep -Ev '^#|^--|^$' | while read PACKAGE; do pip install "$PACKAGE"; done
38+
3639
# Then you can run lint and mypy test
3740
bash format.sh
3841

39-
# Build:
40-
# - only supported on Linux (torch_npu available)
41-
# pip install -e .
42-
# - build without deps for debugging in other OS
43-
# pip install -e . --no-deps
44-
# - build without custom ops
45-
# COMPILE_CUSTOM_KERNELS=0 pip install -e .
46-
4742
# Commit changed files using `-s`
4843
git commit -sm "your commit info"
4944
```

0 commit comments

Comments
 (0)