Skip to content

Commit 9863490

Browse files
author
Benedikt Ehinger
committed
added simulation for adding a new subject and rerunning lslautobids
1 parent 174e89c commit 9863490

File tree

8 files changed

+17
-1
lines changed

8 files changed

+17
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jsonschema
77
.DS_Store
88
empty_log_process_temp.py
99

10+
tests/**/bids/
11+
1012
# Byte-compiled / optimized / DLL files
1113
__pycache__/
1214
*.py[cod]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
time event what
2+
00:00 cap size selection
3+
00:00 camera working y/n
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
id age gender handedness dom_eye no_preex_conditions visual_acuity_test remarks
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"acc","accuracy","average_response_time","avg_rt","background","block_size","canvas_backend","clock_backend","coco_id","color_backend","correct","correct_instructions_sketchpad","correct_keyboard_response","correct_manual_pause_end_kbd","correct_manual_pause_kbd","correct_start_practice_trials_info","correct_welcome","count_PressSpacebar","count_block_sequence","count_break_sequence","count_break_sketchpad","count_end_of_exp","count_end_of_practice","count_endofinstructions","count_endofpractice","count_experiment","count_fixation1_sketchpad","count_fixation_jittered","count_fixation_loop","count_fixation_sequence","count_general_setup","count_getting_started","count_instructions","count_instructions_sketchpad","count_keyboard_response","count_log_all_variables","count_main_loop","count_manual_calibrate","count_manual_pause_end","count_manual_pause_end_kbd","count_manual_pause_kbd","count_manual_pause_start","count_new_1_form_text_display","count_new_1_inline_script","count_new_1_sketchpad","count_new_2_inline_script","count_new_2_sequence","count_new_3_inline_script","count_new_4_inline_script","count_new_5_inline_script","count_new_6_inline_script","count_new_7_inline_script","count_new_advanced_delay","count_new_feedback","count_new_form_text_display","count_new_inline_script","count_new_loop","count_new_pygaze_init","count_new_pygaze_log","count_new_pygaze_start_recording","count_new_pygaze_stop_recording","count_new_reset_feedback","count_new_sequence","count_practiceinstructions","count_practiceloop","count_priliminaryinstructions","count_send_trigger_breakend","count_send_trigger_breakstart","count_send_trigger_end_practice","count_send_trigger_end_stimulus","count_send_trigger_manual_pause_end","count_send_trigger_manual_pause_start","count_send_trigger_start_stimulus","count_setup","count_start_practice_trials_info","count_stimuli","count_stimulus_sequence","count_trial_sequence","count_trigger_setup","count_wait_for_centre_gaze","count_welcome","current_block_no","delay_new_advanced_delay","description","disable_garbage_collection","duration","empty_column","exp_imgdetails_file_name","experiment_file","experiment_path","file_name","file_path_coco_dataset","fixated","font_bold","font_family","font_italic","font_size","font_underline","foreground","form_clicks","fullscreen","gaze_timeout","height","keyboard_backend","license","live_row","live_row_practiceloop","logfile","mouse_backend","n_practicetrials","opensesame_codename","opensesame_version","psychopy_screen","repeat_cycle","response","response_break_sketchpad","response_end_of_exp","response_end_of_practice","response_instructions_sketchpad","response_keyboard_response","response_manual_pause_end_kbd","response_manual_pause_kbd","response_new_1_sketchpad","response_new_feedback","response_start_practice_trials_info","response_time","response_time_break_sketchpad","response_time_end_of_exp","response_time_end_of_practice","response_time_instructions_sketchpad","response_time_keyboard_response","response_time_manual_pause_end_kbd","response_time_manual_pause_kbd","response_time_new_1_sketchpad","response_time_new_feedback","response_time_start_practice_trials_info","response_time_welcome","response_welcome","round_decimals","sampler_backend","sound_buf_size","sound_channels","sound_freq","sound_sample_size","start","subject_nr","subject_parity","time_PressSpacebar","time_block_sequence","time_break_sequence","time_break_sketchpad","time_end_of_exp","time_end_of_practice","time_endofinstructions","time_endofpractice","time_experiment","time_fixation1_sketchpad","time_fixation_jittered","time_fixation_loop","time_fixation_sequence","time_general_setup","time_getting_started","time_instructions","time_instructions_sketchpad","time_keyboard_response","time_log_all_variables","time_main_loop","time_manual_calibrate","time_manual_pause_end","time_manual_pause_end_kbd","time_manual_pause_kbd","time_manual_pause_start","time_new_1_form_text_display","time_new_1_inline_script","time_new_1_sketchpad","time_new_2_inline_script","time_new_2_sequence","time_new_3_inline_script","time_new_4_inline_script","time_new_5_inline_script","time_new_6_inline_script","time_new_7_inline_script","time_new_advanced_delay","time_new_feedback","time_new_form_text_display","time_new_inline_script","time_new_loop","time_new_pygaze_init","time_new_pygaze_log","time_new_pygaze_start_recording","time_new_pygaze_stop_recording","time_new_reset_feedback","time_new_sequence","time_practiceinstructions","time_practiceloop","time_priliminaryinstructions","time_send_trigger_breakend","time_send_trigger_breakstart","time_send_trigger_end_practice","time_send_trigger_end_stimulus","time_send_trigger_manual_pause_end","time_send_trigger_manual_pause_start","time_send_trigger_start_stimulus","time_setup","time_start_practice_trials_info","time_stimuli","time_stimulus_sequence","time_trial_sequence","time_trigger_setup","time_wait_for_centre_gaze","time_welcome","title","tolerance","total_blocks","total_correct","total_response_time","total_responses","total_trials","width"
2+
"undefined","undefined","810","810","#808080","50","psycho","psycho","304187","psycho","undefined","undefined","undefined","NA","NA","undefined","undefined","0","-3","0","0","0","0","NA","NA","0","0","NA","NA","0","0","NA","0","0","0","0","0","1","0","0","0","0","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","0","NA","NA","NA","NA","0","NA","0","0","NA","NA","NA","0","NA","0","0","0","0","0","0","0","0","0","0","0","NA","0","0","0","1","419","The main experiment item","False","650","NA","projects/2024FreeViewingMSCOCO/assets/images/experiment_images_info.csv","free_viewing_experiment.osexp","/home/stimulus/projects/2024FreeViewingMSCOCO/experiment","000000304187_MEG_size.jpg","/scratch/data/coco/coco-2017/train/data/000000304187.jpg","False","False","mono","False","18","no","white","no","yes","5000","1080","psycho","Attribution License","0","0","/home/stimulus/projects/2024FreeViewingMSCOCO/data/sub-099/ses-001/beh/subject-99.csv","psycho","3","Melodramatic Milgram","4.0.13","1","0","space","NA","NA","NA","space","space","NA","NA","NA","NA","space","810.305118560791","NA","NA","NA","588.4740352630615","810.305118560791","NA","NA","NA","NA","398.3440399169922","1945.7039833068848","space","2","psycho","1024","2","48000","-16","experiment","99","odd","14410.46404838562","14407.202959060669","NA","NA","NA","NA","NA","NA","1086.3871574401855","15227.399110794067","NA","NA","14407.315015792847","1647.9620933532715","NA","11160.964012145996","13112.376928329468","14410.552978515625","21306.498050689697","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","15885.131120681763","NA","NA","NA","NA","1086.4861011505127","NA","14100.979089736938","NA","NA","NA","NA","14311.726093292236","NA","NA","NA","NA","21306.37001991272","NA","NA","16304.228067398071","1086.4551067352295","13702.502012252808","16306.323051452637","15885.082006454468","NA","1643.4519290924072","15227.437973022461","11163.213014602661","free_viewing_experiment","44","8","0","810.305118560791","1","400","1920"
3+
"undefined","undefined","671","671","#808080","50","psycho","psycho","303436","psycho","undefined","undefined","undefined","NA","NA","undefined","undefined","1","-2","1","1","0","0","NA","NA","0","1","NA","NA","1","0","NA","0","0","1","1","0","2","1","1","1","1","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","1","NA","NA","NA","NA","0","NA","0","0","NA","NA","NA","0","NA","1","1","0","1","1","1","1","0","0","1","1","NA","0","1","0","1","389","The main experiment item","False","650","NA","projects/2024FreeViewingMSCOCO/assets/images/experiment_images_info.csv","free_viewing_experiment.osexp","/home/stimulus/projects/2024FreeViewingMSCOCO/experiment","000000303436_MEG_size.jpg","/scratch/data/coco/coco-2017/train/data/000000303436.jpg","False","False","mono","False","18","no","white","no","yes","5000","1080","psycho","Attribution-NonCommercial-NoDerivs License","1","1","/home/stimulus/projects/2024FreeViewingMSCOCO/data/sub-099/ses-001/beh/subject-99.csv","psycho","3","Melodramatic Milgram","4.0.13","1","0","space","NA","NA","NA","space","space","NA","NA","NA","NA","space","533.376932144165","NA","NA","NA","588.4740352630615","533.376932144165","NA","NA","NA","NA","398.3440399169922","1945.7039833068848","space","2","psycho","1024","2","48000","-16","experiment","99","odd","21415.446996688843","21412.346124649048","NA","NA","NA","NA","NA","NA","1086.3871574401855","21951.735019683838","NA","NA","21412.39595413208","1647.9620933532715","NA","11160.964012145996","13112.376928329468","21415.497064590454","28000.17809867859","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","22608.845949172974","NA","NA","NA","NA","1086.4861011505127","NA","14100.979089736938","NA","NA","NA","NA","14311.726093292236","NA","NA","NA","NA","28000.051975250244","NA","NA","22997.878074645996","1086.4551067352295","13702.502012252808","22999.948978424072","22608.808040618896","NA","1643.4519290924072","21951.760053634644","11163.213014602661","free_viewing_experiment","44","8","0","1343.682050704956","2","400","1920"
4+
"undefined","undefined","640","640","#808080","50","psycho","psycho","222921","psycho","undefined","undefined","undefined","NA","NA","undefined","undefined","2","-1","2","2","0","0","NA","NA","0","2","NA","NA","2","0","NA","0","0","2","2","0","3","2","2","2","2","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","2","NA","NA","NA","NA","0","NA","0","0","NA","NA","NA","0","NA","2","2","0","2","2","2","2","0","0","2","2","NA","0","2","0","1","375","The main experiment item","False","650","NA","projects/2024FreeViewingMSCOCO/assets/images/experiment_images_info.csv","free_viewing_experiment.osexp","/home/stimulus/projects/2024FreeViewingMSCOCO/experiment","000000222921_MEG_size.jpg","/scratch/data/coco/coco-2017/train/data/000000222921.jpg","False","False","mono","False","18","no","white","no","yes","5000","1080","psycho","Attribution-NonCommercial License","2","2","/home/stimulus/projects/2024FreeViewingMSCOCO/data/sub-099/ses-001/beh/subject-99.csv","psycho","3","Melodramatic Milgram","4.0.13","1","0","space","NA","NA","NA","space","space","NA","NA","NA","NA","space","576.591968536377","NA","NA","NA","588.4740352630615","576.591968536377","NA","NA","NA","NA","398.3440399169922","1945.7039833068848","space","2","psycho","1024","2","48000","-16","experiment","99","odd","28108.245134353638","28105.04913330078","NA","NA","NA","NA","NA","NA","1086.3871574401855","28687.549114227295","NA","NA","28105.098962783813","1647.9620933532715","NA","11160.964012145996","13112.376928329468","28108.291149139404","34722.15914726257","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","29344.93613243103","NA","NA","NA","NA","1086.4861011505127","NA","14100.979089736938","NA","NA","NA","NA","14311.726093292236","NA","NA","NA","NA","34722.04303741455","NA","NA","29719.972133636475","1086.4551067352295","13702.502012252808","29721.93193435669","29344.89893913269","NA","1643.4519290924072","28687.572956085205","11163.213014602661","free_viewing_experiment","44","8","0","1920.274019241333","3","400","1920"

tests/testcases/test_main_functionality/test_main_functionality.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import sys
33
import pytest
44
import yaml
5-
5+
import shutil
66

77
# Compute project root (two levels up from current test.py)
88
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
@@ -93,6 +93,11 @@ def test_process_new_files_with_old_suffix(setup_project, monkeypatch):
9393
from lslautobids.main import main as runlslautobids
9494
#with pytest.raises(SystemExit, match="Duplicate file detected. Please check the file manually."):
9595
runlslautobids()
96+
97+
# add a subject
98+
shutil.copytree(os.path.join(paths["project_root"], "copy_later","sub-100"), os.path.join(paths["project_root"], project_name,"sub-100"))
99+
100+
runlslautobids()
96101

97102

98103

0 commit comments

Comments
 (0)