fix(ci): make codestyle gates realistic and green-able - #6126
Conversation
The codestyle-doc-tests check has been red on every PR (and merges anyway) because two of its tools were misconfigured for this codebase: 1. flake8-future-import (FI11): enforces `from __future__ import absolute_import` in every file — a Python-2 relic meaningless on this py3.10+ codebase, producing ~100+ errors per submodule. Removed the plugin from requirements/tox/flake8_requirements.txt. 2. pylint --fail-under=9.9: the actual scores are core 8.45, train 7.24, serve 7.84, mlops 7.50 — unreachable without a large refactor. Reset to per-submodule floors just below current (core 8.0, train 7.0, serve 7.5, mlops 7.0) so pylint blocks REGRESSIONS while passing today. 3. pydocstyle: ~600 errors/submodule dominated by low-value/judgment rules (D400 trailing period, D401 imperative mood, D1xx missing docstrings). Added --add-ignore for those so docstyle enforces only high-value checks (leaves ~45 real issues repo-wide, fixed separately) instead of blocking on style opinion. black-check and flake8 (real E/W/F codes) remain fully enforced — those are the high-value, auto-fixable gates. Companion PRs apply the black/flake8 code fixes per submodule so those envs pass.
|
Claude finished @jam-jee's task in 2m 57s —— View job PR Review — codestyle gate config
Solid, well-motivated change — the rationale for each gate is clear and the per-submodule pylint floors are a good "block regressions, pass today" design. One issue needs attention before merge, plus a couple of smaller notes. 🔴 Blocking: orphaned
|
Problem
codestyle-doc-testsbundles 7 tools (black-check, flake8, pylint, docstyle, twine, sphinx, doc8) and has been red on every PR while merging anyway (non-blocking). Two tools are misconfigured for this codebase, making the check structurally unwinnable:from __future__ import absolute_importin every file — a Python-2 relic, meaningless on py3.10+--fail-under=9.9Changes (config only)
flake8-future-importfromrequirements/tox/flake8_requirements.txt— eliminates the FI11 noise repo-wide. Real flake8 codes (E/W/F — including F401/F811/F841 that catch actual bugs) stay fully enforced.--fail-under→ per-submodule floors just below current scores (core 8.0, train 7.0, serve 7.5, mlops 7.0). pylint now blocks regressions (score can't drop) while passing today — instead of a red check everyone ignores.--add-ignorefor the noisy/judgment rules (D400/D401/D1xx/…), so docstyle enforces only high-value checks (~45 real issues remain repo-wide, fixed separately) rather than blocking on style opinion.Gate philosophy (what this establishes)
black-check,flake8(E/W/F),twine.pylintat a realistic floor.docstyle.Companion work
Testing