sweetbean.stimulus_spec.io
IO helpers: build declarative SweetBean trials from JSON + CSV.
build_html_from_files(spec_json_path, timeline_csv_path, out_html_path)
Compile and write a runnable jsPsych HTML from declarative files.
Source code in sweetbean/stimulus_spec/io.py
108 109 110 111 112 113 114 115 116 117 118 119 | |
load_spec_library(path)
Load reusable trial-spec templates from JSON file.
Source code in sweetbean/stimulus_spec/io.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
load_timeline_rows(path)
Load timeline rows from CSV.
Required column: spec_id
Source code in sweetbean/stimulus_spec/io.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
trial_specs_from_files(spec_json_path, timeline_csv_path)
Materialize validated TrialSpec list from JSON templates + timeline CSV.
Source code in sweetbean/stimulus_spec/io.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
write_prompt_schema_markdown(out_path, *, verbosity=1)
Generate and write markdown docs for Trial/Stimulus/Response specs.
Source code in sweetbean/stimulus_spec/io.py
122 123 124 125 126 127 128 129 130 131 | |