Skip to content

Commit

Permalink
BUG: fix json key and values
Browse files Browse the repository at this point in the history
  • Loading branch information
jungheejung committed Sep 3, 2024
1 parent 6bb99ca commit 9463972
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions spacetop_prep/datalad/update_scanstsv_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
subprocess.run(["git", "annex", "unlock", file])
with open(file, 'r+') as f:
data = json.load(f)
data["task-social_runtype"] = "Runtype of task-social runs. Options: ['pain', 'vicarious', 'cognitive']"
data["task-social_runtype"] = {
"LongName": "Runtype of task-social runs",
"Description": "Runtype of task-social runs. Options: ['pain', 'vicarious', 'cognitive']"
}
f.seek(0)
json.dump(data, f, indent=4)
f.truncate()
Expand All @@ -31,8 +34,13 @@
subprocess.run(["git", "annex", "unlock", file])
with open(file, 'r+') as f:
data = json.load(f)
data["task-social_runtype"] = "Runtype of task-social runs. Options: ['pain', 'vicarious', 'cognitive']"
data["task-fractional_runtype"] = "Runtype of task-fractional runs. Options: ['tomsaxe', 'tomspunt', 'memory', 'posner']"
data["task-social_runtype"] = data["task-social_runtype"] = {
"LongName": "Runtype of task-social runs",
"Description": "Runtype of task-social runs. Options: ['pain', 'vicarious', 'cognitive']"
}
data["task-fractional_runtype"] = {
"LongName": "Runtype of task-social runs",
"Description": "Runtype of task-fractional runs. Options: ['tomsaxe', 'tomspunt', 'memory', 'posner']"}
f.seek(0)
json.dump(data, f, indent=4)
f.truncate()
Expand Down

0 comments on commit 9463972

Please sign in to comment.