import path_setup # noqa: F401 — adds project root to sys.path
import json
import uuid
with open('data/firstaidqa_v1.json', 'r') as file:
data = json.load(file)
for item in data:
item['id'] = str(uuid.uuid4())
with open('data/firstaidqa_v1-first-half.json', 'w') as outfile:
json.dump(data[0:len(data) // 2], outfile, indent=4)