Skip to content

Commit 412e51c

Browse files
authored
include auto-docstring check in the modular ci. (#13004)
1 parent 23d0642 commit 412e51c

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/workflows/pr_modular_tests.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,27 @@ jobs:
7575
if: ${{ failure() }}
7676
run: |
7777
echo "Repo consistency check failed. Please ensure the right dependency versions are installed with 'pip install -e .[quality]' and run 'make fix-copies'" >> $GITHUB_STEP_SUMMARY
78+
check_auto_docs:
79+
runs-on: ubuntu-22.04
80+
steps:
81+
- uses: actions/checkout@v6
82+
- name: Set up Python
83+
uses: actions/setup-python@v6
84+
with:
85+
python-version: "3.10"
86+
- name: Install dependencies
87+
run: |
88+
pip install --upgrade pip
89+
pip install .[quality]
90+
- name: Check auto docs
91+
run: make modular-autodoctrings
92+
- name: Check if failure
93+
if: ${{ failure() }}
94+
run: |
95+
echo "Auto docstring checks failed. Please run `python utils/modular_auto_docstring.py --fix_and_overwrite`." >> $GITHUB_STEP_SUMMARY
7896
7997
run_fast_tests:
80-
needs: [check_code_quality, check_repository_consistency]
98+
needs: [check_code_quality, check_repository_consistency, check_auto_docs]
8199
name: Fast PyTorch Modular Pipeline CPU tests
82100

83101
runs-on:

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ fix-copies:
7070
python utils/check_copies.py --fix_and_overwrite
7171
python utils/check_dummies.py --fix_and_overwrite
7272

73+
# Auto docstrings in modular blocks
74+
modular-autodoctrings:
75+
python utils/modular_auto_docstring.py
76+
7377
# Run tests for the library
7478

7579
test:

0 commit comments

Comments
 (0)