Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quality scale #92

Merged
merged 8 commits into from
Sep 26, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions docs/integration_quality_scale_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "Integration Quality Scale"
sidebar_label: "Introduction"
---

The Integration Quality Scale scores each integration based on the code quality and user experience. Each level of the quality scale consists of a list of requirements. If an integration matches all requirements, it's considered that level.

> Suggestions for changes can be done by creating an issue in the [architecture repo](https://github.com/home-assistant/architecture/issues/).

# No score

This integration passes the bare minimum requirements to become part of the index.

- Satisfy all requirements for [creating components](creating_component_code_review.md) and [creating platforms](creating_platform_code_review.md).
- Configurable via `configuration.yaml`

# Silver 🥈

This integration is able to cope when things go wrong. It will not print any exceptions not will it fill the log with retry attempts.

- Set an appropriate `SCAN_INTERVAL` (if a polling integration)
- Raise `PlatformNotReady` if unable to connect during setup (if appropriate)
- Handles expiration of auth credentials. Refresh if possible or print correct error and fail setup. If based on a config entry, should trigger a new config entry flow to re-authorize.
- Handles internet unavailable. Log a warning once when unavailable, log once when reconnected.
- Handles device/service unavailable. Log a warning once when unavailable, log once when reconnected.
- Set unavailable property to False if appropriate ([docs](entity_index.md#generic-properties))
- Entities have unique ID (if available) ([docs](entity_registry_index.md#unique-id-requirements))

# Gold 🥇

This is a solid integration that is able to survive poor conditions and can be configured via the user interface.

- Configurable via config entries
- Creating a config entry should make sure that there are no other config entries for the same device.
- Discoverable (if available)
- Entities have device info (if available) ([docs](device_registry_index.md#defining-devices))
- States are translated in the frontend ([docs](internationalization_index.md))
- Tests ([docs](development_testing.md))
- Has a code owner

# Platinum 🎖

Best of the best. The integration is completely async, meaning it's super fast. Integrations that reach expert level will require the code owner approval for each PR.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integrations that reach platinum level will require approval by the code owner for each new PR.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also require some SLA from the owner?


- Set appropriate `PARALLEL_UPDATES` constant
- Support config entry unloading (called when config entry is removed)
- Integration + dependency are async
- Uses aiohttp and allows passing in websession (if making HTTP requests)
Loading