bead 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (575) hide show
  1. bead-0.1.0/.bash_setup +25 -0
  2. bead-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +78 -0
  3. bead-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  4. bead-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +70 -0
  5. bead-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +40 -0
  6. bead-0.1.0/.github/workflows/ci.yml +242 -0
  7. bead-0.1.0/.github/workflows/docs.yml +53 -0
  8. bead-0.1.0/.github/workflows/publish.yml +70 -0
  9. bead-0.1.0/.gitignore +37 -0
  10. bead-0.1.0/.pre-commit-config.yaml +50 -0
  11. bead-0.1.0/.python-version +1 -0
  12. bead-0.1.0/.readthedocs.yml +18 -0
  13. bead-0.1.0/CHANGELOG.md +119 -0
  14. bead-0.1.0/CONTRIBUTING.md +271 -0
  15. bead-0.1.0/LICENSE +21 -0
  16. bead-0.1.0/PKG-INFO +212 -0
  17. bead-0.1.0/README.md +138 -0
  18. bead-0.1.0/bead/__init__.py +11 -0
  19. bead-0.1.0/bead/__main__.py +11 -0
  20. bead-0.1.0/bead/active_learning/__init__.py +15 -0
  21. bead-0.1.0/bead/active_learning/config.py +231 -0
  22. bead-0.1.0/bead/active_learning/loop.py +566 -0
  23. bead-0.1.0/bead/active_learning/models/__init__.py +24 -0
  24. bead-0.1.0/bead/active_learning/models/base.py +852 -0
  25. bead-0.1.0/bead/active_learning/models/binary.py +910 -0
  26. bead-0.1.0/bead/active_learning/models/categorical.py +943 -0
  27. bead-0.1.0/bead/active_learning/models/cloze.py +862 -0
  28. bead-0.1.0/bead/active_learning/models/forced_choice.py +956 -0
  29. bead-0.1.0/bead/active_learning/models/free_text.py +773 -0
  30. bead-0.1.0/bead/active_learning/models/lora.py +365 -0
  31. bead-0.1.0/bead/active_learning/models/magnitude.py +835 -0
  32. bead-0.1.0/bead/active_learning/models/multi_select.py +795 -0
  33. bead-0.1.0/bead/active_learning/models/ordinal_scale.py +811 -0
  34. bead-0.1.0/bead/active_learning/models/peft_adapter.py +155 -0
  35. bead-0.1.0/bead/active_learning/models/random_effects.py +639 -0
  36. bead-0.1.0/bead/active_learning/selection.py +354 -0
  37. bead-0.1.0/bead/active_learning/strategies.py +391 -0
  38. bead-0.1.0/bead/active_learning/trainers/__init__.py +26 -0
  39. bead-0.1.0/bead/active_learning/trainers/base.py +210 -0
  40. bead-0.1.0/bead/active_learning/trainers/data_collator.py +172 -0
  41. bead-0.1.0/bead/active_learning/trainers/dataset_utils.py +261 -0
  42. bead-0.1.0/bead/active_learning/trainers/huggingface.py +304 -0
  43. bead-0.1.0/bead/active_learning/trainers/lightning.py +324 -0
  44. bead-0.1.0/bead/active_learning/trainers/metrics.py +424 -0
  45. bead-0.1.0/bead/active_learning/trainers/mixed_effects.py +551 -0
  46. bead-0.1.0/bead/active_learning/trainers/model_wrapper.py +509 -0
  47. bead-0.1.0/bead/active_learning/trainers/registry.py +104 -0
  48. bead-0.1.0/bead/adapters/__init__.py +11 -0
  49. bead-0.1.0/bead/adapters/huggingface.py +61 -0
  50. bead-0.1.0/bead/behavioral/__init__.py +116 -0
  51. bead-0.1.0/bead/behavioral/analytics.py +646 -0
  52. bead-0.1.0/bead/behavioral/extraction.py +343 -0
  53. bead-0.1.0/bead/behavioral/merging.py +343 -0
  54. bead-0.1.0/bead/cli/__init__.py +11 -0
  55. bead-0.1.0/bead/cli/active_learning.py +513 -0
  56. bead-0.1.0/bead/cli/active_learning_commands.py +779 -0
  57. bead-0.1.0/bead/cli/completion.py +359 -0
  58. bead-0.1.0/bead/cli/config.py +624 -0
  59. bead-0.1.0/bead/cli/constraint_builders.py +286 -0
  60. bead-0.1.0/bead/cli/deployment.py +859 -0
  61. bead-0.1.0/bead/cli/deployment_trials.py +493 -0
  62. bead-0.1.0/bead/cli/deployment_ui.py +332 -0
  63. bead-0.1.0/bead/cli/display.py +378 -0
  64. bead-0.1.0/bead/cli/items.py +960 -0
  65. bead-0.1.0/bead/cli/items_factories.py +776 -0
  66. bead-0.1.0/bead/cli/list_constraints.py +714 -0
  67. bead-0.1.0/bead/cli/lists.py +490 -0
  68. bead-0.1.0/bead/cli/main.py +430 -0
  69. bead-0.1.0/bead/cli/models.py +877 -0
  70. bead-0.1.0/bead/cli/resource_loaders.py +621 -0
  71. bead-0.1.0/bead/cli/resources.py +1036 -0
  72. bead-0.1.0/bead/cli/shell.py +356 -0
  73. bead-0.1.0/bead/cli/simulate.py +840 -0
  74. bead-0.1.0/bead/cli/templates.py +1158 -0
  75. bead-0.1.0/bead/cli/training.py +1080 -0
  76. bead-0.1.0/bead/cli/utils.py +614 -0
  77. bead-0.1.0/bead/cli/workflow.py +1273 -0
  78. bead-0.1.0/bead/config/__init__.py +68 -0
  79. bead-0.1.0/bead/config/active_learning.py +1009 -0
  80. bead-0.1.0/bead/config/config.py +192 -0
  81. bead-0.1.0/bead/config/defaults.py +118 -0
  82. bead-0.1.0/bead/config/deployment.py +217 -0
  83. bead-0.1.0/bead/config/env.py +147 -0
  84. bead-0.1.0/bead/config/item.py +45 -0
  85. bead-0.1.0/bead/config/list.py +193 -0
  86. bead-0.1.0/bead/config/loader.py +149 -0
  87. bead-0.1.0/bead/config/logging.py +42 -0
  88. bead-0.1.0/bead/config/model.py +49 -0
  89. bead-0.1.0/bead/config/paths.py +46 -0
  90. bead-0.1.0/bead/config/profiles.py +320 -0
  91. bead-0.1.0/bead/config/resources.py +47 -0
  92. bead-0.1.0/bead/config/serialization.py +210 -0
  93. bead-0.1.0/bead/config/simulation.py +206 -0
  94. bead-0.1.0/bead/config/template.py +238 -0
  95. bead-0.1.0/bead/config/validation.py +267 -0
  96. bead-0.1.0/bead/data/__init__.py +65 -0
  97. bead-0.1.0/bead/data/base.py +87 -0
  98. bead-0.1.0/bead/data/identifiers.py +97 -0
  99. bead-0.1.0/bead/data/language_codes.py +61 -0
  100. bead-0.1.0/bead/data/metadata.py +270 -0
  101. bead-0.1.0/bead/data/range.py +123 -0
  102. bead-0.1.0/bead/data/repository.py +358 -0
  103. bead-0.1.0/bead/data/serialization.py +249 -0
  104. bead-0.1.0/bead/data/timestamps.py +89 -0
  105. bead-0.1.0/bead/data/validation.py +349 -0
  106. bead-0.1.0/bead/data_collection/__init__.py +11 -0
  107. bead-0.1.0/bead/data_collection/jatos.py +223 -0
  108. bead-0.1.0/bead/data_collection/merger.py +154 -0
  109. bead-0.1.0/bead/data_collection/prolific.py +198 -0
  110. bead-0.1.0/bead/deployment/__init__.py +5 -0
  111. bead-0.1.0/bead/deployment/distribution.py +402 -0
  112. bead-0.1.0/bead/deployment/jatos/__init__.py +1 -0
  113. bead-0.1.0/bead/deployment/jatos/api.py +200 -0
  114. bead-0.1.0/bead/deployment/jatos/exporter.py +210 -0
  115. bead-0.1.0/bead/deployment/jspsych/__init__.py +9 -0
  116. bead-0.1.0/bead/deployment/jspsych/biome.json +44 -0
  117. bead-0.1.0/bead/deployment/jspsych/config.py +411 -0
  118. bead-0.1.0/bead/deployment/jspsych/generator.py +598 -0
  119. bead-0.1.0/bead/deployment/jspsych/package.json +51 -0
  120. bead-0.1.0/bead/deployment/jspsych/pnpm-lock.yaml +2141 -0
  121. bead-0.1.0/bead/deployment/jspsych/randomizer.py +299 -0
  122. bead-0.1.0/bead/deployment/jspsych/src/lib/list-distributor.test.ts +327 -0
  123. bead-0.1.0/bead/deployment/jspsych/src/lib/list-distributor.ts +1282 -0
  124. bead-0.1.0/bead/deployment/jspsych/src/lib/randomizer.test.ts +232 -0
  125. bead-0.1.0/bead/deployment/jspsych/src/lib/randomizer.ts +367 -0
  126. bead-0.1.0/bead/deployment/jspsych/src/plugins/cloze-dropdown.ts +252 -0
  127. bead-0.1.0/bead/deployment/jspsych/src/plugins/forced-choice.ts +265 -0
  128. bead-0.1.0/bead/deployment/jspsych/src/plugins/plugins.test.ts +141 -0
  129. bead-0.1.0/bead/deployment/jspsych/src/plugins/rating.ts +248 -0
  130. bead-0.1.0/bead/deployment/jspsych/src/slopit/index.ts +9 -0
  131. bead-0.1.0/bead/deployment/jspsych/src/types/jatos.d.ts +256 -0
  132. bead-0.1.0/bead/deployment/jspsych/src/types/jspsych.d.ts +228 -0
  133. bead-0.1.0/bead/deployment/jspsych/templates/experiment.css +1 -0
  134. bead-0.1.0/bead/deployment/jspsych/templates/experiment.js.template +289 -0
  135. bead-0.1.0/bead/deployment/jspsych/templates/index.html +51 -0
  136. bead-0.1.0/bead/deployment/jspsych/templates/randomizer.js +241 -0
  137. bead-0.1.0/bead/deployment/jspsych/templates/randomizer.js.template +313 -0
  138. bead-0.1.0/bead/deployment/jspsych/trials.py +723 -0
  139. bead-0.1.0/bead/deployment/jspsych/tsconfig.json +23 -0
  140. bead-0.1.0/bead/deployment/jspsych/tsup.config.ts +30 -0
  141. bead-0.1.0/bead/deployment/jspsych/ui/__init__.py +1 -0
  142. bead-0.1.0/bead/deployment/jspsych/ui/components.py +383 -0
  143. bead-0.1.0/bead/deployment/jspsych/ui/styles.py +411 -0
  144. bead-0.1.0/bead/dsl/__init__.py +80 -0
  145. bead-0.1.0/bead/dsl/ast.py +168 -0
  146. bead-0.1.0/bead/dsl/context.py +178 -0
  147. bead-0.1.0/bead/dsl/errors.py +71 -0
  148. bead-0.1.0/bead/dsl/evaluator.py +570 -0
  149. bead-0.1.0/bead/dsl/grammar.lark +81 -0
  150. bead-0.1.0/bead/dsl/parser.py +231 -0
  151. bead-0.1.0/bead/dsl/stdlib.py +929 -0
  152. bead-0.1.0/bead/evaluation/__init__.py +13 -0
  153. bead-0.1.0/bead/evaluation/convergence.py +485 -0
  154. bead-0.1.0/bead/evaluation/interannotator.py +398 -0
  155. bead-0.1.0/bead/items/__init__.py +40 -0
  156. bead-0.1.0/bead/items/adapters/__init__.py +70 -0
  157. bead-0.1.0/bead/items/adapters/anthropic.py +224 -0
  158. bead-0.1.0/bead/items/adapters/api_utils.py +167 -0
  159. bead-0.1.0/bead/items/adapters/base.py +216 -0
  160. bead-0.1.0/bead/items/adapters/google.py +259 -0
  161. bead-0.1.0/bead/items/adapters/huggingface.py +1074 -0
  162. bead-0.1.0/bead/items/adapters/openai.py +323 -0
  163. bead-0.1.0/bead/items/adapters/registry.py +202 -0
  164. bead-0.1.0/bead/items/adapters/sentence_transformers.py +224 -0
  165. bead-0.1.0/bead/items/adapters/togetherai.py +309 -0
  166. bead-0.1.0/bead/items/binary.py +515 -0
  167. bead-0.1.0/bead/items/cache.py +558 -0
  168. bead-0.1.0/bead/items/categorical.py +593 -0
  169. bead-0.1.0/bead/items/cloze.py +757 -0
  170. bead-0.1.0/bead/items/constructor.py +784 -0
  171. bead-0.1.0/bead/items/forced_choice.py +413 -0
  172. bead-0.1.0/bead/items/free_text.py +681 -0
  173. bead-0.1.0/bead/items/generation.py +432 -0
  174. bead-0.1.0/bead/items/item.py +396 -0
  175. bead-0.1.0/bead/items/item_template.py +787 -0
  176. bead-0.1.0/bead/items/magnitude.py +573 -0
  177. bead-0.1.0/bead/items/multi_select.py +621 -0
  178. bead-0.1.0/bead/items/ordinal_scale.py +569 -0
  179. bead-0.1.0/bead/items/scoring.py +448 -0
  180. bead-0.1.0/bead/items/validation.py +723 -0
  181. bead-0.1.0/bead/lists/__init__.py +30 -0
  182. bead-0.1.0/bead/lists/balancer.py +263 -0
  183. bead-0.1.0/bead/lists/constraints.py +1067 -0
  184. bead-0.1.0/bead/lists/experiment_list.py +286 -0
  185. bead-0.1.0/bead/lists/list_collection.py +378 -0
  186. bead-0.1.0/bead/lists/partitioner.py +1141 -0
  187. bead-0.1.0/bead/lists/stratification.py +254 -0
  188. bead-0.1.0/bead/participants/__init__.py +73 -0
  189. bead-0.1.0/bead/participants/collection.py +699 -0
  190. bead-0.1.0/bead/participants/merging.py +312 -0
  191. bead-0.1.0/bead/participants/metadata_spec.py +491 -0
  192. bead-0.1.0/bead/participants/models.py +276 -0
  193. bead-0.1.0/bead/resources/__init__.py +29 -0
  194. bead-0.1.0/bead/resources/adapters/__init__.py +19 -0
  195. bead-0.1.0/bead/resources/adapters/base.py +104 -0
  196. bead-0.1.0/bead/resources/adapters/cache.py +128 -0
  197. bead-0.1.0/bead/resources/adapters/glazing.py +508 -0
  198. bead-0.1.0/bead/resources/adapters/registry.py +117 -0
  199. bead-0.1.0/bead/resources/adapters/unimorph.py +796 -0
  200. bead-0.1.0/bead/resources/classification.py +856 -0
  201. bead-0.1.0/bead/resources/constraint_builders.py +329 -0
  202. bead-0.1.0/bead/resources/constraints.py +165 -0
  203. bead-0.1.0/bead/resources/lexical_item.py +223 -0
  204. bead-0.1.0/bead/resources/lexicon.py +744 -0
  205. bead-0.1.0/bead/resources/loaders.py +209 -0
  206. bead-0.1.0/bead/resources/template.py +441 -0
  207. bead-0.1.0/bead/resources/template_collection.py +707 -0
  208. bead-0.1.0/bead/resources/template_generation.py +349 -0
  209. bead-0.1.0/bead/simulation/__init__.py +29 -0
  210. bead-0.1.0/bead/simulation/annotators/__init__.py +15 -0
  211. bead-0.1.0/bead/simulation/annotators/base.py +175 -0
  212. bead-0.1.0/bead/simulation/annotators/distance_based.py +135 -0
  213. bead-0.1.0/bead/simulation/annotators/lm_based.py +114 -0
  214. bead-0.1.0/bead/simulation/annotators/oracle.py +182 -0
  215. bead-0.1.0/bead/simulation/annotators/random.py +181 -0
  216. bead-0.1.0/bead/simulation/dsl_extension/__init__.py +3 -0
  217. bead-0.1.0/bead/simulation/noise_models/__init__.py +13 -0
  218. bead-0.1.0/bead/simulation/noise_models/base.py +42 -0
  219. bead-0.1.0/bead/simulation/noise_models/random_noise.py +82 -0
  220. bead-0.1.0/bead/simulation/noise_models/systematic.py +132 -0
  221. bead-0.1.0/bead/simulation/noise_models/temperature.py +86 -0
  222. bead-0.1.0/bead/simulation/runner.py +144 -0
  223. bead-0.1.0/bead/simulation/strategies/__init__.py +23 -0
  224. bead-0.1.0/bead/simulation/strategies/base.py +123 -0
  225. bead-0.1.0/bead/simulation/strategies/binary.py +103 -0
  226. bead-0.1.0/bead/simulation/strategies/categorical.py +123 -0
  227. bead-0.1.0/bead/simulation/strategies/cloze.py +224 -0
  228. bead-0.1.0/bead/simulation/strategies/forced_choice.py +127 -0
  229. bead-0.1.0/bead/simulation/strategies/free_text.py +105 -0
  230. bead-0.1.0/bead/simulation/strategies/magnitude.py +116 -0
  231. bead-0.1.0/bead/simulation/strategies/multi_select.py +129 -0
  232. bead-0.1.0/bead/simulation/strategies/ordinal_scale.py +131 -0
  233. bead-0.1.0/bead/templates/__init__.py +27 -0
  234. bead-0.1.0/bead/templates/adapters/__init__.py +17 -0
  235. bead-0.1.0/bead/templates/adapters/base.py +128 -0
  236. bead-0.1.0/bead/templates/adapters/cache.py +178 -0
  237. bead-0.1.0/bead/templates/adapters/huggingface.py +312 -0
  238. bead-0.1.0/bead/templates/combinatorics.py +103 -0
  239. bead-0.1.0/bead/templates/filler.py +605 -0
  240. bead-0.1.0/bead/templates/renderers.py +177 -0
  241. bead-0.1.0/bead/templates/resolver.py +178 -0
  242. bead-0.1.0/bead/templates/strategies.py +1806 -0
  243. bead-0.1.0/bead/templates/streaming.py +195 -0
  244. bead-0.1.0/docs/api/active_learning.md +88 -0
  245. bead-0.1.0/docs/api/config.md +11 -0
  246. bead-0.1.0/docs/api/data.md +53 -0
  247. bead-0.1.0/docs/api/deployment.md +44 -0
  248. bead-0.1.0/docs/api/items.md +88 -0
  249. bead-0.1.0/docs/api/lists.md +41 -0
  250. bead-0.1.0/docs/api/resources.md +58 -0
  251. bead-0.1.0/docs/api/templates.md +34 -0
  252. bead-0.1.0/docs/cli/reference.md +1092 -0
  253. bead-0.1.0/docs/developer-guide/architecture.md +887 -0
  254. bead-0.1.0/docs/developer-guide/contributing.md +984 -0
  255. bead-0.1.0/docs/developer-guide/setup.md +618 -0
  256. bead-0.1.0/docs/developer-guide/testing.md +855 -0
  257. bead-0.1.0/docs/examples/gallery.md +13 -0
  258. bead-0.1.0/docs/index.md +69 -0
  259. bead-0.1.0/docs/installation.md +119 -0
  260. bead-0.1.0/docs/quickstart.md +273 -0
  261. bead-0.1.0/docs/requirements.txt +3 -0
  262. bead-0.1.0/docs/user-guide/api/deployment.md +541 -0
  263. bead-0.1.0/docs/user-guide/api/index.md +171 -0
  264. bead-0.1.0/docs/user-guide/api/items.md +342 -0
  265. bead-0.1.0/docs/user-guide/api/lists.md +391 -0
  266. bead-0.1.0/docs/user-guide/api/resources.md +238 -0
  267. bead-0.1.0/docs/user-guide/api/templates.md +415 -0
  268. bead-0.1.0/docs/user-guide/api/training.md +352 -0
  269. bead-0.1.0/docs/user-guide/api/workflows.md +408 -0
  270. bead-0.1.0/docs/user-guide/cli/conftest.py +79 -0
  271. bead-0.1.0/docs/user-guide/cli/deployment.md +315 -0
  272. bead-0.1.0/docs/user-guide/cli/index.md +74 -0
  273. bead-0.1.0/docs/user-guide/cli/items.md +310 -0
  274. bead-0.1.0/docs/user-guide/cli/lists.md +277 -0
  275. bead-0.1.0/docs/user-guide/cli/resources.md +220 -0
  276. bead-0.1.0/docs/user-guide/cli/templates.md +199 -0
  277. bead-0.1.0/docs/user-guide/cli/training.md +309 -0
  278. bead-0.1.0/docs/user-guide/cli/workflows.md +274 -0
  279. bead-0.1.0/docs/user-guide/concepts.md +194 -0
  280. bead-0.1.0/docs/user-guide/configuration.md +738 -0
  281. bead-0.1.0/docs/user-guide/index.md +99 -0
  282. bead-0.1.0/gallery/eng/argument_structure/Makefile +577 -0
  283. bead-0.1.0/gallery/eng/argument_structure/README.md +1666 -0
  284. bead-0.1.0/gallery/eng/argument_structure/config.yaml +303 -0
  285. bead-0.1.0/gallery/eng/argument_structure/create_2afc_pairs.py +449 -0
  286. bead-0.1.0/gallery/eng/argument_structure/extract_generic_templates.py +322 -0
  287. bead-0.1.0/gallery/eng/argument_structure/fill_templates.py +326 -0
  288. bead-0.1.0/gallery/eng/argument_structure/generate_cross_product.py +205 -0
  289. bead-0.1.0/gallery/eng/argument_structure/generate_deployment.py +323 -0
  290. bead-0.1.0/gallery/eng/argument_structure/generate_lexicons.py +294 -0
  291. bead-0.1.0/gallery/eng/argument_structure/generate_lists.py +290 -0
  292. bead-0.1.0/gallery/eng/argument_structure/generate_templates.py +124 -0
  293. bead-0.1.0/gallery/eng/argument_structure/resources/README.md +62 -0
  294. bead-0.1.0/gallery/eng/argument_structure/resources/be_forms.csv +15 -0
  295. bead-0.1.0/gallery/eng/argument_structure/resources/bleached_adjectives.csv +12 -0
  296. bead-0.1.0/gallery/eng/argument_structure/resources/bleached_nouns.csv +37 -0
  297. bead-0.1.0/gallery/eng/argument_structure/resources/bleached_verbs.csv +9 -0
  298. bead-0.1.0/gallery/eng/argument_structure/resources/determiners.csv +4 -0
  299. bead-0.1.0/gallery/eng/argument_structure/resources/prepositions.csv +54 -0
  300. bead-0.1.0/gallery/eng/argument_structure/run_pipeline.py +486 -0
  301. bead-0.1.0/gallery/eng/argument_structure/simulate_pipeline.py +503 -0
  302. bead-0.1.0/gallery/eng/argument_structure/tests/__init__.py +1 -0
  303. bead-0.1.0/gallery/eng/argument_structure/tests/test_simulation.py +222 -0
  304. bead-0.1.0/gallery/eng/argument_structure/utils/__init__.py +19 -0
  305. bead-0.1.0/gallery/eng/argument_structure/utils/clausal_frames.py +428 -0
  306. bead-0.1.0/gallery/eng/argument_structure/utils/constraint_builder.py +515 -0
  307. bead-0.1.0/gallery/eng/argument_structure/utils/morphology.py +277 -0
  308. bead-0.1.0/gallery/eng/argument_structure/utils/renderers.py +206 -0
  309. bead-0.1.0/gallery/eng/argument_structure/utils/template_generator.py +722 -0
  310. bead-0.1.0/gallery/eng/argument_structure/utils/verbnet_parser.py +310 -0
  311. bead-0.1.0/mkdocs.yml +104 -0
  312. bead-0.1.0/package-lock.json +4474 -0
  313. bead-0.1.0/package.json +29 -0
  314. bead-0.1.0/pyproject.toml +168 -0
  315. bead-0.1.0/scripts/ci.sh +111 -0
  316. bead-0.1.0/tests/__init__.py +1 -0
  317. bead-0.1.0/tests/active_learning/__init__.py +1 -0
  318. bead-0.1.0/tests/active_learning/conftest.py +78 -0
  319. bead-0.1.0/tests/active_learning/models/__init__.py +1 -0
  320. bead-0.1.0/tests/active_learning/models/binary/__init__.py +1 -0
  321. bead-0.1.0/tests/active_learning/models/binary/conftest.py +45 -0
  322. bead-0.1.0/tests/active_learning/models/binary/test_mixed_effects.py +617 -0
  323. bead-0.1.0/tests/active_learning/models/categorical/__init__.py +1 -0
  324. bead-0.1.0/tests/active_learning/models/categorical/conftest.py +46 -0
  325. bead-0.1.0/tests/active_learning/models/categorical/test_mixed_effects.py +618 -0
  326. bead-0.1.0/tests/active_learning/models/cloze/__init__.py +1 -0
  327. bead-0.1.0/tests/active_learning/models/cloze/conftest.py +88 -0
  328. bead-0.1.0/tests/active_learning/models/cloze/test_huggingface_trainer.py +208 -0
  329. bead-0.1.0/tests/active_learning/models/cloze/test_mixed_effects.py +846 -0
  330. bead-0.1.0/tests/active_learning/models/forced_choice/conftest.py +117 -0
  331. bead-0.1.0/tests/active_learning/models/forced_choice/test_mixed_effects.py +528 -0
  332. bead-0.1.0/tests/active_learning/models/forced_choice/test_model.py +455 -0
  333. bead-0.1.0/tests/active_learning/models/free_text/__init__.py +1 -0
  334. bead-0.1.0/tests/active_learning/models/free_text/conftest.py +65 -0
  335. bead-0.1.0/tests/active_learning/models/free_text/test_mixed_effects.py +892 -0
  336. bead-0.1.0/tests/active_learning/models/magnitude/__init__.py +1 -0
  337. bead-0.1.0/tests/active_learning/models/magnitude/conftest.py +52 -0
  338. bead-0.1.0/tests/active_learning/models/magnitude/test_mixed_effects.py +569 -0
  339. bead-0.1.0/tests/active_learning/models/multi_select/conftest.py +61 -0
  340. bead-0.1.0/tests/active_learning/models/multi_select/test_multi_select_mixed_effects.py +643 -0
  341. bead-0.1.0/tests/active_learning/models/ordinal_scale/__init__.py +1 -0
  342. bead-0.1.0/tests/active_learning/models/ordinal_scale/conftest.py +36 -0
  343. bead-0.1.0/tests/active_learning/models/ordinal_scale/test_mixed_effects.py +480 -0
  344. bead-0.1.0/tests/active_learning/models/test_base.py +322 -0
  345. bead-0.1.0/tests/active_learning/models/test_random_effects.py +767 -0
  346. bead-0.1.0/tests/active_learning/test_integration.py +343 -0
  347. bead-0.1.0/tests/active_learning/trainers/__init__.py +3 -0
  348. bead-0.1.0/tests/active_learning/trainers/conftest.py +182 -0
  349. bead-0.1.0/tests/active_learning/trainers/test_base.py +222 -0
  350. bead-0.1.0/tests/active_learning/trainers/test_cloze_metrics.py +267 -0
  351. bead-0.1.0/tests/active_learning/trainers/test_huggingface.py +224 -0
  352. bead-0.1.0/tests/active_learning/trainers/test_lightning.py +279 -0
  353. bead-0.1.0/tests/active_learning/trainers/test_registry.py +170 -0
  354. bead-0.1.0/tests/behavioral/__init__.py +1 -0
  355. bead-0.1.0/tests/behavioral/test_analytics.py +517 -0
  356. bead-0.1.0/tests/behavioral/test_merging.py +354 -0
  357. bead-0.1.0/tests/cli/__init__.py +1 -0
  358. bead-0.1.0/tests/cli/conftest.py +379 -0
  359. bead-0.1.0/tests/cli/test_active_learning.py +260 -0
  360. bead-0.1.0/tests/cli/test_completion.py +315 -0
  361. bead-0.1.0/tests/cli/test_config.py +249 -0
  362. bead-0.1.0/tests/cli/test_constraint_builders.py +404 -0
  363. bead-0.1.0/tests/cli/test_deployment.py +1278 -0
  364. bead-0.1.0/tests/cli/test_items.py +278 -0
  365. bead-0.1.0/tests/cli/test_items_factories.py +473 -0
  366. bead-0.1.0/tests/cli/test_list_constraints.py +498 -0
  367. bead-0.1.0/tests/cli/test_lists.py +156 -0
  368. bead-0.1.0/tests/cli/test_main.py +260 -0
  369. bead-0.1.0/tests/cli/test_models.py +725 -0
  370. bead-0.1.0/tests/cli/test_resource_loaders.py +362 -0
  371. bead-0.1.0/tests/cli/test_resources.py +518 -0
  372. bead-0.1.0/tests/cli/test_simulate.py +558 -0
  373. bead-0.1.0/tests/cli/test_template_generation.py +358 -0
  374. bead-0.1.0/tests/cli/test_template_utilities.py +555 -0
  375. bead-0.1.0/tests/cli/test_templates.py +456 -0
  376. bead-0.1.0/tests/cli/test_training.py +676 -0
  377. bead-0.1.0/tests/cli/test_utils.py +158 -0
  378. bead-0.1.0/tests/cli/test_workflow.py +483 -0
  379. bead-0.1.0/tests/config/conftest.py +302 -0
  380. bead-0.1.0/tests/config/test_config_models.py +610 -0
  381. bead-0.1.0/tests/config/test_defaults.py +195 -0
  382. bead-0.1.0/tests/config/test_env.py +260 -0
  383. bead-0.1.0/tests/config/test_loader.py +268 -0
  384. bead-0.1.0/tests/config/test_profiles.py +329 -0
  385. bead-0.1.0/tests/config/test_serialization.py +383 -0
  386. bead-0.1.0/tests/config/test_simulation_config.py +229 -0
  387. bead-0.1.0/tests/config/test_validation.py +257 -0
  388. bead-0.1.0/tests/conftest.py +47 -0
  389. bead-0.1.0/tests/data/conftest.py +71 -0
  390. bead-0.1.0/tests/data/data_helpers.py +12 -0
  391. bead-0.1.0/tests/data/test_base.py +90 -0
  392. bead-0.1.0/tests/data/test_data_serialization.py +259 -0
  393. bead-0.1.0/tests/data/test_data_validation.py +354 -0
  394. bead-0.1.0/tests/data/test_identifiers.py +71 -0
  395. bead-0.1.0/tests/data/test_language_codes.py +70 -0
  396. bead-0.1.0/tests/data/test_metadata.py +263 -0
  397. bead-0.1.0/tests/data/test_repository.py +381 -0
  398. bead-0.1.0/tests/data/test_timestamps.py +82 -0
  399. bead-0.1.0/tests/deployment/__init__.py +1 -0
  400. bead-0.1.0/tests/deployment/jatos/__init__.py +1 -0
  401. bead-0.1.0/tests/deployment/jatos/conftest.py +71 -0
  402. bead-0.1.0/tests/deployment/jatos/test_api.py +238 -0
  403. bead-0.1.0/tests/deployment/jatos/test_exporter.py +232 -0
  404. bead-0.1.0/tests/deployment/jspsych/__init__.py +1 -0
  405. bead-0.1.0/tests/deployment/jspsych/conftest.py +300 -0
  406. bead-0.1.0/tests/deployment/jspsych/test_generator.py +514 -0
  407. bead-0.1.0/tests/deployment/jspsych/test_plugins.py +158 -0
  408. bead-0.1.0/tests/deployment/jspsych/test_randomizer.py +304 -0
  409. bead-0.1.0/tests/deployment/jspsych/test_randomizer_js.py +341 -0
  410. bead-0.1.0/tests/deployment/jspsych/test_trials.py +485 -0
  411. bead-0.1.0/tests/deployment/jspsych/test_ui.py +174 -0
  412. bead-0.1.0/tests/dsl/conftest.py +62 -0
  413. bead-0.1.0/tests/dsl/test_ast.py +299 -0
  414. bead-0.1.0/tests/dsl/test_context.py +209 -0
  415. bead-0.1.0/tests/dsl/test_errors.py +99 -0
  416. bead-0.1.0/tests/dsl/test_evaluator.py +711 -0
  417. bead-0.1.0/tests/dsl/test_parser.py +420 -0
  418. bead-0.1.0/tests/dsl/test_simulation_stdlib.py +195 -0
  419. bead-0.1.0/tests/dsl/test_stdlib.py +311 -0
  420. bead-0.1.0/tests/evaluation/__init__.py +1 -0
  421. bead-0.1.0/tests/evaluation/conftest.py +137 -0
  422. bead-0.1.0/tests/evaluation/test_convergence.py +542 -0
  423. bead-0.1.0/tests/evaluation/test_interannotator.py +485 -0
  424. bead-0.1.0/tests/fixtures/api_docs/.cache/7fe19b4cc4703a7134ebe850fea7af21d331987de0b5bf0479eaf5b35f6a782a.json +42 -0
  425. bead-0.1.0/tests/fixtures/api_docs/.cache/scoring/26d3ff3d02b885f874dd8d901828bb8e4a215f30f124368ce319ab2d52a1c4d9.json +11 -0
  426. bead-0.1.0/tests/fixtures/api_docs/.cache/scoring/31b21e34c8fcc3f7f46b2e93882ee7446a4eb5e85eec798bae27f9f2d7433dd5.json +11 -0
  427. bead-0.1.0/tests/fixtures/api_docs/.cache/scoring/712d349ddb000e8471561ac0b6dc8787a21bd1c9a8312f092b4c5219cef102cb.json +11 -0
  428. bead-0.1.0/tests/fixtures/api_docs/.cache/scoring/a2fea3dcd8c8fefa93dee5b809782275c37f24e8fdee4a87f1b4cadb68418b23.json +11 -0
  429. bead-0.1.0/tests/fixtures/api_docs/bead.yaml +21 -0
  430. bead-0.1.0/tests/fixtures/api_docs/config/model_config.yaml +4 -0
  431. bead-0.1.0/tests/fixtures/api_docs/config.yaml +21 -0
  432. bead-0.1.0/tests/fixtures/api_docs/constraints/verb_constraint.jsonl +1 -0
  433. bead-0.1.0/tests/fixtures/api_docs/filled_templates/batch1.jsonl +100 -0
  434. bead-0.1.0/tests/fixtures/api_docs/filled_templates/batch2.jsonl +100 -0
  435. bead-0.1.0/tests/fixtures/api_docs/filled_templates/generic_frames_filled.jsonl +774 -0
  436. bead-0.1.0/tests/fixtures/api_docs/hypotheses.txt +4 -0
  437. bead-0.1.0/tests/fixtures/api_docs/items/2afc_pairs.jsonl +1422 -0
  438. bead-0.1.0/tests/fixtures/api_docs/items/all.jsonl +4 -0
  439. bead-0.1.0/tests/fixtures/api_docs/items/cross_product_items.jsonl +27 -0
  440. bead-0.1.0/tests/fixtures/api_docs/items/new_items.jsonl +2 -0
  441. bead-0.1.0/tests/fixtures/api_docs/items/test_set.jsonl +2 -0
  442. bead-0.1.0/tests/fixtures/api_docs/lexicons/be_forms.jsonl +14 -0
  443. bead-0.1.0/tests/fixtures/api_docs/lexicons/bleached_adjectives.jsonl +11 -0
  444. bead-0.1.0/tests/fixtures/api_docs/lexicons/bleached_nouns.jsonl +36 -0
  445. bead-0.1.0/tests/fixtures/api_docs/lexicons/bleached_verbs.jsonl +8 -0
  446. bead-0.1.0/tests/fixtures/api_docs/lexicons/determiners.jsonl +3 -0
  447. bead-0.1.0/tests/fixtures/api_docs/lexicons/prepositions.jsonl +53 -0
  448. bead-0.1.0/tests/fixtures/api_docs/lexicons/verbnet_verbs.jsonl +11 -0
  449. bead-0.1.0/tests/fixtures/api_docs/lists/experiment_lists.jsonl +16 -0
  450. bead-0.1.0/tests/fixtures/api_docs/models/random_intercepts_model/config.json +1 -0
  451. bead-0.1.0/tests/fixtures/api_docs/models/trained_model/config.json +1 -0
  452. bead-0.1.0/tests/fixtures/api_docs/participant_ids.txt +2 -0
  453. bead-0.1.0/tests/fixtures/api_docs/predictions/model_predictions.jsonl +2 -0
  454. bead-0.1.0/tests/fixtures/api_docs/predictions/model_preds.jsonl +2 -0
  455. bead-0.1.0/tests/fixtures/api_docs/premises.txt +4 -0
  456. bead-0.1.0/tests/fixtures/api_docs/resources/README.md +62 -0
  457. bead-0.1.0/tests/fixtures/api_docs/resources/be_forms.csv +15 -0
  458. bead-0.1.0/tests/fixtures/api_docs/resources/bleached_adjectives.csv +12 -0
  459. bead-0.1.0/tests/fixtures/api_docs/resources/bleached_nouns.csv +37 -0
  460. bead-0.1.0/tests/fixtures/api_docs/resources/bleached_verbs.csv +9 -0
  461. bead-0.1.0/tests/fixtures/api_docs/resources/determiners.csv +4 -0
  462. bead-0.1.0/tests/fixtures/api_docs/resources/prepositions.csv +54 -0
  463. bead-0.1.0/tests/fixtures/api_docs/responses/all_labels.jsonl +4 -0
  464. bead-0.1.0/tests/fixtures/api_docs/responses/collected_data.jsonl +2 -0
  465. bead-0.1.0/tests/fixtures/api_docs/responses/gold_standard.jsonl +2 -0
  466. bead-0.1.0/tests/fixtures/api_docs/responses/human_responses.jsonl +2 -0
  467. bead-0.1.0/tests/fixtures/api_docs/responses/labels.jsonl +4 -0
  468. bead-0.1.0/tests/fixtures/api_docs/responses/likert_labels.jsonl +4 -0
  469. bead-0.1.0/tests/fixtures/api_docs/responses/multi_annotator.jsonl +6 -0
  470. bead-0.1.0/tests/fixtures/api_docs/responses/paraphrase_labels.jsonl +2 -0
  471. bead-0.1.0/tests/fixtures/api_docs/responses/participant_ids.txt +4 -0
  472. bead-0.1.0/tests/fixtures/api_docs/responses/test_labels.jsonl +2 -0
  473. bead-0.1.0/tests/fixtures/api_docs/responses/two_annotators.jsonl +4 -0
  474. bead-0.1.0/tests/fixtures/api_docs/results.jsonl +4 -0
  475. bead-0.1.0/tests/fixtures/api_docs/sentences.txt +30 -0
  476. bead-0.1.0/tests/fixtures/api_docs/templates/generic_frames.jsonl +9 -0
  477. bead-0.1.0/tests/fixtures/api_docs/templates/verbnet_frames.jsonl +9 -0
  478. bead-0.1.0/tests/fixtures/api_docs/test_participant_ids.txt +2 -0
  479. bead-0.1.0/tests/integration/__init__.py +1 -0
  480. bead-0.1.0/tests/integration/test_task_type_pipeline.py +531 -0
  481. bead-0.1.0/tests/items/__init__.py +1 -0
  482. bead-0.1.0/tests/items/adapters/__init__.py +1 -0
  483. bead-0.1.0/tests/items/adapters/conftest.py +392 -0
  484. bead-0.1.0/tests/items/adapters/test_anthropic.py +295 -0
  485. bead-0.1.0/tests/items/adapters/test_api_utils.py +272 -0
  486. bead-0.1.0/tests/items/adapters/test_base.py +197 -0
  487. bead-0.1.0/tests/items/adapters/test_google.py +383 -0
  488. bead-0.1.0/tests/items/adapters/test_huggingface.py +514 -0
  489. bead-0.1.0/tests/items/adapters/test_openai.py +379 -0
  490. bead-0.1.0/tests/items/adapters/test_registry.py +277 -0
  491. bead-0.1.0/tests/items/adapters/test_sentence_transformers.py +243 -0
  492. bead-0.1.0/tests/items/adapters/test_togetherai.py +352 -0
  493. bead-0.1.0/tests/items/conftest.py +514 -0
  494. bead-0.1.0/tests/items/test_binary.py +247 -0
  495. bead-0.1.0/tests/items/test_cache.py +558 -0
  496. bead-0.1.0/tests/items/test_categorical.py +303 -0
  497. bead-0.1.0/tests/items/test_cloze.py +537 -0
  498. bead-0.1.0/tests/items/test_constructor.py +638 -0
  499. bead-0.1.0/tests/items/test_forced_choice.py +598 -0
  500. bead-0.1.0/tests/items/test_free_text.py +374 -0
  501. bead-0.1.0/tests/items/test_magnitude.py +331 -0
  502. bead-0.1.0/tests/items/test_models.py +1247 -0
  503. bead-0.1.0/tests/items/test_multi_select.py +339 -0
  504. bead-0.1.0/tests/items/test_ordinal_scale.py +332 -0
  505. bead-0.1.0/tests/items/test_scoring.py +404 -0
  506. bead-0.1.0/tests/items/test_validation.py +744 -0
  507. bead-0.1.0/tests/javascript/list_distributor_helpers.test.js +1043 -0
  508. bead-0.1.0/tests/javascript/plugins.test.js +209 -0
  509. bead-0.1.0/tests/javascript/randomizer.test.js +344 -0
  510. bead-0.1.0/tests/lists/__init__.py +1 -0
  511. bead-0.1.0/tests/lists/conftest.py +317 -0
  512. bead-0.1.0/tests/lists/test_balancer.py +301 -0
  513. bead-0.1.0/tests/lists/test_batch_constraints.py +462 -0
  514. bead-0.1.0/tests/lists/test_constraints.py +636 -0
  515. bead-0.1.0/tests/lists/test_models.py +489 -0
  516. bead-0.1.0/tests/lists/test_partitioner.py +553 -0
  517. bead-0.1.0/tests/lists/test_partitioner_batch.py +498 -0
  518. bead-0.1.0/tests/lists/test_stratification.py +231 -0
  519. bead-0.1.0/tests/resources/__init__.py +1 -0
  520. bead-0.1.0/tests/resources/adapters/__init__.py +1 -0
  521. bead-0.1.0/tests/resources/adapters/conftest.py +34 -0
  522. bead-0.1.0/tests/resources/adapters/test_base.py +73 -0
  523. bead-0.1.0/tests/resources/adapters/test_cache.py +59 -0
  524. bead-0.1.0/tests/resources/adapters/test_glazing.py +217 -0
  525. bead-0.1.0/tests/resources/adapters/test_registry.py +73 -0
  526. bead-0.1.0/tests/resources/adapters/test_unimorph.py +121 -0
  527. bead-0.1.0/tests/resources/conftest.py +410 -0
  528. bead-0.1.0/tests/resources/test_constraint_builders.py +228 -0
  529. bead-0.1.0/tests/resources/test_constraints.py +192 -0
  530. bead-0.1.0/tests/resources/test_lexical_item.py +238 -0
  531. bead-0.1.0/tests/resources/test_lexical_item_class.py +455 -0
  532. bead-0.1.0/tests/resources/test_lexicon.py +652 -0
  533. bead-0.1.0/tests/resources/test_loaders.py +237 -0
  534. bead-0.1.0/tests/resources/test_template.py +533 -0
  535. bead-0.1.0/tests/resources/test_template_class.py +528 -0
  536. bead-0.1.0/tests/resources/test_template_collection.py +454 -0
  537. bead-0.1.0/tests/resources/test_template_generation.py +298 -0
  538. bead-0.1.0/tests/simulation/__init__.py +1 -0
  539. bead-0.1.0/tests/simulation/annotators/__init__.py +1 -0
  540. bead-0.1.0/tests/simulation/annotators/test_base.py +96 -0
  541. bead-0.1.0/tests/simulation/annotators/test_distance_based.py +406 -0
  542. bead-0.1.0/tests/simulation/annotators/test_lm_based.py +473 -0
  543. bead-0.1.0/tests/simulation/annotators/test_oracle.py +388 -0
  544. bead-0.1.0/tests/simulation/annotators/test_random.py +385 -0
  545. bead-0.1.0/tests/simulation/noise_models/__init__.py +1 -0
  546. bead-0.1.0/tests/simulation/noise_models/test_base.py +51 -0
  547. bead-0.1.0/tests/simulation/noise_models/test_temperature.py +274 -0
  548. bead-0.1.0/tests/simulation/strategies/__init__.py +1 -0
  549. bead-0.1.0/tests/simulation/strategies/test_base.py +87 -0
  550. bead-0.1.0/tests/simulation/strategies/test_binary.py +375 -0
  551. bead-0.1.0/tests/simulation/strategies/test_categorical.py +469 -0
  552. bead-0.1.0/tests/simulation/strategies/test_cloze.py +367 -0
  553. bead-0.1.0/tests/simulation/strategies/test_forced_choice.py +503 -0
  554. bead-0.1.0/tests/simulation/strategies/test_free_text.py +326 -0
  555. bead-0.1.0/tests/simulation/strategies/test_magnitude.py +348 -0
  556. bead-0.1.0/tests/simulation/strategies/test_multi_select.py +491 -0
  557. bead-0.1.0/tests/simulation/strategies/test_ordinal_scale.py +441 -0
  558. bead-0.1.0/tests/simulation/test_integration.py +559 -0
  559. bead-0.1.0/tests/simulation/test_runner.py +612 -0
  560. bead-0.1.0/tests/templates/__init__.py +1 -0
  561. bead-0.1.0/tests/templates/adapters/adapter_helpers.py +89 -0
  562. bead-0.1.0/tests/templates/adapters/conftest.py +54 -0
  563. bead-0.1.0/tests/templates/adapters/test_adapter.py +103 -0
  564. bead-0.1.0/tests/templates/adapters/test_adapter_cache.py +170 -0
  565. bead-0.1.0/tests/templates/conftest.py +137 -0
  566. bead-0.1.0/tests/templates/test_combinatorics.py +133 -0
  567. bead-0.1.0/tests/templates/test_csp_filler.py +290 -0
  568. bead-0.1.0/tests/templates/test_mixed_filling.py +346 -0
  569. bead-0.1.0/tests/templates/test_mlm_strategy.py +349 -0
  570. bead-0.1.0/tests/templates/test_renderers.py +359 -0
  571. bead-0.1.0/tests/templates/test_strategies.py +268 -0
  572. bead-0.1.0/tests/templates/test_strategy_filler.py +436 -0
  573. bead-0.1.0/tests/templates/test_streaming.py +354 -0
  574. bead-0.1.0/tests/test_api_docs.py +115 -0
  575. bead-0.1.0/uv.lock +3598 -0
