Skip to content

Commit

Permalink
Add flake8 linter for Python files in CI/CD
Browse files Browse the repository at this point in the history
Check the style and quality of python code using flake8 in CI/CD

Signed-off-by: Sandipan Panda <[email protected]>
  • Loading branch information
sandipanpanda committed Mar 10, 2024
1 parent 14eeaeb commit 96381d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/test-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ jobs:

- name: Install dependencies
run: |
pip install pytest python-dateutil urllib3 kubernetes
pip install flake8 pytest python-dateutil urllib3 kubernetes
pip install -U './sdk/python[huggingface]'
- name: Run unit test for training sdk
run: pytest ./sdk/python/kubeflow/training/api/training_client_test.py

- name: Lint with flake8
run: |
flake8 sdk/ --count --select=E9,F63,F7,F82 --extend-ignore=W503 --exclude=/*kubeflow_org_v1*,__init__.py,api_client.py,configuration.py,exceptions.py,rest.py --show-source --statistics
flake8 sdk/ --count --extend-ignore=W503 --exclude=/*kubeflow_org_v1*,__init__.py,api_client.py,configuration.py,exceptions.py,rest.py --max-complexity=10 --max-line-length=100 --statistics

0 comments on commit 96381d8

Please sign in to comment.