Skip to content
This repository was archived by the owner on Sep 1, 2026. It is now read-only.

Coding Standard

Antoni Ivanov edited this page Feb 10, 2022 · 41 revisions

⚠️ In progress

We aim for:

VDK coding styles aim for code style and formatting consistent across its components. The value of consistency is enabling automated formatting, avoiding back and forth reformatting, and making the code easy to read for all team members.

REST API and Services

TODO ideas: https://opensource.zalando.com/restful-api-guidelines/#100

We follow 12 factor app recommendation for building web/api services.

Java

TODO: maybe https://google.github.io/styleguide/javaguide.html

Python

The coding standard is the Python regular PEP 8. It's enforced by pre-commit hooks like black

Clarification on access modifiers in python

Python uses _ (underscore) symbol to determine the access control for a specific data member or a member function of a class

  • Public methods have not underscore prefix
  • Protected methods or attributes have single underscore as prefix - for example _execute_protected()
  • Private methods or attributes have double underscore as prefix - for example __execute_private()

Public Python interfaces

Any backwards compatibility guarantees apply only to public interfaces. Public interfaces are modules and packages defined or imported in vdk.api.*. unless the documentation explicitly declares them to be provisional or internal interfaces. Anything else is considered internal. All public interfaces (classes or methods) must have documentation.

CLI (Command Line interfaces)

CLI is built following 12 Factor CLI Apps

Clone this wiki locally