Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flake8 linter for Python files in CI/CD #2022

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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