Code quality and style - cma-open/cmatools GitHub Wiki

Standards and process

Automation and pre-commits

  • The project uses pre-commits to automatically format code style and format
  • The following packages and configurations are used
    • pre-commit: configured via the .pre-commit-config.yaml file
    • black: code style and formatting tool
    • isort: sorts imports alphabetically, and automatically separates into sections and by type. Configured via pyproject.toml
    • flake8: code linter to check for syntax errors, possible bugs, stylistic errors

Maintenance

  • The code formatters require regular checks to update the tool vesions as upgrades are released