katib icon indicating copy to clipboard operation
katib copied to clipboard

Add Linter and Formatter for python source codes

Open anencore94 opened this issue 3 years ago • 12 comments

/kind feature

Describe the solution you'd like

In kubeflow/katib, there are lots of source codes written in python. Even though there are well-defined CI processes for source codes written in Golang, however for Python codes, only charmed-katib seems to have such process now.

There should be a fixed linter, formatter and tester with some rule-config files(.flake8, .pylintrc, ...) and the github action workflow to check those all. For example, there are lots of unit test codes for suggestion, but current CI process doesn't check if they are failed or check the test coverage decreased in every PR. If there are any convention checking tools, please share in katib community :)

Anything else you would like to add: If you guys agree to this, I'd like to contribute to this feature in some parts.

anencore94 avatar Aug 01 '21 05:08 anencore94

That is a great suggestion and it will be very useful for us. Thank you for your help @anencore94!

In addition to that, I think we should move our current Python tests from AWS CI Workflow to GitHub actions: https://github.com/kubeflow/katib/blob/master/test/scripts/v1beta1/python-tests.sh.

Currently, we are not using AWS Kubernetes cluster requirement to perform this workflow step. We can create separate GitHub Actions Workflow for all Python tests (linter, formatter, unit), similar to Go: https://github.com/kubeflow/katib/tree/master/.github/workflows.

cc @gaocegege @johnugeorge

andreyvelich avatar Aug 02 '21 15:08 andreyvelich

Using mypy to type check would be nice too.

anencore94 avatar Aug 31 '21 05:08 anencore94

SGTM, I am not quite familiar with Python, I think we need it.

gaocegege avatar Aug 31 '21 06:08 gaocegege

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 03 '22 21:01 stale[bot]

/lifecycle frozen

andreyvelich avatar Jan 04 '22 15:01 andreyvelich

/good-first-issue

tenzen-y avatar Mar 11 '24 07:03 tenzen-y

@tenzen-y: This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to this:

/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

google-oss-prow[bot] avatar Mar 11 '24 07:03 google-oss-prow[bot]

I would like to work on this. /assign

sandipanpanda avatar Mar 11 '24 20:03 sandipanpanda

@sandipanpanda still working on it ?

sagnik3788 avatar May 05 '24 14:05 sagnik3788

Sorry, this fell off my radar. @sagnik3788 feel free to work on this. /unassign

sandipanpanda avatar May 10 '24 15:05 sandipanpanda

/assign

sagnik3788 avatar May 11 '24 03:05 sagnik3788