alibi icon indicating copy to clipboard operation
alibi copied to clipboard

More advanced linting to make PR checking more automated

Open jklaise opened this issue 2 years ago • 0 comments

The recent PR checklist outlines what to check before a PR is considered complete, however, a portion of these are mundane checks that can be automated with existing tools, in particular using some flake8 plugins. For example:

  • https://github.com/sco1/flake8-annotations (detect absence of type hints)
  • https://gitlab.com/pycqa/flake8-docstrings (check docstrings are present)
  • https://github.com/PyCQA/flake8-bugbear (additional code correctness checks - running it on alibi revealed a few minor bugs!)
  • https://github.com/terrencepreilly/darglint (Python docstring linter for checking that the docstring matches the definition)
  • https://github.com/PyCQA/flake8-import-order (check import order follows a style guide)
  • https://github.com/PyCQA/pep8-naming (PEP8 naming convention checker)

Not all the plugins are necessarily required and the adoption can be gradual (e.g. running flake8-annotations and figuring out the most appropriate configuration to go in setup.cfg in one PR before tackling others).

Same applies to Alibi Detect.

jklaise avatar Aug 23 '21 13:08 jklaise