-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathformat_updater.py
More file actions
31 lines (28 loc) · 872 Bytes
/
format_updater.py
File metadata and controls
31 lines (28 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import json
x = open("meta-data.json")
contents = json.load(x)
x.close()
for entry in contents:
entry["src"] = {
"root_abspath": "/experiment/hippodrome/{subject}/{bug_id}/src".format(
subject=entry["subject"], bug_id=entry["bug_id"]
),
"entrypoint": {
# "file": entry["source_file"]
# if entry.get("language", "_") != "java"
# else (
# (
# "src/main/java/"
# if "src/main/java/" not in entry["source_file"]
# else ""
# )
# + entry["source_file"][:-5].replace(".", "/")
# + ".java"
# ),
# "function": "main",
},
}
entry["output_dir_abspath"] = "/output"
y = open("meta-data.candidate.json", "w")
json.dump(contents, y)
y.close()