Commit 874797e8 authored by José Henrique's avatar José Henrique
Browse files

Add repositories param

parent 9b256146
......@@ -7,7 +7,8 @@ import operator
os.chdir('official_devices')
SUGGESTIONS = []
ALLOWED_VERSIONS = ['eleven', 'eleven_plus', 'ten', 'ten_plus', 'pie', 'pie_plus']
REQUIRED_PARAMS_DEVICE = ['name', 'brand', 'codename', 'supported_versions']
REQUIRED_PARAMS_DEVICE = ['name', 'brand', 'codename', 'supported_versions', 'repositories']
REQUIRED_PARAMS_DEVICE_LIST = ['supported_versions', 'repositories']
REQUIRED_PARAMS_TEAM_MEMBER = ['name', 'country', 'github_username', 'devices', 'ci_username']
REQUIRED_PARAMS_TEAM_MEMBER_DEVICE = ['codename', 'versions']
......@@ -32,7 +33,12 @@ def test_integrity_devices():
SUGGESTIONS.append(
f"images/{codename}.png not found for codename {codename} in devices.json and device index value {device_index}")
if 'supported_versions' in device:
for param in REQUIRED_PARAMS_DEVICE_LIST:
if not isinstance(device[param], list):
SUGGESTIONS.append(
f"'{param}' key is not a valid param in devices.json for device index value {device_index}")
if isinstance(device["supported_versions"], list):
supported_versions = device['supported_versions']
for supported_version in supported_versions:
version_index = supported_versions.index(supported_version)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment