action #92665
closedAutomatically validate code style for python code
Description
Motivation¶
It would be great to have automated checks for more style aspects to python code
We use perl-Tidy and perl-Critic for perl code and strictly checks in CI, it will be nice to have same
standard also for other languages.
Acceptance criteria¶
- AC1: python code style is checked automatically
Acceptance tests¶
- AT1: Inconsistent codestyle prevents deployments
Suggestion¶
- use black for python code style
Updated by okurz over 3 years ago
- Due date set to 2021-05-28
- Category set to Feature requests
- Status changed from New to In Progress
- Assignee set to osukup
- Priority changed from Normal to Low
- Target version set to Ready
I agree. Let's go with https://github.com/os-autoinst/openqa_review/pull/142 in openqa-review first and then let's try to add the according checks to other projects where we use python as well.
Updated by okurz over 3 years ago
https://github.com/os-autoinst/openqa_review/pull/142 replaced by https://github.com/os-autoinst/openqa_review/pull/143 which got merged. https://travis-ci.org/github/os-autoinst/openqa_review/jobs/771437422#L211 shows a passed black check run within the openqa-review tests.
@osukup would you like to give it a try to bring in equivalent checks for other repos, e.g. os-autoinst and/or openQA?
Updated by livdywan over 3 years ago
- Due date changed from 2021-05-28 to 2021-06-02
osukup wrote:
https://github.com/os-autoinst/openqa-trigger-from-obs/pull/131
and
https://github.com/os-autoinst/os-autoinst/pull/1679
https://github.com/os-autoinst/os-autoinst/pull/1679 is still open. @osukup please sort out remaining questions if any and ensure the PR is mergeable. I'm bumping the Due date to tomorrow in the meantime.
Updated by osukup over 3 years ago
cdywan wrote:
https://github.com/os-autoinst/os-autoinst/pull/1679 is still open. @osukup please sort out remaining questions if any and ensure the PR is mergeable. I'm bumping the Due date to tomorrow in the meantime.
is merged ....
new PR https://github.com/os-autoinst/openqa_bugfetcher/pull/4
Updated by livdywan over 3 years ago
- Status changed from In Progress to Feedback
The last open PR was merged, all done?
Updated by livdywan over 3 years ago
- Due date changed from 2021-06-02 to 2021-06-08
Updated by livdywan over 3 years ago
- Due date changed from 2021-06-08 to 2021-06-09
So apparently a due date of "today" is pointless in terms of getting it off the list for the day.
Updated by okurz over 3 years ago
Updated by osukup over 3 years ago
- Status changed from Feedback to Resolved
okurz wrote:
https://github.com/os-autoinst/openqa_bugfetcher/runs/2763136167?check_suite_focus=true says "No"
y, code quality of bugfetcher isn't best :D and pytlint complaints a lot
but from the perspective of this ticket --> automatic check for style with black is completed in all os-autoinst project's
Updated by livdywan over 3 years ago
- Status changed from Resolved to Feedback
osukup wrote:
y, code quality of bugfetcher isn't best :D and pytlint complaints a lot
The ticket is not about black or pylint. AT1: Inconsistent codestyle prevents deployments
is not fulfilled as far as I can see. So I see 3 obvious options here:
- Drop pylint
- Fix pylint
- File a ticket about why fixing pylint is non-trivial
Updated by osukup over 3 years ago
Updated by tinita over 3 years ago
- Related to action #93892: [beginner][easy] Automatically validate code style for python code in openQA added