Skip to content

Commit b2f6057

Browse files
committed
fixed minor typos
1 parent df340a8 commit b2f6057

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

lslautobids/dataverse_dataset_create.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def create_dataverse(project_name):
6363
toml_path = os.path.join(project_root,project_name,project_name+'_config.toml')
6464

6565
data = read_toml_file(toml_path)
66-
pid = data['Dataverse']['pid']
66+
pid = data['DataverseDataset']['pid']
6767

6868
if pid.lower() in pids_resp1:
6969
flag=1
@@ -72,8 +72,9 @@ def create_dataverse(project_name):
7272
else:
7373
logger.info('Creating the dataset........')
7474
resp = api.create_dataset(parent_dataverse_name, ds.json())
75+
logger.info(f"Full response: {resp.json()}")
7576
logger.info(f"Dataset created with PID: {resp.json()['data']['persistentId']}")
76-
77+
7778
# Modify field
7879
data['DataverseDataset']['title']=ds_title
7980
data['DataverseDataset']['pid']= resp.json()['data']['persistentId']

lslautobids/gen_project_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
toml_content = """
88
# This is the project configuration file - This configuration can be customized for each project
99
10-
# The authors info field will have information about the creators of the dataset
1110
[AuthorsInfo]
1211
authors = "John Doe, Lina Doe" # List of authors separated by commas
1312
affiliation = "University of Stuttgart, University of Stuttgart" # Affiliation of the authors in the same order as authors
@@ -25,8 +24,9 @@
2524
expectedStimFiles = [".edf", ".csv", "_labnotebook.tsv", "_participantform.tsv"] # List of expected stimulus file extensions. Only the expected files will be copied to the beh folder in BIDS dataset. Give an empty list [] if you don't want any stimulus files to be in the dataset. In this case only experiment files will be zipeed and copied to the misc folder in BIDS dataset.
2625
2726
[SubjectInfo]
28-
ignoreSubjects = ['sub-999'] # List of subjects to ignore during the conversion - Leave empty to include all subjects. Changing this value will not delete already existing subjects.
29-
excludeTasks = ['freeviewing'] # List of tasks to exclude from the conversion for all subjects - Leave empty to include all tasks. Changing this value will not delete already existing tasks.
27+
ignoreSubjects = ['sub-777'] # List of subjects to ignore during the conversion - Leave empty to include all subjects. Changing this value will not delete already existing subjects.
28+
allTasks = [] # List of all possible tasks in the dataset. This will automatically be updated when new tasks are found during the conversion.
29+
excludeTasks = ['sampletask'] # List of tasks to exclude from the conversion for all subjects - Leave empty to include all tasks. Changing this value will not delete already existing tasks.
3030
anonymizationNumber = 123 # This is an anomization number that will be added to the recording date of all subjects.
3131
3232
"""

lslautobids/processing_new_files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ def process_new_files(file_status: List[str],logger) -> None:
4949
toml_path = os.path.join(project_path, project_name + '_config.toml')
5050
data = read_toml_file(toml_path)
5151

52-
existing_tasks = set(data.get('Tasks', {}).get('tasks', []))
52+
existing_tasks = set(data.get('SubjectInfo', {}).get('allTasks', []))
5353

5454
# Add only new tasks
5555
updated_tasks = list(existing_tasks.union(tasks))
5656

5757
# Save updated task list back to the config
58-
data['Tasks']['tasks'] = updated_tasks
58+
data['SubjectInfo']['allTasks'] = updated_tasks
5959
write_toml_file(toml_path, data)
6060

6161
# User prompt asking if we want to proceed to convert and upload

0 commit comments

Comments
 (0)