Pyicub Coding Standards
To maintain quality, readability, and collaboration across the pyicub codebase, all development must follow recognized standards.
Python
Follow the official PEP8 guidelines.
Static analysis with
flake8andmypyis required.Naming conventions:
Modules and files:
lowercase_with_underscoresClasses:
CamelCaseFunctions and variables:
lowercase_with_underscoresConstants:
UPPERCASE_WITH_UNDERSCORES
Use type annotations where meaningful.
Keep imports organized: standard libraries, third-party, then local imports.
Limit function complexity: prefer small, focused functions.
Bash
Follow Google’s Shell Style Guide.
Scripts must start with:
#!/usr/bin/env bashAlways quote variables:
"${var}"Ensure portability across Linux environments.
Write functions for repeated logic; avoid duplication.
General
Keep code simple, modular, and documented.
Prioritize readability over cleverness.
Every file must contain a short module-level docstring if applicable.