Updated 2015.next.json to use new capabilities
The capabilities classifications were updated to have a more defined breakdown of the capabilities. This patch takes all of the existing tests in the 2015.05.next file and reclassifies them. No tests were added or removed. Patch includes scripts and supporting files for review, updating, and collaboration. Also added auth-token as required for compute. Please review if auth-token should be required for object. Remove temp files before merging. Work in progress Change-Id: Ie3a77c443f30327606ba62832cb6bea2d3ada14e
This commit is contained in:
parent
cde9afa8de
commit
f68840ea1c
2114
2015.next.json
2114
2015.next.json
File diff suppressed because it is too large
Load Diff
6942
newcaps.json
Normal file
6942
newcaps.json
Normal file
File diff suppressed because it is too large
Load Diff
59
organize.py
Normal file
59
organize.py
Normal file
@ -0,0 +1,59 @@
|
||||
import json
|
||||
|
||||
defcore = json.loads(open('2015.next.json','r').read())
|
||||
new_caps = json.loads(open('newcaps.json','r').read())
|
||||
|
||||
capabilities = {}
|
||||
|
||||
old_capabilities = defcore["capabilities"]
|
||||
for old_capability in old_capabilities:
|
||||
old_capability = old_capabilities[old_capability]
|
||||
achievements = old_capability["achievements"]
|
||||
admin = old_capability["admin"]
|
||||
try:
|
||||
required_since = old_capability["required-since"]
|
||||
except:
|
||||
required_since = ""
|
||||
description = old_capability["description"]
|
||||
name = old_capability["name"]
|
||||
try:
|
||||
project = old_capability["project"]
|
||||
except:
|
||||
project = "TODO"
|
||||
|
||||
tests = old_capability["tests"]
|
||||
for test in tests:
|
||||
try:
|
||||
flag = old_capability["tests"][test]["flag"]
|
||||
except:
|
||||
flag = None
|
||||
new_capability_name = new_caps[test]["capability"]
|
||||
|
||||
try:
|
||||
capability = capabilities[new_capability_name]
|
||||
except:
|
||||
capability = {}
|
||||
capability["achievements"] = set()
|
||||
capability["admin"] = set()
|
||||
capability["required-since"] = set()
|
||||
capability["description"] = set()
|
||||
capability["project"] = set()
|
||||
capability["tests"] = {}
|
||||
|
||||
for achievement in achievements:
|
||||
capability["achievements"].add(achievement)
|
||||
capability["admin"].add(str(admin))
|
||||
capability["required-since"].add(required_since)
|
||||
capability["description"].add(description)
|
||||
capability["project"].add(project)
|
||||
capability["tests"][test] = tests[test]
|
||||
capabilities[new_capability_name] = capability
|
||||
|
||||
for capability in capabilities:
|
||||
cap = capabilities[capability]
|
||||
cap["achievements"] = list(cap["achievements"])
|
||||
cap["admin"] = ", ".join(cap["admin"])
|
||||
cap["required-since"] = ", ".join(cap["required-since"])
|
||||
cap["description"] = ", ".join(cap["description"])
|
||||
cap["project"] = ", ".join(cap["project"])
|
||||
print json.dumps(capabilities, sort_keys=True, indent=2, separators=(',', ': '))
|
Loading…
x
Reference in New Issue
Block a user