Code Quality Guidelines
Code formatting / style
Black
TMC Mid uses the black code formatter to format its code. Formatting can be checked using the command make python-format.
The CI pipeline checks whether the code has been formatted with Black.
Linting
The TMC integration repository uses the following libraries and utilities for
linting. Run make python-lint to check the code.
isort- It provides a command line utility, Python library and plugins for various editors to quickly sort all your imports.black- It checks whether the code is formatted with Black.flake8- It checks the codebase against coding style (PEP 8) and detects programming errors such as unused imports and undefined names.pylint- It looks for programming errors, helps enforce coding standards, detects code smells, and offers simple refactoring suggestions.
Test coverage
TMC Mid uses pytest to test its code, with the pytest-cov plugin for measuring the code coverage.