[CI] Add GitHub Actions lint workflow#18809
Conversation
Summary of ChangesHello @tqchen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the continuous integration pipeline by transitioning the linting process from a Jenkins-based system to a GitHub Actions workflow. This change aims to streamline the development process by integrating lint checks directly into the GitHub platform, making them more accessible and efficient for contributors. It also updates project dependencies to support the new linting setup. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request aims to transition linting from Jenkins to GitHub Actions. However, the GitHub Actions workflow file itself is missing from the provided changes, which is the core part of the PR. Additionally, removing the mandatory lint check in .asf.yaml without adding the new GitHub Actions check name reduces CI enforcement. In pyproject.toml, the new dependency-groups section is redundant as pre-commit is already defined in optional-dependencies. Please ensure the GHA workflow is included and the status checks are correctly updated.
b601a48 to
6724aa5
Compare
This PR adds a GitHub Actions workflow that runs pre-commit hooks and removes the need on jenkins to do lint
6724aa5 to
c4d955b
Compare
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
Mirror the TVM setup (apache/tvm#18809): a minimal GHA workflow that runs `uv sync --group lint` plus `pre-commit/action`. Pre-commit is rewritten around ruff (check + format), replacing the previous isort/black/mypy/pylint/cmake-format stack, and gains yamllint, taplo, check-yaml, and check-toml. The corresponding Jenkins Lint stage, the ci/task/{isort,black,mypy,pylint,clang-format}.sh scripts, and .pylintrc are removed. pyproject.toml grows a [tool.ruff] section (select E/F/I/UP/RUF, line-length 100, py39 target) and a [dependency-groups] lint entry; the stale isort/black/mypy/pylint tool tables are dropped. To get the codebase green under the new ruler, existing UP006/UP035/ UP045/E501/RUF001/RUF002/E402/F821 violations are grandfathered via inline `# noqa`, so new code in those forms is still flagged. Real issues surfaced by the new rules are fixed directly: E741 renames (ambiguous `l`/`O`), F841 unused locals, E722 bare `except`, RUF012 ClassVar annotations for mutable class defaults, RUF013 explicit `Optional[...]`, and RUF005 iterable unpacking. With pylint and mypy gone from CI, this also strips all `# pylint: disable/enable` and `# type: ignore` directives from Python sources (PEP 484 `# type: <expr>` comments and `# fmt: off/on` are preserved), and runs the resulting files through ruff-format.
This PR adds a GitHub Actions workflow that runs pre-commit hooks and removes the need on jenkins to do lint