bead-0.1.0/.bash_setup ADDED
@@ -0,0 +1,25 @@
1
+ #!/bin/bash
2
+ # Setup script for pytest-codeblocks bash tests
3
+ # This is sourced by bash before running each code block
4
+
5
+ # Determine project root (where this script lives)
6
+ PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7
+
8
+ # Add bead CLI to PATH using absolute path
9
+ export PATH="${PROJECT_ROOT}/.venv/bin:${PATH}"
10
+
11
+ # Create cli_work directory if it doesn't exist and copy fixtures
12
+ FIXTURES_SRC="${PROJECT_ROOT}/tests/fixtures/api_docs"
13
+ FIXTURES_WORK="${PROJECT_ROOT}/tests/fixtures/cli_work"
14
+
15
+ if [ ! -d "${FIXTURES_WORK}" ]; then
16
+ echo "Setting up CLI test fixtures..." >&2
17
+ mkdir -p "${FIXTURES_WORK}"
18
+ cp -r "${FIXTURES_SRC}"/* "${FIXTURES_WORK}/"
19
+ fi
20
+
21
+ # Change to fixtures directory
22
+ cd "${FIXTURES_WORK}" || {
23
+ echo "ERROR: Failed to cd to ${FIXTURES_WORK}" >&2
24
+ exit 1
25
+ }
@@ -0,0 +1,78 @@
1
+ name: Bug Report
2
+ description: Report a bug in bead
3
+ labels: ["bug", "triage"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thanks for taking the time to report a bug! Please fill out the form below.
9
+
10
+ **Note**: For questions or help, please use [GitHub Discussions](https://github.com/FACTSlab/bead/discussions) instead.
11
+
12
+ - type: checkboxes
13
+ id: checks
14
+ attributes:
15
+ label: Checklist
16
+ options:
17
+ - label: I have searched the existing issues and this is not a duplicate
18
+ required: true
19
+ - label: I am using the latest version of bead
20
+ required: true
21
+
22
+ - type: textarea
23
+ id: description
24
+ attributes:
25
+ label: Bug Description
26
+ description: A clear and concise description of the bug.
27
+ placeholder: What happened?
28
+ validations:
29
+ required: true
30
+
31
+ - type: textarea
32
+ id: reproduction
33
+ attributes:
34
+ label: Steps to Reproduce
35
+ description: Minimal code example that reproduces the issue.
36
+ placeholder: |
37
+ ```python
38
+ from bead import ...
39
+
40
+ # Code that reproduces the bug
41
+ ```
42
+ validations:
43
+ required: true
44
+
45
+ - type: textarea
46
+ id: expected
47
+ attributes:
48
+ label: Expected Behavior
49
+ description: What did you expect to happen?
50
+ validations:
51
+ required: true
52
+
53
+ - type: textarea
54
+ id: actual
55
+ attributes:
56
+ label: Actual Behavior
57
+ description: What actually happened? Include the full error traceback if applicable.
58
+ validations:
59
+ required: true
60
+
61
+ - type: textarea
62
+ id: environment
63
+ attributes:
64
+ label: Environment
65
+ description: Please provide your environment details.
66
+ value: |
67
+ - bead version:
68
+ - Python version:
69
+ - OS:
70
+ - Installation method (uv/pip):
71
+ validations:
72
+ required: true
73
+
74
+ - type: textarea
75
+ id: additional
76
+ attributes:
77
+ label: Additional Context
78
+ description: Any other context, screenshots, or information about the problem.
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Questions & Help
4
+ url: https://github.com/FACTSlab/bead/discussions
5
+ about: Please ask questions in GitHub Discussions instead of opening an issue.
6
+ - name: Documentation
7
+ url: https://bead.readthedocs.io
8
+ about: Check the documentation for guides and API reference.
@@ -0,0 +1,70 @@
1
+ name: Feature Request
2
+ description: Suggest a new feature or enhancement
3
+ labels: ["enhancement", "triage"]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ Thanks for suggesting a feature! Please fill out the form below.
9
+
10
+ **Note**: For questions or discussion, please use [GitHub Discussions](https://github.com/FACTSlab/bead/discussions) first.
11
+
12
+ - type: checkboxes
13
+ id: checks
14
+ attributes:
15
+ label: Checklist
16
+ options:
17
+ - label: I have searched the existing issues and this feature has not been requested
18
+ required: true
19
+
20
+ - type: textarea
21
+ id: problem
22
+ attributes:
23
+ label: Problem Statement
24
+ description: What problem does this feature solve? Why is it needed?
25
+ placeholder: I'm always frustrated when...
26
+ validations:
27
+ required: true
28
+
29
+ - type: textarea
30
+ id: solution
31
+ attributes:
32
+ label: Proposed Solution
33
+ description: How do you envision this feature working?
34
+ placeholder: |
35
+ I would like to be able to...
36
+
37
+ ```python
38
+ # Example of how it might work
39
+ ```
40
+ validations:
41
+ required: true
42
+
43
+ - type: textarea
44
+ id: alternatives
45
+ attributes:
46
+ label: Alternatives Considered
47
+ description: Have you considered other approaches or workarounds?
48
+
49
+ - type: dropdown
50
+ id: component
51
+ attributes:
52
+ label: Component
53
+ description: Which part of bead does this relate to?
54
+ options:
55
+ - Resources (lexicons, templates)
56
+ - Template filling
57
+ - Items (construction, models)
58
+ - Lists (partitioning, constraints)
59
+ - Deployment (jsPsych, JATOS)
60
+ - Active learning
61
+ - Simulation
62
+ - CLI
63
+ - Documentation
64
+ - Other
65
+
66
+ - type: textarea
67
+ id: additional
68
+ attributes:
69
+ label: Additional Context
70
+ description: Any other context, mockups, or examples.
@@ -0,0 +1,40 @@
1
+ ## Description
2
+
3
+ <!-- Describe your changes in detail. What does this PR do? -->
4
+
5
+ ## Motivation
6
+
7
+ <!-- Why is this change needed? Link to related issues if applicable. -->
8
+
9
+ Fixes #
10
+
11
+ ## Type of Change
12
+
13
+ <!-- Mark the relevant option with an "x" -->
14
+
15
+ - [ ] Bug fix (non-breaking change that fixes an issue)
16
+ - [ ] New feature (non-breaking change that adds functionality)
17
+ - [ ] Breaking change (fix or feature that would cause existing functionality to change)
18
+ - [ ] Documentation update
19
+ - [ ] Refactoring (no functional changes)
20
+ - [ ] Tests (adding or updating tests)
21
+
22
+ ## Checklist
23
+
24
+ <!-- Mark completed items with an "x" -->
25
+
26
+ - [ ] I have read the [CONTRIBUTING](../CONTRIBUTING.md) guidelines
27
+ - [ ] My code follows the project's style guidelines
28
+ - [ ] I have run `uv run ruff check .` and `uv run ruff format .`
29
+ - [ ] I have run `uv run pyright` with no errors
30
+ - [ ] I have added tests that prove my fix/feature works
31
+ - [ ] All tests pass (`uv run pytest tests/`)
32
+ - [ ] I have updated documentation as needed
33
+
34
+ ## Testing
35
+
36
+ <!-- Describe how you tested your changes -->
37
+
38
+ ## Screenshots (if applicable)
39
+
40
+ <!-- Add screenshots to help explain your changes -->
@@ -0,0 +1,242 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ # TypeScript jobs
15
+ ts-check:
16
+ name: TypeScript Check (Biome)
17
+ runs-on: ubuntu-latest
18
+ defaults:
19
+ run:
20
+ working-directory: bead/deployment/jspsych
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - name: Install pnpm
25
+ uses: pnpm/action-setup@v4
26
+ with:
27
+ version: 9
28
+
29
+ - name: Set up Node.js
30
+ uses: actions/setup-node@v4
31
+ with:
32
+ node-version: "22"
33
+ cache: "pnpm"
34
+ cache-dependency-path: bead/deployment/jspsych/pnpm-lock.yaml
35
+
36
+ - name: Install dependencies
37
+ run: pnpm install
38
+
39
+ - name: Run Biome check (lint + format)
40
+ run: pnpm check
41
+
42
+ ts-typecheck:
43
+ name: TypeScript Type Check
44
+ runs-on: ubuntu-latest
45
+ defaults:
46
+ run:
47
+ working-directory: bead/deployment/jspsych
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+
51
+ - name: Install pnpm
52
+ uses: pnpm/action-setup@v4
53
+ with:
54
+ version: 9
55
+
56
+ - name: Set up Node.js
57
+ uses: actions/setup-node@v4
58
+ with:
59
+ node-version: "22"
60
+ cache: "pnpm"
61
+ cache-dependency-path: bead/deployment/jspsych/pnpm-lock.yaml
62
+
63
+ - name: Install dependencies
64
+ run: pnpm install
65
+
66
+ - name: Run type check
67
+ run: pnpm typecheck
68
+
69
+ ts-build:
70
+ name: TypeScript Build
71
+ runs-on: ubuntu-latest
72
+ defaults:
73
+ run:
74
+ working-directory: bead/deployment/jspsych
75
+ steps:
76
+ - uses: actions/checkout@v4
77
+
78
+ - name: Install pnpm
79
+ uses: pnpm/action-setup@v4
80
+ with:
81
+ version: 9
82
+
83
+ - name: Set up Node.js
84
+ uses: actions/setup-node@v4
85
+ with:
86
+ node-version: "22"
87
+ cache: "pnpm"
88
+ cache-dependency-path: bead/deployment/jspsych/pnpm-lock.yaml
89
+
90
+ - name: Install dependencies
91
+ run: pnpm install
92
+
93
+ - name: Build TypeScript
94
+ run: pnpm build
95
+
96
+ ts-test:
97
+ name: TypeScript Test
98
+ runs-on: ubuntu-latest
99
+ defaults:
100
+ run:
101
+ working-directory: bead/deployment/jspsych
102
+ steps:
103
+ - uses: actions/checkout@v4
104
+
105
+ - name: Install pnpm
106
+ uses: pnpm/action-setup@v4
107
+ with:
108
+ version: 9
109
+
110
+ - name: Set up Node.js
111
+ uses: actions/setup-node@v4
112
+ with:
113
+ node-version: "22"
114
+ cache: "pnpm"
115
+ cache-dependency-path: bead/deployment/jspsych/pnpm-lock.yaml
116
+
117
+ - name: Install dependencies
118
+ run: pnpm install
119
+
120
+ - name: Run tests
121
+ run: pnpm test
122
+
123
+ # Python jobs
124
+ lint:
125
+ name: Lint
126
+ runs-on: ubuntu-latest
127
+ steps:
128
+ - uses: actions/checkout@v4
129
+
130
+ - name: Set up Python
131
+ uses: actions/setup-python@v5
132
+ with:
133
+ python-version: "3.13"
134
+
135
+ - name: Install ruff
136
+ run: pip install ruff
137
+
138
+ - name: Run ruff linter
139
+ run: ruff check .
140
+
141
+ format:
142
+ name: Format
143
+ runs-on: ubuntu-latest
144
+ steps:
145
+ - uses: actions/checkout@v4
146
+
147
+ - name: Set up Python
148
+ uses: actions/setup-python@v5
149
+ with:
150
+ python-version: "3.13"
151
+
152
+ - name: Install ruff
153
+ run: pip install ruff
154
+
155
+ - name: Check formatting
156
+ run: ruff format --check .
157
+
158
+ typecheck:
159
+ name: Type Check
160
+ runs-on: ubuntu-latest
161
+ steps:
162
+ - uses: actions/checkout@v4
163
+
164
+ - name: Set up Python
165
+ uses: actions/setup-python@v5
166
+ with:
167
+ python-version: "3.13"
168
+
169
+ - name: Install dependencies
170
+ run: |
171
+ pip install --upgrade pip
172
+ pip install -e ".[dev,behavioral-analysis]"
173
+
174
+ - name: Run pyright
175
+ run: pyright
176
+
177
+ test:
178
+ name: Test
179
+ runs-on: ubuntu-latest
180
+ needs: [ts-build] # Python tests need TypeScript compiled
181
+ steps:
182
+ - uses: actions/checkout@v4
183
+
184
+ - name: Install pnpm
185
+ uses: pnpm/action-setup@v4
186
+ with:
187
+ version: 9
188
+
189
+ - name: Set up Node.js
190
+ uses: actions/setup-node@v4
191
+ with:
192
+ node-version: "22"
193
+ cache: "pnpm"
194
+ cache-dependency-path: bead/deployment/jspsych/pnpm-lock.yaml
195
+
196
+ - name: Install TypeScript dependencies
197
+ working-directory: bead/deployment/jspsych
198
+ run: pnpm install
199
+
200
+ - name: Build TypeScript
201
+ working-directory: bead/deployment/jspsych
202
+ run: pnpm build
203
+
204
+ - name: Set up Python
205
+ uses: actions/setup-python@v5
206
+ with:
207
+ python-version: "3.13"
208
+
209
+ - name: Cache pip packages
210
+ uses: actions/cache@v4
211
+ with:
212
+ path: ~/.cache/pip
213
+ key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
214
+ restore-keys: |
215
+ ${{ runner.os }}-pip-
216
+
217
+ - name: Create virtual environment
218
+ run: python -m venv .venv
219
+
220
+ - name: Install uv
221
+ run: pip install uv
222
+
223
+ - name: Install dependencies in venv
224
+ run: |
225
+ .venv/bin/pip install --upgrade pip
226
+ .venv/bin/pip install -e ".[dev,api,training,stats,behavioral-analysis]"
227
+
228
+ - name: Set up test fixtures
229
+ run: |
230
+ mkdir -p tests/fixtures/cli_work
231
+ cp -r tests/fixtures/api_docs/* tests/fixtures/cli_work/
232
+
233
+ - name: Run tests
234
+ run: .venv/bin/pytest --codeblocks --cov=bead --cov-report=xml --cov-report=term-missing -m "not slow_model_training"
235
+
236
+ - name: Upload coverage to Codecov
237
+ uses: codecov/codecov-action@v4
238
+ with:
239
+ files: ./coverage.xml
240
+ fail_ci_if_error: false
241
+ env:
242
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,53 @@
1
+ name: Deploy Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ pages: write
11
+ id-token: write
12
+
13
+ concurrency:
14
+ group: "pages"
15
+ cancel-in-progress: false
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v5
25
+ with:
26
+ python-version: "3.13"
27
+
28
+ - name: Install uv
29
+ uses: astral-sh/setup-uv@v4
30
+
31
+ - name: Install dependencies
32
+ run: |
33
+ uv sync --all-extras
34
+ uv pip install -r docs/requirements.txt
35
+
36
+ - name: Build documentation
37
+ run: uv run mkdocs build
38
+
39
+ - name: Upload artifact
40
+ uses: actions/upload-pages-artifact@v3
41
+ with:
42
+ path: site/
43
+
44
+ deploy:
45
+ environment:
46
+ name: github-pages
47
+ url: ${{ steps.deployment.outputs.page_url }}
48
+ runs-on: ubuntu-latest
49
+ needs: build
50
+ steps:
51
+ - name: Deploy to GitHub Pages
52
+ id: deployment
53
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,70 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ build:
14
+ name: Build distribution
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: "3.13"
23
+
24
+ - name: Install build tools
25
+ run: pip install build
26
+
27
+ - name: Build package
28
+ run: python -m build
29
+
30
+ - name: Upload distribution artifacts
31
+ uses: actions/upload-artifact@v4
32
+ with:
33
+ name: python-package-distributions
34
+ path: dist/
35
+
36
+ publish-pypi:
37
+ name: Publish to PyPI
38
+ needs: build
39
+ runs-on: ubuntu-latest
40
+ environment:
41
+ name: pypi
42
+ url: https://pypi.org/p/bead
43
+ steps:
44
+ - name: Download distribution artifacts
45
+ uses: actions/download-artifact@v4
46
+ with:
47
+ name: python-package-distributions
48
+ path: dist/
49
+
50
+ - name: Publish to PyPI
51
+ uses: pypa/gh-action-pypi-publish@release/v1
52
+
53
+ publish-testpypi:
54
+ name: Publish to TestPyPI
55
+ needs: build
56
+ runs-on: ubuntu-latest
57
+ environment:
58
+ name: testpypi
59
+ url: https://test.pypi.org/p/bead
60
+ steps:
61
+ - name: Download distribution artifacts
62
+ uses: actions/download-artifact@v4
63
+ with:
64
+ name: python-package-distributions
65
+ path: dist/
66
+
67
+ - name: Publish to TestPyPI
68
+ uses: pypa/gh-action-pypi-publish@release/v1
69
+ with:
70
+ repository-url: https://test.pypi.org/legacy/
bead-0.1.0/.gitignore ADDED
@@ -0,0 +1,37 @@
1
+ design-notes/
2
+ presentations/
3
+ __pycache__/
4
+ *.pyc
5
+ *.pyo
6
+ *.pyd
7
+ .venv/
8
+ .coverage
9
+ gallery/**/.cache
10
+ gallery/**/lexicons/*.jsonl
11
+ gallery/**/templates/*.jsonl
12
+ gallery/**/filled_templates/*.jsonl
13
+ gallery/**/items/*.jsonl
14
+ gallery/**/lists/*.jsonl
15
+ gallery/**/deployment/
16
+ node_modules/
17
+ bead/deployment/jspsych/dist/
18
+ coverage/
19
+ site/
20
+
21
+ # Documentation test working directories (temporary copies of fixtures)
22
+ tests/fixtures/api_work/
23
+ tests/fixtures/cli_work/
24
+
25
+ # Documentation test artifacts (created in project root if tests fail to cd)
26
+ /constraints/
27
+ /experiment/
28
+ /items/
29
+ /lexicons/
30
+ /templates/
31
+ /lists/
32
+ /filled_templates/
33
+ /responses/
34
+ /exports/
35
+ /trial_config_*.json
36
+ /*.jzip
37
+ .claude/
@@ -0,0 +1,50 @@
1
+ # Pre-commit hooks for bead package
2
+ #
3
+ # Installation:
4
+ # pip install pre-commit
5
+ # pre-commit install
6
+ #
7
+ # Run manually:
8
+ # pre-commit run --all-files
9
+ #
10
+ # Update hook versions:
11
+ # pre-commit autoupdate
12
+
13
+ repos:
14
+ # Docstring format validation (NumPy convention)
15
+ - repo: https://github.com/pycqa/pydocstyle
16
+ rev: 6.3.0
17
+ hooks:
18
+ - id: pydocstyle
19
+ args:
20
+ - --convention=numpy
21
+ # D105: Missing docstring in magic method (acceptable)
22
+ # D107: Missing docstring in __init__ (we document in class docstring)
23
+ # D202: No blank lines allowed after docstring (conflicts with ruff format)
24
+ - --add-ignore=D105,D107,D202
25
+ exclude: ^(tests/|bead/dsl/parser\.py|gallery/)
26
+
27
+ # Docstring-signature consistency validation
28
+ - repo: https://github.com/terrencepreilly/darglint
29
+ rev: v1.8.1
30
+ hooks:
31
+ - id: darglint
32
+ args:
33
+ # Verbosity level 2: full error messages
34
+ - -v
35
+ - "2"
36
+ exclude: ^(tests/|bead/dsl/parser\.py|bead/active_learning/|bead/simulation/)
37
+
38
+ # Additional code quality checks (optional but recommended)
39
+ # Uncomment to enable after Phase 2
40
+
41
+ # - repo: https://github.com/pre-commit/pre-commit-hooks
42
+ # rev: v4.5.0
43
+ # hooks:
44
+ # - id: trailing-whitespace
45
+ # - id: end-of-file-fixer
46
+ # - id: check-yaml
47
+ # - id: check-added-large-files
48
+ # - id: check-merge-conflict
49
+ # - id: check-toml
50
+ # - id: mixed-line-ending
@@ -0,0 +1 @@
1
+ 3.13
@@ -0,0 +1,18 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-24.04
5
+ tools:
6
+ python: "3.13"
7
+ jobs:
8
+ post_create_environment:
9
+ - pip install uv
10
+ post_install:
11
+ - uv pip install --system -e ".[dev]"
12
+
13
+ mkdocs:
14
+ configuration: mkdocs.yml
15
+
16
+ python:
17
+ install:
18
+ - requirements: docs/requirements.txt