Coding Style Guide

Here you find an overview of our coding conventions and style guide.

Also have a look at our Contribution Guidelines.

Semantic Versioning

Release names are defined according to the SemVer 2.0.0 versioning scheme.

Semantic versioning of releases in CI/CD Pipelines

The chosen git tag will be the release name and the version of the Docker Image. Therefore the pipeline script will enforce it to conform to Semantic Versioning 2.0.0.

Keep a Changelog

For changelogs we use the format suggested by Keep a Changelog. Try to follow best practices when writing the changelog. But remember, changelogs are for humans. So do apply best practices when compiling your changelog.

The general AURA changelog is located in CHANGELOG.md.

Additionally, all individual service repositories hold their own changelog file. At each release they are bundled in the aura/changelog directory.

When writing changelogs think about to

  • Use Breaking: prefixes to indicate breaking changes.

  • Use Known Issue: prefix to indicate a known problem and point to a workaround, if available.

  • Avoid multi-line statements which include line-breaks. This breaks the release script.

  • Clarity over quantity, because changelogs are for humans.

Changelogs are for humans!

Avoid any technical details on internals. But documenting API or CLI changes are okay. Try to read it from a end-user perspective. Learn more at keepachangelog.com.

git

  • We use GitHub Flow

  • Keep the main branch stable, as releases are derived from it. When contributing a breaking change, like API changes, inform the team about the intended merge.

  • When contributing code, create a Merge Request, and assign the repository maintainer for review. Do not squash commits when performing the merge.

  • We write changelogs in the keep a changelog format. Remind yourself to update the CHANGELOG.md before committing code. Remember that changelogs are meant for humans and should reflect the end-user value. When doing a release we use the changelog as our Release Notes. When providing code via a Merge Request the maintainer will remind you to update the changelog too :-)

  • Avoid crunching commits and rebasing; set git config pull.rebase false to use recursive as your default merge strategy

  • We use conventional commits

  • Mention related ticket IDs where applicable, like #123 or play#123 when cross-referencing between repositories. For example you can close tickets by using closes #123.

  • Use atomic commits

Code

Python

We use Black with default settings, enforced by Flake8.

We use the default settings, except for a maximal line-length of 99 characters. If you are using a Black IDE integration, think about adapting its settings.

For code documentation we use the Flake8 Docstrings extension with Google-style formatting enabled (docstring-convention=google).

ECMAScript and TypeScript

We use ESLint as the common Linter. When your code is based on VueJS or Svelte, install the official IDE extensions. These extensions provide additional style checks and auto-formatting options.

API

We use OpenAPI 3 specs to describe our APIs. Learn more in the Developer Guide > API chapter and find the detailed OpenAPI 3 specs at api.aura.radio.

Testing

When providing new features or refactoring code, please provide test cases. We do not expect 100% test coverage but are aiming for having the most important usage scenarios covered by automated CI/CD test suites.

Documentation

The general documentation is located in aura/docs and hosted at docs.aura.radio. When working on any component, also search for relevant parts of the documentation that may need to be updated or extended.