Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
7.24k stars 955 forks source link

Significant pre-commit/CI improvements #1495

Closed dokterbob closed 2 weeks ago

dokterbob commented 3 weeks ago

To "End The Suffering" of "Endless Spinning Pizza" as punishment for merely rolling a commit, hereby the following proposed improvements to pre-commit hooks and CI:

  1. Replace isort and black with ruff (x20 performance!) in pre-commit hook.
  2. Add ruff as linter in pre-commit hook.
  3. Use dmypy (mypy deamon) for much faster repeated Python linting.
  4. Only call Python linter when actual Python files changed (using `lint-staged).
  5. Enable ruff linting and formatting checks in CI.
  6. Enable linting for GitHub Actions (requires additional install of https://github.com/rhysd/actionlint).
  7. Bump husky and mypy to latest versions.

After this ticket, towards the future, I would like to propose: