edsl 0.1.53__tar.gz → 0.1.55__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 (399) hide show
  1. {edsl-0.1.53 → edsl-0.1.55}/PKG-INFO +52 -76
  2. {edsl-0.1.53 → edsl-0.1.55}/README.md +49 -75
  3. {edsl-0.1.53 → edsl-0.1.55}/edsl/__init__.py +8 -1
  4. edsl-0.1.55/edsl/__init__original.py +134 -0
  5. edsl-0.1.55/edsl/__version__.py +1 -0
  6. {edsl-0.1.53 → edsl-0.1.55}/edsl/agents/agent.py +29 -0
  7. {edsl-0.1.53 → edsl-0.1.55}/edsl/agents/agent_list.py +36 -1
  8. {edsl-0.1.53 → edsl-0.1.55}/edsl/base/base_class.py +281 -151
  9. {edsl-0.1.53 → edsl-0.1.55}/edsl/buckets/__init__.py +8 -3
  10. {edsl-0.1.53 → edsl-0.1.55}/edsl/buckets/bucket_collection.py +9 -3
  11. {edsl-0.1.53 → edsl-0.1.55}/edsl/buckets/model_buckets.py +4 -2
  12. {edsl-0.1.53 → edsl-0.1.55}/edsl/buckets/token_bucket.py +2 -2
  13. {edsl-0.1.53 → edsl-0.1.55}/edsl/buckets/token_bucket_client.py +5 -3
  14. {edsl-0.1.53 → edsl-0.1.55}/edsl/caching/cache.py +131 -62
  15. {edsl-0.1.53 → edsl-0.1.55}/edsl/caching/cache_entry.py +70 -58
  16. {edsl-0.1.53 → edsl-0.1.55}/edsl/caching/sql_dict.py +17 -0
  17. edsl-0.1.55/edsl/cli.py +142 -0
  18. {edsl-0.1.53 → edsl-0.1.55}/edsl/config/config_class.py +16 -0
  19. edsl-0.1.55/edsl/conversation/__init__.py +31 -0
  20. {edsl-0.1.53 → edsl-0.1.55}/edsl/coop/coop.py +276 -242
  21. edsl-0.1.55/edsl/coop/coop_jobs_objects.py +59 -0
  22. edsl-0.1.55/edsl/coop/coop_objects.py +29 -0
  23. edsl-0.1.55/edsl/coop/coop_regular_objects.py +26 -0
  24. {edsl-0.1.53 → edsl-0.1.55}/edsl/coop/utils.py +24 -19
  25. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/dataset.py +338 -101
  26. edsl-0.1.55/edsl/db_list/sqlite_list.py +349 -0
  27. edsl-0.1.55/edsl/inference_services/__init__.py +48 -0
  28. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/exceptions.py +11 -0
  29. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/anthropic_service.py +5 -2
  30. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/aws_bedrock.py +6 -2
  31. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/azure_ai.py +6 -2
  32. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/google_service.py +3 -2
  33. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/mistral_ai_service.py +6 -2
  34. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/open_ai_service.py +6 -2
  35. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/perplexity_service.py +6 -2
  36. edsl-0.1.55/edsl/inference_services/services/test_service.py +191 -0
  37. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/answering_function.py +167 -59
  38. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/interview.py +124 -72
  39. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/interview_task_manager.py +10 -0
  40. {edsl-0.1.53 → edsl-0.1.55}/edsl/invigilators/invigilators.py +10 -1
  41. edsl-0.1.55/edsl/jobs/async_interview_runner.py +248 -0
  42. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/data_structures.py +6 -4
  43. edsl-0.1.55/edsl/jobs/decorators.py +96 -0
  44. edsl-0.1.55/edsl/jobs/fetch_invigilator.py +90 -0
  45. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/html_table_job_logger.py +14 -2
  46. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/jobs.py +180 -104
  47. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/jobs_component_constructor.py +2 -2
  48. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/jobs_interview_constructor.py +2 -0
  49. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/jobs_pricing_estimation.py +127 -46
  50. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/jobs_remote_inference_logger.py +4 -0
  51. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/jobs_runner_status.py +30 -25
  52. edsl-0.1.55/edsl/jobs/progress_bar_manager.py +79 -0
  53. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/remote_inference.py +35 -1
  54. {edsl-0.1.53 → edsl-0.1.55}/edsl/key_management/key_lookup_builder.py +6 -1
  55. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/language_model.py +102 -12
  56. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/model.py +10 -3
  57. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/price_manager.py +45 -75
  58. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/registry.py +5 -0
  59. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/utilities.py +2 -1
  60. {edsl-0.1.53 → edsl-0.1.55}/edsl/notebooks/notebook.py +77 -10
  61. edsl-0.1.55/edsl/questions/VALIDATION_README.md +134 -0
  62. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/__init__.py +24 -1
  63. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/exceptions.py +21 -0
  64. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_check_box.py +171 -149
  65. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_dict.py +243 -51
  66. edsl-0.1.55/edsl/questions/question_multiple_choice_with_other.py +624 -0
  67. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_registry.py +2 -1
  68. edsl-0.1.55/edsl/questions/templates/multiple_choice_with_other/answering_instructions.jinja +15 -0
  69. edsl-0.1.55/edsl/questions/templates/multiple_choice_with_other/question_presentation.jinja +17 -0
  70. edsl-0.1.55/edsl/questions/templates/yes_no/__init__.py +0 -0
  71. edsl-0.1.55/edsl/questions/validation_analysis.py +185 -0
  72. edsl-0.1.55/edsl/questions/validation_cli.py +131 -0
  73. edsl-0.1.55/edsl/questions/validation_html_report.py +404 -0
  74. edsl-0.1.55/edsl/questions/validation_logger.py +136 -0
  75. {edsl-0.1.53 → edsl-0.1.55}/edsl/results/result.py +63 -16
  76. {edsl-0.1.53 → edsl-0.1.55}/edsl/results/results.py +702 -171
  77. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/construct_download_link.py +16 -3
  78. edsl-0.1.55/edsl/scenarios/directory_scanner.py +258 -0
  79. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/file_methods.py +5 -0
  80. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/file_store.py +117 -6
  81. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/__init__.py +5 -1
  82. edsl-0.1.55/edsl/scenarios/handlers/mp4_file_store.py +104 -0
  83. edsl-0.1.55/edsl/scenarios/handlers/webm_file_store.py +104 -0
  84. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/scenario.py +120 -101
  85. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/scenario_list.py +800 -727
  86. edsl-0.1.55/edsl/scenarios/scenario_list_gc_test.py +146 -0
  87. edsl-0.1.55/edsl/scenarios/scenario_list_memory_test.py +214 -0
  88. edsl-0.1.55/edsl/scenarios/scenario_list_source_refactor.md +35 -0
  89. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/scenario_selector.py +5 -4
  90. edsl-0.1.55/edsl/scenarios/scenario_source.py +1990 -0
  91. edsl-0.1.55/edsl/scenarios/tests/test_scenario_list_sources.py +52 -0
  92. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/survey.py +22 -0
  93. {edsl-0.1.53 → edsl-0.1.55}/edsl/tasks/__init__.py +4 -2
  94. {edsl-0.1.53 → edsl-0.1.55}/edsl/tasks/task_history.py +198 -36
  95. edsl-0.1.55/edsl/tests/scenarios/test_ScenarioSource.py +51 -0
  96. edsl-0.1.55/edsl/tests/scenarios/test_scenario_list_sources.py +51 -0
  97. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/__init__.py +2 -1
  98. edsl-0.1.55/edsl/utilities/decorators.py +197 -0
  99. edsl-0.1.55/edsl/utilities/memory_debugger.py +1010 -0
  100. {edsl-0.1.53 → edsl-0.1.55}/pyproject.toml +11 -7
  101. edsl-0.1.53/edsl/__version__.py +0 -1
  102. edsl-0.1.53/edsl/cli.py +0 -43
  103. edsl-0.1.53/edsl/inference_services/__init__.py +0 -13
  104. edsl-0.1.53/edsl/inference_services/services/test_service.py +0 -93
  105. edsl-0.1.53/edsl/jobs/async_interview_runner.py +0 -206
  106. edsl-0.1.53/edsl/jobs/decorators.py +0 -35
  107. edsl-0.1.53/edsl/jobs/fetch_invigilator.py +0 -47
  108. edsl-0.1.53/edsl/jobs/jobs_runner_asyncio.py +0 -281
  109. edsl-0.1.53/edsl/language_models/unused/fake_openai_service.py +0 -60
  110. edsl-0.1.53/edsl/scenarios/directory_scanner.py +0 -258
  111. edsl-0.1.53/edsl/utilities/decorators.py +0 -76
  112. {edsl-0.1.53 → edsl-0.1.55}/LICENSE +0 -0
  113. {edsl-0.1.53 → edsl-0.1.55}/edsl/agents/__init__.py +0 -0
  114. {edsl-0.1.53 → edsl-0.1.55}/edsl/agents/descriptors.py +0 -0
  115. {edsl-0.1.53 → edsl-0.1.55}/edsl/agents/exceptions.py +0 -0
  116. {edsl-0.1.53 → edsl-0.1.55}/edsl/base/__init__.py +0 -0
  117. {edsl-0.1.53 → edsl-0.1.55}/edsl/base/base_exception.py +0 -0
  118. {edsl-0.1.53 → edsl-0.1.55}/edsl/base/data_transfer_models.py +0 -0
  119. {edsl-0.1.53 → edsl-0.1.55}/edsl/base/enums.py +0 -0
  120. {edsl-0.1.53 → edsl-0.1.55}/edsl/base/exceptions.py +0 -0
  121. {edsl-0.1.53 → edsl-0.1.55}/edsl/base.py +0 -0
  122. {edsl-0.1.53 → edsl-0.1.55}/edsl/buckets/exceptions.py +0 -0
  123. {edsl-0.1.53 → edsl-0.1.55}/edsl/buckets/token_bucket_api.py +0 -0
  124. {edsl-0.1.53 → edsl-0.1.55}/edsl/caching/__init__.py +0 -0
  125. {edsl-0.1.53 → edsl-0.1.55}/edsl/caching/cache_handler.py +0 -0
  126. {edsl-0.1.53 → edsl-0.1.55}/edsl/caching/exceptions.py +0 -0
  127. {edsl-0.1.53 → edsl-0.1.55}/edsl/caching/orm.py +0 -0
  128. {edsl-0.1.53 → edsl-0.1.55}/edsl/caching/remote_cache_sync.py +0 -0
  129. {edsl-0.1.53 → edsl-0.1.55}/edsl/config/__init__.py +0 -0
  130. {edsl-0.1.53 → edsl-0.1.55}/edsl/config.py +0 -0
  131. {edsl-0.1.53 → edsl-0.1.55}/edsl/conversation/Conversation.py +0 -0
  132. {edsl-0.1.53 → edsl-0.1.55}/edsl/conversation/car_buying.py +0 -0
  133. {edsl-0.1.53 → edsl-0.1.55}/edsl/conversation/chips.py +0 -0
  134. {edsl-0.1.53 → edsl-0.1.55}/edsl/conversation/exceptions.py +0 -0
  135. {edsl-0.1.53 → edsl-0.1.55}/edsl/conversation/mug_negotiation.py +0 -0
  136. {edsl-0.1.53 → edsl-0.1.55}/edsl/conversation/next_speaker_utilities.py +0 -0
  137. {edsl-0.1.53 → edsl-0.1.55}/edsl/coop/__init__.py +0 -0
  138. {edsl-0.1.53 → edsl-0.1.55}/edsl/coop/coop_functions.py +0 -0
  139. {edsl-0.1.53 → edsl-0.1.55}/edsl/coop/ep_key_handling.py +0 -0
  140. {edsl-0.1.53 → edsl-0.1.55}/edsl/coop/exceptions.py +0 -0
  141. {edsl-0.1.53 → edsl-0.1.55}/edsl/coop/price_fetcher.py +0 -0
  142. {edsl-0.1.53 → edsl-0.1.55}/edsl/data_transfer_models.py +0 -0
  143. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/__init__.py +0 -0
  144. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/dataset_operations_mixin.py +0 -0
  145. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/dataset_tree.py +0 -0
  146. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/display/CSSParameterizer.py +0 -0
  147. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/display/__init__.py +0 -0
  148. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/display/table_data_class.py +0 -0
  149. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/display/table_display.css +0 -0
  150. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/display/table_display.py +0 -0
  151. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/display/table_renderers.py +0 -0
  152. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/exceptions.py +0 -0
  153. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/file_exports.py +0 -0
  154. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/r/ggplot.py +0 -0
  155. {edsl-0.1.53 → edsl-0.1.55}/edsl/dataset/tree_explore.py +0 -0
  156. {edsl-0.1.53 → edsl-0.1.55}/edsl/display/__init__.py +0 -0
  157. {edsl-0.1.53 → edsl-0.1.55}/edsl/display/core.py +0 -0
  158. {edsl-0.1.53 → edsl-0.1.55}/edsl/display/plugin.py +0 -0
  159. {edsl-0.1.53 → edsl-0.1.55}/edsl/display/utils.py +0 -0
  160. {edsl-0.1.53 → edsl-0.1.55}/edsl/enums.py +0 -0
  161. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/available_model_cache_handler.py +0 -0
  162. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/available_model_fetcher.py +0 -0
  163. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/data_structures.py +0 -0
  164. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/inference_service_abc.py +0 -0
  165. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/inference_services_collection.py +0 -0
  166. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/models_available_cache.py +0 -0
  167. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/rate_limits_cache.py +0 -0
  168. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/registry.py +0 -0
  169. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/service_availability.py +0 -0
  170. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/__init__.py +0 -0
  171. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/deep_infra_service.py +0 -0
  172. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/deep_seek_service.py +0 -0
  173. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/groq_service.py +0 -0
  174. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/ollama_service.py +0 -0
  175. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/together_ai_service.py +0 -0
  176. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/services/xai_service.py +0 -0
  177. {edsl-0.1.53 → edsl-0.1.55}/edsl/inference_services/write_available.py +0 -0
  178. {edsl-0.1.53 → edsl-0.1.55}/edsl/instructions/__init__.py +0 -0
  179. {edsl-0.1.53 → edsl-0.1.55}/edsl/instructions/change_instruction.py +0 -0
  180. {edsl-0.1.53 → edsl-0.1.55}/edsl/instructions/exceptions.py +0 -0
  181. {edsl-0.1.53 → edsl-0.1.55}/edsl/instructions/instruction.py +0 -0
  182. {edsl-0.1.53 → edsl-0.1.55}/edsl/instructions/instruction_collection.py +0 -0
  183. {edsl-0.1.53 → edsl-0.1.55}/edsl/instructions/instruction_handler.py +0 -0
  184. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/ReportErrors.py +0 -0
  185. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/__init__.py +0 -0
  186. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/exception_tracking.py +0 -0
  187. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/exceptions.py +0 -0
  188. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/interview_status_dictionary.py +0 -0
  189. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/interview_status_enum.py +0 -0
  190. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/interview_status_log.py +0 -0
  191. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/request_token_estimator.py +0 -0
  192. {edsl-0.1.53 → edsl-0.1.55}/edsl/interviews/statistics.py +0 -0
  193. {edsl-0.1.53 → edsl-0.1.55}/edsl/invigilators/__init__.py +0 -0
  194. {edsl-0.1.53 → edsl-0.1.55}/edsl/invigilators/exceptions.py +0 -0
  195. {edsl-0.1.53 → edsl-0.1.55}/edsl/invigilators/invigilator_base.py +0 -0
  196. {edsl-0.1.53 → edsl-0.1.55}/edsl/invigilators/prompt_constructor.py +0 -0
  197. {edsl-0.1.53 → edsl-0.1.55}/edsl/invigilators/prompt_helpers.py +0 -0
  198. {edsl-0.1.53 → edsl-0.1.55}/edsl/invigilators/question_instructions_prompt_builder.py +0 -0
  199. {edsl-0.1.53 → edsl-0.1.55}/edsl/invigilators/question_option_processor.py +0 -0
  200. {edsl-0.1.53 → edsl-0.1.55}/edsl/invigilators/question_template_replacements_builder.py +0 -0
  201. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/__init__.py +0 -0
  202. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/check_survey_scenario_compatibility.py +0 -0
  203. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/exceptions.py +0 -0
  204. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/jobs_checks.py +0 -0
  205. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/jobs_status_enums.py +0 -0
  206. {edsl-0.1.53 → edsl-0.1.55}/edsl/jobs/results_exceptions_handler.py +0 -0
  207. {edsl-0.1.53 → edsl-0.1.55}/edsl/key_management/__init__.py +0 -0
  208. {edsl-0.1.53 → edsl-0.1.55}/edsl/key_management/exceptions.py +0 -0
  209. {edsl-0.1.53 → edsl-0.1.55}/edsl/key_management/key_lookup.py +0 -0
  210. {edsl-0.1.53 → edsl-0.1.55}/edsl/key_management/key_lookup_collection.py +0 -0
  211. {edsl-0.1.53 → edsl-0.1.55}/edsl/key_management/models.py +0 -0
  212. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/__init__.py +0 -0
  213. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/compute_cost.py +0 -0
  214. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/exceptions.py +0 -0
  215. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/model_list.py +0 -0
  216. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/raw_response_handler.py +0 -0
  217. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/repair.py +0 -0
  218. {edsl-0.1.53 → edsl-0.1.55}/edsl/language_models/unused/fake_openai_call.py +0 -0
  219. {edsl-0.1.53 → edsl-0.1.55}/edsl/load_plugins.py +0 -0
  220. {edsl-0.1.53 → edsl-0.1.55}/edsl/logger.py +0 -0
  221. {edsl-0.1.53 → edsl-0.1.55}/edsl/notebooks/__init__.py +0 -0
  222. {edsl-0.1.53 → edsl-0.1.55}/edsl/notebooks/exceptions.py +0 -0
  223. {edsl-0.1.53 → edsl-0.1.55}/edsl/notebooks/notebook_to_latex.py +0 -0
  224. {edsl-0.1.53 → edsl-0.1.55}/edsl/plugins/__init__.py +0 -0
  225. {edsl-0.1.53 → edsl-0.1.55}/edsl/plugins/built_in/export_example.py +0 -0
  226. {edsl-0.1.53 → edsl-0.1.55}/edsl/plugins/built_in/pig_latin.py +0 -0
  227. {edsl-0.1.53 → edsl-0.1.55}/edsl/plugins/cli.py +0 -0
  228. {edsl-0.1.53 → edsl-0.1.55}/edsl/plugins/cli_typer.py +0 -0
  229. {edsl-0.1.53 → edsl-0.1.55}/edsl/plugins/exceptions.py +0 -0
  230. {edsl-0.1.53 → edsl-0.1.55}/edsl/plugins/hookspec.py +0 -0
  231. {edsl-0.1.53 → edsl-0.1.55}/edsl/plugins/plugin_host.py +0 -0
  232. {edsl-0.1.53 → edsl-0.1.55}/edsl/plugins/plugin_manager.py +0 -0
  233. {edsl-0.1.53 → edsl-0.1.55}/edsl/plugins/plugins_registry.py +0 -0
  234. {edsl-0.1.53 → edsl-0.1.55}/edsl/prompts/__init__.py +0 -0
  235. {edsl-0.1.53 → edsl-0.1.55}/edsl/prompts/exceptions.py +0 -0
  236. {edsl-0.1.53 → edsl-0.1.55}/edsl/prompts/prompt.py +0 -0
  237. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/ExceptionExplainer.py +0 -0
  238. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/HTMLQuestion.py +0 -0
  239. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/Quick.py +0 -0
  240. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/answer_validator_mixin.py +0 -0
  241. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/compose_questions.py +0 -0
  242. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/data_structures.py +0 -0
  243. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/decorators.py +0 -0
  244. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/descriptors.py +0 -0
  245. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/loop_processor.py +0 -0
  246. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/prompt_templates/question_budget.jinja +0 -0
  247. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/prompt_templates/question_checkbox.jinja +0 -0
  248. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/prompt_templates/question_extract.jinja +0 -0
  249. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/prompt_templates/question_free_text.jinja +0 -0
  250. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/prompt_templates/question_linear_scale.jinja +0 -0
  251. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/prompt_templates/question_list.jinja +0 -0
  252. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/prompt_templates/question_multiple_choice.jinja +0 -0
  253. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/prompt_templates/question_numerical.jinja +0 -0
  254. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_base.py +0 -0
  255. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_base_gen_mixin.py +0 -0
  256. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_base_prompts_mixin.py +0 -0
  257. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_budget.py +0 -0
  258. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_extract.py +0 -0
  259. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_free_text.py +0 -0
  260. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_functional.py +0 -0
  261. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_likert_five.py +0 -0
  262. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_linear_scale.py +0 -0
  263. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_list.py +0 -0
  264. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_matrix.py +0 -0
  265. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_multiple_choice.py +0 -0
  266. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_numerical.py +0 -0
  267. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_rank.py +0 -0
  268. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_top_k.py +0 -0
  269. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/question_yes_no.py +0 -0
  270. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/register_questions_meta.py +0 -0
  271. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/response_validator_abc.py +0 -0
  272. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/response_validator_factory.py +0 -0
  273. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/settings.py +0 -0
  274. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/simple_ask_mixin.py +0 -0
  275. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/__init__.py +0 -0
  276. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/budget/__init__.py +0 -0
  277. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/budget/answering_instructions.jinja +0 -0
  278. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/budget/question_presentation.jinja +0 -0
  279. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/checkbox/__init__.py +0 -0
  280. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/checkbox/answering_instructions.jinja +0 -0
  281. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/checkbox/question_presentation.jinja +0 -0
  282. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/dict/__init__.py +0 -0
  283. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/dict/answering_instructions.jinja +0 -0
  284. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/dict/question_presentation.jinja +0 -0
  285. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/extract/__init__.py +0 -0
  286. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/extract/answering_instructions.jinja +0 -0
  287. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/extract/question_presentation.jinja +0 -0
  288. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/free_text/__init__.py +0 -0
  289. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/free_text/answering_instructions.jinja +0 -0
  290. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/free_text/question_presentation.jinja +0 -0
  291. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/likert_five/__init__.py +0 -0
  292. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/likert_five/answering_instructions.jinja +0 -0
  293. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/likert_five/question_presentation.jinja +0 -0
  294. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/linear_scale/__init__.py +0 -0
  295. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/linear_scale/answering_instructions.jinja +0 -0
  296. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/linear_scale/question_presentation.jinja +0 -0
  297. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/list/__init__.py +0 -0
  298. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/list/answering_instructions.jinja +0 -0
  299. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/list/question_presentation.jinja +0 -0
  300. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/matrix/__init__.py +0 -0
  301. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/matrix/answering_instructions.jinja +0 -0
  302. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/matrix/question_presentation.jinja +0 -0
  303. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/multiple_choice/__init__.py +0 -0
  304. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/multiple_choice/answering_instructions.jinja +0 -0
  305. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/multiple_choice/html.jinja +0 -0
  306. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/multiple_choice/question_presentation.jinja +0 -0
  307. {edsl-0.1.53/edsl/questions/templates/numerical → edsl-0.1.55/edsl/questions/templates/multiple_choice_with_other}/__init__.py +0 -0
  308. {edsl-0.1.53/edsl/questions/templates/rank → edsl-0.1.55/edsl/questions/templates/numerical}/__init__.py +0 -0
  309. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/numerical/answering_instructions.jinja +0 -0
  310. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/numerical/question_presentation.jinja +0 -0
  311. {edsl-0.1.53/edsl/questions/templates/top_k → edsl-0.1.55/edsl/questions/templates/rank}/__init__.py +0 -0
  312. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/rank/answering_instructions.jinja +0 -0
  313. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/rank/question_presentation.jinja +0 -0
  314. {edsl-0.1.53/edsl/questions/templates/yes_no → edsl-0.1.55/edsl/questions/templates/top_k}/__init__.py +0 -0
  315. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/top_k/answering_instructions.jinja +0 -0
  316. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/top_k/question_presentation.jinja +0 -0
  317. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/yes_no/answering_instructions.jinja +0 -0
  318. {edsl-0.1.53 → edsl-0.1.55}/edsl/questions/templates/yes_no/question_presentation.jinja +0 -0
  319. {edsl-0.1.53 → edsl-0.1.55}/edsl/results/__init__.py +0 -0
  320. {edsl-0.1.53 → edsl-0.1.55}/edsl/results/exceptions.py +0 -0
  321. {edsl-0.1.53 → edsl-0.1.55}/edsl/results/report.py +0 -0
  322. {edsl-0.1.53 → edsl-0.1.55}/edsl/results/results_selector.py +0 -0
  323. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/DocxScenario.py +0 -0
  324. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/PdfExtractor.py +0 -0
  325. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/__init__.py +0 -0
  326. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/document_chunker.py +0 -0
  327. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/exceptions.py +0 -0
  328. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/csv_file_store.py +0 -0
  329. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/docx_file_store.py +0 -0
  330. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/html_file_store.py +0 -0
  331. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/jpeg_file_store.py +0 -0
  332. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/json_file_store.py +0 -0
  333. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/latex_file_store.py +0 -0
  334. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/md_file_store.py +0 -0
  335. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/pdf_file_store.py +0 -0
  336. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/png_file_store.py +0 -0
  337. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/pptx_file_store.py +0 -0
  338. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/py_file_store.py +0 -0
  339. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/sql_file_store.py +0 -0
  340. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/sqlite_file_store.py +0 -0
  341. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/handlers/txt_file_store.py +0 -0
  342. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/scenario_join.py +0 -0
  343. {edsl-0.1.53 → edsl-0.1.55}/edsl/scenarios/scenario_list_pdf_tools.py +0 -0
  344. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/__init__.py +0 -0
  345. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/base.py +0 -0
  346. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/dag/__init__.py +0 -0
  347. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/dag/construct_dag.py +0 -0
  348. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/dag/dag.py +0 -0
  349. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/descriptors.py +0 -0
  350. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/edit_survey.py +0 -0
  351. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/exceptions.py +0 -0
  352. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/memory/__init__.py +0 -0
  353. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/memory/memory.py +0 -0
  354. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/memory/memory_management.py +0 -0
  355. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/memory/memory_plan.py +0 -0
  356. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/rules/__init__.py +0 -0
  357. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/rules/rule.py +0 -0
  358. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/rules/rule_collection.py +0 -0
  359. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/rules/rule_manager.py +0 -0
  360. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/survey_css.py +0 -0
  361. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/survey_export.py +0 -0
  362. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/survey_flow_visualization.py +0 -0
  363. {edsl-0.1.53 → edsl-0.1.55}/edsl/surveys/survey_simulator.py +0 -0
  364. {edsl-0.1.53 → edsl-0.1.55}/edsl/tasks/exceptions.py +0 -0
  365. {edsl-0.1.53 → edsl-0.1.55}/edsl/tasks/question_task_creator.py +0 -0
  366. {edsl-0.1.53 → edsl-0.1.55}/edsl/tasks/task_creators.py +0 -0
  367. {edsl-0.1.53 → edsl-0.1.55}/edsl/tasks/task_status_enum.py +0 -0
  368. {edsl-0.1.53 → edsl-0.1.55}/edsl/tasks/task_status_log.py +0 -0
  369. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/base.html +0 -0
  370. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/exceptions_by_model.html +0 -0
  371. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/exceptions_by_question_name.html +0 -0
  372. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/exceptions_by_type.html +0 -0
  373. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/exceptions_table.html +0 -0
  374. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/interview_details.html +0 -0
  375. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/interviews.html +0 -0
  376. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/overview.html +0 -0
  377. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/performance_plot.html +0 -0
  378. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/report.css +0 -0
  379. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/report.html +0 -0
  380. {edsl-0.1.53 → edsl-0.1.55}/edsl/templates/error_reporting/report.js +0 -0
  381. {edsl-0.1.53 → edsl-0.1.55}/edsl/tokens/__init__.py +0 -0
  382. {edsl-0.1.53 → edsl-0.1.55}/edsl/tokens/exceptions.py +0 -0
  383. {edsl-0.1.53 → edsl-0.1.55}/edsl/tokens/interview_token_usage.py +0 -0
  384. {edsl-0.1.53 → edsl-0.1.55}/edsl/tokens/token_usage.py +0 -0
  385. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/PrettyList.py +0 -0
  386. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/SystemInfo.py +0 -0
  387. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/ast_utilities.py +0 -0
  388. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/gcp_bucket/__init__.py +0 -0
  389. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/gcp_bucket/cloud_storage.py +0 -0
  390. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/is_notebook.py +0 -0
  391. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/is_valid_variable_name.py +0 -0
  392. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/markdown_to_docx.py +0 -0
  393. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/markdown_to_pdf.py +0 -0
  394. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/naming_utilities.py +0 -0
  395. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/remove_edsl_version.py +0 -0
  396. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/repair_functions.py +0 -0
  397. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/restricted_python.py +0 -0
  398. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/template_loader.py +0 -0
  399. {edsl-0.1.53 → edsl-0.1.55}/edsl/utilities/utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: edsl
3
- Version: 0.1.53
3
+ Version: 0.1.55
4
4
  Summary: Create and analyze LLM-based surveys
5
5
  Home-page: https://www.expectedparrot.com/
6
6
  License: MIT
@@ -29,6 +29,7 @@ Requires-Dist: json-repair (>=0.28.4,<0.29.0)
29
29
  Requires-Dist: jupyter (>=1.0.0,<2.0.0)
30
30
  Requires-Dist: markdown2 (>=2.4.11,<3.0.0)
31
31
  Requires-Dist: matplotlib (>=3.8,<3.9)
32
+ Requires-Dist: memory-profiler (>=0.61.0,<0.62.0)
32
33
  Requires-Dist: mistralai (>=1.0.2,<2.0.0)
33
34
  Requires-Dist: nest-asyncio (>=1.5.9,<2.0.0)
34
35
  Requires-Dist: numpy (>=1.22,<2.0)
@@ -39,6 +40,7 @@ Requires-Dist: platformdirs (>=4.3.6,<5.0.0)
39
40
  Requires-Dist: pluggy (>=1.3.0,<2.0.0)
40
41
  Requires-Dist: pydot (>=2.0.0,<3.0.0)
41
42
  Requires-Dist: pygments (>=2.17.2,<3.0.0)
43
+ Requires-Dist: pymupdf (>=1.25.5,<2.0.0)
42
44
  Requires-Dist: pypdf2 (>=3.0.1,<4.0.0)
43
45
  Requires-Dist: pyreadstat (>=1.2.7,<2.0.0)
44
46
  Requires-Dist: python-docx (>=1.1.0,<2.0.0)
@@ -56,14 +58,53 @@ Requires-Dist: urllib3 (>=1.25.4,<1.27)
56
58
  Project-URL: Documentation, https://docs.expectedparrot.com
57
59
  Description-Content-Type: text/markdown
58
60
 
59
- # Expected Parrot Domain-Specific Language (EDSL)
60
-
61
- The Expected Parrot Domain-Specific Language (EDSL) package makes it easy to conduct computational social science and market research with AI. Use it to design surveys and experiments, collect responses from humans and large language models, and perform data labeling and many other research tasks. Results are formatted as specified datasets and come with built-in methods for analyzing, visualizing and sharing.
62
-
63
61
  <p align="right">
64
62
  <img src="https://github.com/expectedparrot/edsl/blob/main/static/logo.png?raw=true" alt="edsl.png" width="100"/>
65
63
  </p>
66
64
 
65
+ # Expected Parrot Domain-Specific Language (EDSL)
66
+
67
+ EDSL makes it easy to conduct computational social science and market research with AI. Use it to design and run surveys and experiments with many AI agents and large language models at once, or to perform complex data labeling and other research tasks. Results are formatted as specified datasets that can be replicated at no cost, and come with built-in methods for analysis, visualization and collaboration.
68
+
69
+ ## Getting started
70
+
71
+ 1. Run `pip install edsl` to install the package. See <a href="https://www.expectedparrot.com/getting-started" target="_blank" rel="noopener noreferrer">instructions</a>.
72
+
73
+ 2. <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Create an account</a> to run surveys at the Expected Parrot server and access a <a href="https://docs.expectedparrot.com/en/latest/remote_caching.html" target="_blank" rel="noopener noreferrer">universal remote cache</a> of stored responses for reproducing results.
74
+
75
+ 3. Choose whether to use your own keys for language models or get an Expected Parrot key to access all available models at once. Securely <a href="https://www.expectedparrot.com/getting-started/edsl-api-keys" target="_blank" rel="noopener noreferrer">manage keys</a>, expenses and usage for your team from your account.
76
+
77
+ 4. Run the <a href="https://docs.expectedparrot.com/en/latest/starter_tutorial.html" target="_blank" rel="noopener noreferrer">starter tutorial</a> and explore other demo notebooks for a variety of use cases.
78
+
79
+ 5. Share workflows and survey results at <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Coop</a>: a free platform for creating and sharing AI research.
80
+
81
+ 6. Join our <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a> for updates and discussions!
82
+
83
+ ## Code & Docs
84
+ - <a href="https://github.com/expectedparrot/edsl" target="_blank" rel="noopener noreferrer">GitHub</a>
85
+ - <a href="https://pypi.org/project/edsl/" target="_blank" rel="noopener noreferrer">PyPI</a>
86
+ - <a href="https://docs.expectedparrot.com" target="_blank" rel="noopener noreferrer">Documentation</a>
87
+
88
+ ## Requirements
89
+ - Python 3.9 - 3.12
90
+ - API keys for language models. You can use your own keys or an Expected Parrot key that provides access to all available models.
91
+ See instructions on <a href="https://docs.expectedparrot.com/en/latest/api_keys.html" target="_blank" rel="noopener noreferrer">managing keys</a> and <a href="https://www.expectedparrot.com/models" target="_blank" rel="noopener noreferrer">model pricing and performance</a> information.
92
+
93
+ ## Coop
94
+ An integrated platform for running experiments, sharing workflows and launching hybrid human/AI surveys.
95
+ - <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Login / Signup</a>
96
+ - <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Explore</a>
97
+
98
+ ## Community
99
+ - <a href="https://blog.expectedparrot.com" target="_blank" rel="noopener noreferrer">Blog</a>
100
+ - <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a>
101
+ - <a href="https://x.com/ExpectedParrot" target="_blank" rel="noopener noreferrer">Twitter</a>
102
+ - <a href="https://www.linkedin.com/company/expectedparrot/" target="_blank" rel="noopener noreferrer">LinkedIn</a>
103
+
104
+ ## Contact
105
+ - <a href="mailto:info@expectedparrot.com" target="_blank" rel="noopener noreferrer">Email</a>
106
+
107
+
67
108
  ## Features
68
109
 
69
110
  **Declarative design**:
@@ -83,6 +124,7 @@ results = q.run()
83
124
  results.select("example")
84
125
  ```
85
126
 
127
+
86
128
  > | answer.example |
87
129
  > |-----------------|
88
130
  > | Good |
@@ -90,14 +132,14 @@ results.select("example")
90
132
  <br>
91
133
 
92
134
  **Parameterized prompts**:
93
- Easily parameterize and control prompts with "<a href="https://docs.expectedparrot.com/en/latest/scenarios.html" target="_blank" rel="noopener noreferrer">scenarios</a>" of data automatically imported from many sources (CSV, PDF, PNG, etc.)(<a href="https://www.expectedparrot.com/content/7bb9ec2e-827b-4867-ac02-33163df1a1d1" target="_blank" rel="noopener noreferrer">view at Coop</a>):
135
+ Easily parameterize and control prompts with "<a href="https://docs.expectedparrot.com/en/latest/scenarios.html" target="_blank" rel="noopener noreferrer">scenarios</a>" of data automatically imported from many sources (CSV, PDF, PNG, etc.) (<a href="https://www.expectedparrot.com/content/7bb9ec2e-827b-4867-ac02-33163df1a1d1" target="_blank" rel="noopener noreferrer">view at Coop</a>):
94
136
 
95
137
  ```python
96
138
  from edsl import ScenarioList, QuestionLinearScale
97
139
 
98
140
  q = QuestionLinearScale(
99
141
  question_name = "example",
100
- question_text = "How much do you enjoy {{ activity }}?",
142
+ question_text = "How much do you enjoy {{ scenario.activity }}?",
101
143
  question_options = [1,2,3,4,5,],
102
144
  option_labels = {1:"Not at all", 5:"Very much"}
103
145
  )
@@ -138,12 +180,12 @@ results.select("persona", "example")
138
180
  > | agent.persona | answer.example |
139
181
  > |----------------|---------------------------------------------|
140
182
  > | botanist | ['Green', 'Earthy Brown', 'Sunset Orange'] |
141
- > | detective | ['Gray', 'Black', 'Navy Blye'] |
183
+ > | detective | ['Gray', 'Black', 'Navy Blue'] |
142
184
 
143
185
  <br>
144
186
 
145
187
  **Simplified access to LLMs**:
146
- Choose whether to use your own keys for LLMs, or access all <a href="https://www.expectedparrot.com/getting-started/coop-pricing" target="_blank" rel="noopener noreferrer">available models</a> with an Expected Parrot API key. Run surveys with many models at once and compare responses at a convenient inferface (<a href="https://www.expectedparrot.com/content/044465f0-b87f-430d-a3b9-4fd3b8560299" target="_blank" rel="noopener noreferrer">view at Coop</a>)
188
+ Choose whether to use your own API keys for LLMs, or access all <a href="https://www.expectedparrot.com/models" target="_blank" rel="noopener noreferrer">available models</a> with an Expected Parrot key. Run surveys with many models at once and compare responses at a convenient inferface (<a href="https://www.expectedparrot.com/content/044465f0-b87f-430d-a3b9-4fd3b8560299" target="_blank" rel="noopener noreferrer">view at Coop</a>)
147
189
 
148
190
  ```python
149
191
  from edsl import Model, ModelList, QuestionFreeText
@@ -200,27 +242,6 @@ results.select("color", "flower")
200
242
  **Caching**:
201
243
  API calls to LLMs are cached automatically, allowing you to retrieve responses to questions that have already been run and reproduce experiments at no cost. Learn more about how the <a href="https://docs.expectedparrot.com/en/latest/remote_caching.html" target="_blank" rel="noopener noreferrer">universal remote cache</a> works.
202
244
 
203
- **Logging**:
204
- EDSL includes a comprehensive logging system to help with debugging and monitoring. Control log levels and see important information about operations:
205
-
206
- ```python
207
- from edsl import logger
208
- import logging
209
-
210
- # Set the logging level
211
- logger.set_level(logging.DEBUG) # Show all log messages
212
-
213
- # Get a module-specific logger
214
- my_logger = logger.get_logger(__name__)
215
- my_logger.info("This is a module-specific log message")
216
-
217
- # Log messages at different levels
218
- logger.debug("Detailed debugging information")
219
- logger.info("General information about operation")
220
- logger.warning("Something unexpected but not critical")
221
- logger.error("Something went wrong")
222
- ```
223
-
224
245
  **Flexibility**:
225
246
  Choose whether to run surveys on your own computer or at the Expected Parrot server.
226
247
 
@@ -228,50 +249,5 @@ Choose whether to run surveys on your own computer or at the Expected Parrot ser
228
249
  Easily share workflows and projects privately or publicly at Coop: an integrated platform for AI-based research. Your account comes with free credits for running surveys, and lets you securely share keys, track expenses and usage for your team.
229
250
 
230
251
  **Built-in tools for analyis**:
231
- Analyze results as specified datasets from your account or workspace. Easily import data to use with your surveys and export results.
232
-
233
- ## Getting started
234
-
235
- 1. Run `pip install edsl` to install the package.
236
-
237
- 2. <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Create an account</a> to run surveys at the Expected Parrot server and access a <a href="https://docs.expectedparrot.com/en/latest/remote_caching.html" target="_blank" rel="noopener noreferrer">universal remote cache</a> of stored responses for reproducing results.
238
-
239
- 3. Choose whether to use your own keys for language models or get an Expected Parrot key to access all available models at once. Securely <a href="https://docs.expectedparrot.com/en/latest/api_keys.html" target="_blank" rel="noopener noreferrer">manage keys</a>, share expenses and track usage for your team from your account.
240
-
241
- 4. Run the <a href="https://docs.expectedparrot.com/en/latest/starter_tutorial.html" target="_blank" rel="noopener noreferrer">starter tutorial</a> and explore other demo notebooks.
242
-
243
- 5. Share workflows and survey results at <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Coop</a>
244
-
245
- 6. Join our <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a> for updates and discussions! Request new features!
246
-
247
- ## Code & Docs
248
- - <a href="https://pypi.org/project/edsl/" target="_blank" rel="noopener noreferrer">PyPI</a>
249
- - <a href="https://github.com/expectedparrot/edsl" target="_blank" rel="noopener noreferrer">GitHub</a>
250
- - <a href="https://docs.expectedparrot.com" target="_blank" rel="noopener noreferrer">Documentation</a>
251
-
252
- ## Requirements
253
- - Python 3.9 - 3.12
254
- - API keys for language models. You can use your own keys or an Expected Parrot key that provides access to all available models.
255
- See instructions on <a href="https://docs.expectedparrot.com/en/latest/api_keys.html" target="_blank" rel="noopener noreferrer">managing keys</a> and <a href="https://www.expectedparrot.com/getting-started/coop-pricing" target="_blank" rel="noopener noreferrer">model pricing and performance</a> information.
256
-
257
- ## Developer Notes
258
-
259
- ### Running Tests
260
- - Unit tests: `python -m pytest tests/`
261
- - Integration tests: `python -m pytest integration/`
262
- - Doctests: `python run_doctests.py` (use `-v` flag for verbose output)
263
-
264
- ## Coop
265
- An integrated platform for running experiments, sharing workflows and launching hybrid human/AI surveys.
266
- - <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Login / Signup</a>
267
- - <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Explore</a>
268
-
269
- ## Community
270
- - <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a>
271
- - <a href="https://x.com/ExpectedParrot" target="_blank" rel="noopener noreferrer">Twitter</a>
272
- - <a href="https://www.linkedin.com/company/expectedparrot/" target="_blank" rel="noopener noreferrer">LinkedIn</a>
273
- - <a href="https://blog.expectedparrot.com" target="_blank" rel="noopener noreferrer">Blog</a>.
274
-
275
- ## Contact
276
- - <a href="mailto:info@expectedparrot.com" target="_blank" rel="noopener noreferrer">Email</a>.
252
+ Analyze results as specified datasets from your account or workspace. Easily import data to use with your surveys and export results..
277
253
 
@@ -1,11 +1,50 @@
1
- # Expected Parrot Domain-Specific Language (EDSL)
2
-
3
- The Expected Parrot Domain-Specific Language (EDSL) package makes it easy to conduct computational social science and market research with AI. Use it to design surveys and experiments, collect responses from humans and large language models, and perform data labeling and many other research tasks. Results are formatted as specified datasets and come with built-in methods for analyzing, visualizing and sharing.
4
-
5
1
  <p align="right">
6
2
  <img src="https://github.com/expectedparrot/edsl/blob/main/static/logo.png?raw=true" alt="edsl.png" width="100"/>
7
3
  </p>
8
4
 
5
+ # Expected Parrot Domain-Specific Language (EDSL)
6
+
7
+ EDSL makes it easy to conduct computational social science and market research with AI. Use it to design and run surveys and experiments with many AI agents and large language models at once, or to perform complex data labeling and other research tasks. Results are formatted as specified datasets that can be replicated at no cost, and come with built-in methods for analysis, visualization and collaboration.
8
+
9
+ ## Getting started
10
+
11
+ 1. Run `pip install edsl` to install the package. See <a href="https://www.expectedparrot.com/getting-started" target="_blank" rel="noopener noreferrer">instructions</a>.
12
+
13
+ 2. <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Create an account</a> to run surveys at the Expected Parrot server and access a <a href="https://docs.expectedparrot.com/en/latest/remote_caching.html" target="_blank" rel="noopener noreferrer">universal remote cache</a> of stored responses for reproducing results.
14
+
15
+ 3. Choose whether to use your own keys for language models or get an Expected Parrot key to access all available models at once. Securely <a href="https://www.expectedparrot.com/getting-started/edsl-api-keys" target="_blank" rel="noopener noreferrer">manage keys</a>, expenses and usage for your team from your account.
16
+
17
+ 4. Run the <a href="https://docs.expectedparrot.com/en/latest/starter_tutorial.html" target="_blank" rel="noopener noreferrer">starter tutorial</a> and explore other demo notebooks for a variety of use cases.
18
+
19
+ 5. Share workflows and survey results at <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Coop</a>: a free platform for creating and sharing AI research.
20
+
21
+ 6. Join our <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a> for updates and discussions!
22
+
23
+ ## Code & Docs
24
+ - <a href="https://github.com/expectedparrot/edsl" target="_blank" rel="noopener noreferrer">GitHub</a>
25
+ - <a href="https://pypi.org/project/edsl/" target="_blank" rel="noopener noreferrer">PyPI</a>
26
+ - <a href="https://docs.expectedparrot.com" target="_blank" rel="noopener noreferrer">Documentation</a>
27
+
28
+ ## Requirements
29
+ - Python 3.9 - 3.12
30
+ - API keys for language models. You can use your own keys or an Expected Parrot key that provides access to all available models.
31
+ See instructions on <a href="https://docs.expectedparrot.com/en/latest/api_keys.html" target="_blank" rel="noopener noreferrer">managing keys</a> and <a href="https://www.expectedparrot.com/models" target="_blank" rel="noopener noreferrer">model pricing and performance</a> information.
32
+
33
+ ## Coop
34
+ An integrated platform for running experiments, sharing workflows and launching hybrid human/AI surveys.
35
+ - <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Login / Signup</a>
36
+ - <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Explore</a>
37
+
38
+ ## Community
39
+ - <a href="https://blog.expectedparrot.com" target="_blank" rel="noopener noreferrer">Blog</a>
40
+ - <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a>
41
+ - <a href="https://x.com/ExpectedParrot" target="_blank" rel="noopener noreferrer">Twitter</a>
42
+ - <a href="https://www.linkedin.com/company/expectedparrot/" target="_blank" rel="noopener noreferrer">LinkedIn</a>
43
+
44
+ ## Contact
45
+ - <a href="mailto:info@expectedparrot.com" target="_blank" rel="noopener noreferrer">Email</a>
46
+
47
+
9
48
  ## Features
10
49
 
11
50
  **Declarative design**:
@@ -25,6 +64,7 @@ results = q.run()
25
64
  results.select("example")
26
65
  ```
27
66
 
67
+
28
68
  > | answer.example |
29
69
  > |-----------------|
30
70
  > | Good |
@@ -32,14 +72,14 @@ results.select("example")
32
72
  <br>
33
73
 
34
74
  **Parameterized prompts**:
35
- Easily parameterize and control prompts with "<a href="https://docs.expectedparrot.com/en/latest/scenarios.html" target="_blank" rel="noopener noreferrer">scenarios</a>" of data automatically imported from many sources (CSV, PDF, PNG, etc.)(<a href="https://www.expectedparrot.com/content/7bb9ec2e-827b-4867-ac02-33163df1a1d1" target="_blank" rel="noopener noreferrer">view at Coop</a>):
75
+ Easily parameterize and control prompts with "<a href="https://docs.expectedparrot.com/en/latest/scenarios.html" target="_blank" rel="noopener noreferrer">scenarios</a>" of data automatically imported from many sources (CSV, PDF, PNG, etc.) (<a href="https://www.expectedparrot.com/content/7bb9ec2e-827b-4867-ac02-33163df1a1d1" target="_blank" rel="noopener noreferrer">view at Coop</a>):
36
76
 
37
77
  ```python
38
78
  from edsl import ScenarioList, QuestionLinearScale
39
79
 
40
80
  q = QuestionLinearScale(
41
81
  question_name = "example",
42
- question_text = "How much do you enjoy {{ activity }}?",
82
+ question_text = "How much do you enjoy {{ scenario.activity }}?",
43
83
  question_options = [1,2,3,4,5,],
44
84
  option_labels = {1:"Not at all", 5:"Very much"}
45
85
  )
@@ -80,12 +120,12 @@ results.select("persona", "example")
80
120
  > | agent.persona | answer.example |
81
121
  > |----------------|---------------------------------------------|
82
122
  > | botanist | ['Green', 'Earthy Brown', 'Sunset Orange'] |
83
- > | detective | ['Gray', 'Black', 'Navy Blye'] |
123
+ > | detective | ['Gray', 'Black', 'Navy Blue'] |
84
124
 
85
125
  <br>
86
126
 
87
127
  **Simplified access to LLMs**:
88
- Choose whether to use your own keys for LLMs, or access all <a href="https://www.expectedparrot.com/getting-started/coop-pricing" target="_blank" rel="noopener noreferrer">available models</a> with an Expected Parrot API key. Run surveys with many models at once and compare responses at a convenient inferface (<a href="https://www.expectedparrot.com/content/044465f0-b87f-430d-a3b9-4fd3b8560299" target="_blank" rel="noopener noreferrer">view at Coop</a>)
128
+ Choose whether to use your own API keys for LLMs, or access all <a href="https://www.expectedparrot.com/models" target="_blank" rel="noopener noreferrer">available models</a> with an Expected Parrot key. Run surveys with many models at once and compare responses at a convenient inferface (<a href="https://www.expectedparrot.com/content/044465f0-b87f-430d-a3b9-4fd3b8560299" target="_blank" rel="noopener noreferrer">view at Coop</a>)
89
129
 
90
130
  ```python
91
131
  from edsl import Model, ModelList, QuestionFreeText
@@ -142,27 +182,6 @@ results.select("color", "flower")
142
182
  **Caching**:
143
183
  API calls to LLMs are cached automatically, allowing you to retrieve responses to questions that have already been run and reproduce experiments at no cost. Learn more about how the <a href="https://docs.expectedparrot.com/en/latest/remote_caching.html" target="_blank" rel="noopener noreferrer">universal remote cache</a> works.
144
184
 
145
- **Logging**:
146
- EDSL includes a comprehensive logging system to help with debugging and monitoring. Control log levels and see important information about operations:
147
-
148
- ```python
149
- from edsl import logger
150
- import logging
151
-
152
- # Set the logging level
153
- logger.set_level(logging.DEBUG) # Show all log messages
154
-
155
- # Get a module-specific logger
156
- my_logger = logger.get_logger(__name__)
157
- my_logger.info("This is a module-specific log message")
158
-
159
- # Log messages at different levels
160
- logger.debug("Detailed debugging information")
161
- logger.info("General information about operation")
162
- logger.warning("Something unexpected but not critical")
163
- logger.error("Something went wrong")
164
- ```
165
-
166
185
  **Flexibility**:
167
186
  Choose whether to run surveys on your own computer or at the Expected Parrot server.
168
187
 
@@ -170,49 +189,4 @@ Choose whether to run surveys on your own computer or at the Expected Parrot ser
170
189
  Easily share workflows and projects privately or publicly at Coop: an integrated platform for AI-based research. Your account comes with free credits for running surveys, and lets you securely share keys, track expenses and usage for your team.
171
190
 
172
191
  **Built-in tools for analyis**:
173
- Analyze results as specified datasets from your account or workspace. Easily import data to use with your surveys and export results.
174
-
175
- ## Getting started
176
-
177
- 1. Run `pip install edsl` to install the package.
178
-
179
- 2. <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Create an account</a> to run surveys at the Expected Parrot server and access a <a href="https://docs.expectedparrot.com/en/latest/remote_caching.html" target="_blank" rel="noopener noreferrer">universal remote cache</a> of stored responses for reproducing results.
180
-
181
- 3. Choose whether to use your own keys for language models or get an Expected Parrot key to access all available models at once. Securely <a href="https://docs.expectedparrot.com/en/latest/api_keys.html" target="_blank" rel="noopener noreferrer">manage keys</a>, share expenses and track usage for your team from your account.
182
-
183
- 4. Run the <a href="https://docs.expectedparrot.com/en/latest/starter_tutorial.html" target="_blank" rel="noopener noreferrer">starter tutorial</a> and explore other demo notebooks.
184
-
185
- 5. Share workflows and survey results at <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Coop</a>
186
-
187
- 6. Join our <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a> for updates and discussions! Request new features!
188
-
189
- ## Code & Docs
190
- - <a href="https://pypi.org/project/edsl/" target="_blank" rel="noopener noreferrer">PyPI</a>
191
- - <a href="https://github.com/expectedparrot/edsl" target="_blank" rel="noopener noreferrer">GitHub</a>
192
- - <a href="https://docs.expectedparrot.com" target="_blank" rel="noopener noreferrer">Documentation</a>
193
-
194
- ## Requirements
195
- - Python 3.9 - 3.12
196
- - API keys for language models. You can use your own keys or an Expected Parrot key that provides access to all available models.
197
- See instructions on <a href="https://docs.expectedparrot.com/en/latest/api_keys.html" target="_blank" rel="noopener noreferrer">managing keys</a> and <a href="https://www.expectedparrot.com/getting-started/coop-pricing" target="_blank" rel="noopener noreferrer">model pricing and performance</a> information.
198
-
199
- ## Developer Notes
200
-
201
- ### Running Tests
202
- - Unit tests: `python -m pytest tests/`
203
- - Integration tests: `python -m pytest integration/`
204
- - Doctests: `python run_doctests.py` (use `-v` flag for verbose output)
205
-
206
- ## Coop
207
- An integrated platform for running experiments, sharing workflows and launching hybrid human/AI surveys.
208
- - <a href="https://www.expectedparrot.com/login" target="_blank" rel="noopener noreferrer">Login / Signup</a>
209
- - <a href="https://www.expectedparrot.com/content/explore" target="_blank" rel="noopener noreferrer">Explore</a>
210
-
211
- ## Community
212
- - <a href="https://discord.com/invite/mxAYkjfy9m" target="_blank" rel="noopener noreferrer">Discord</a>
213
- - <a href="https://x.com/ExpectedParrot" target="_blank" rel="noopener noreferrer">Twitter</a>
214
- - <a href="https://www.linkedin.com/company/expectedparrot/" target="_blank" rel="noopener noreferrer">LinkedIn</a>
215
- - <a href="https://blog.expectedparrot.com" target="_blank" rel="noopener noreferrer">Blog</a>.
216
-
217
- ## Contact
218
- - <a href="mailto:info@expectedparrot.com" target="_blank" rel="noopener noreferrer">Email</a>.
192
+ Analyze results as specified datasets from your account or workspace. Easily import data to use with your surveys and export results..
@@ -1,3 +1,9 @@
1
+ """
2
+ EDSL: Experimental Design Specification Language
3
+
4
+ EDSL is a Python library for conducting virtual social science experiments, surveys,
5
+ and interviews with large language models.
6
+ """
1
7
  import os
2
8
  import time
3
9
  import importlib
@@ -15,7 +21,7 @@ from edsl import logger
15
21
  # Set up logger with configuration from environment/config
16
22
  # (We'll configure the logger after CONFIG is initialized below)
17
23
 
18
- __all__ = ["logger"]
24
+ __all__ = ["logger", "Config", "CONFIG", "__version__"]
19
25
 
20
26
  # Define modules to import
21
27
  modules_to_import = [
@@ -31,6 +37,7 @@ modules_to_import = [
31
37
  "coop",
32
38
  "instructions",
33
39
  "jobs",
40
+ "base",
34
41
  "conversation",
35
42
  ]
36
43
 
@@ -0,0 +1,134 @@
1
+ import os
2
+ import time
3
+ import importlib
4
+ import pkgutil
5
+
6
+ BASE_DIR = os.path.dirname(os.path.abspath(__file__))
7
+ ROOT_DIR = os.path.dirname(BASE_DIR)
8
+
9
+ from edsl.__version__ import __version__
10
+ from edsl.config import Config, CONFIG
11
+
12
+ # Initialize and expose logger
13
+ from edsl import logger
14
+
15
+ # Set up logger with configuration from environment/config
16
+ # (We'll configure the logger after CONFIG is initialized below)
17
+
18
+ __all__ = ['logger']
19
+
20
+ # Define modules to import
21
+ modules_to_import = [
22
+ 'dataset',
23
+ 'agents',
24
+ 'surveys',
25
+ 'questions',
26
+ 'scenarios',
27
+ 'language_models',
28
+ 'results',
29
+ 'caching',
30
+ 'notebooks',
31
+ 'coop',
32
+ 'instructions',
33
+ 'jobs'
34
+ ]
35
+
36
+ # Dynamically import modules and extend __all__
37
+ for module_name in modules_to_import:
38
+ try:
39
+ # Import the module
40
+ module = importlib.import_module(f'.{module_name}', package='edsl')
41
+
42
+ # Get the module's __all__ attribute
43
+ module_all = getattr(module, '__all__', [])
44
+
45
+ # Import all names from the module
46
+ exec(f"from .{module_name} import *")
47
+
48
+ # Extend __all__ with the module's __all__
49
+ if module_all:
50
+ logger.debug(f"Adding {len(module_all)} items from {module_name} to __all__")
51
+ __all__.extend(module_all)
52
+ else:
53
+ logger.warning(f"Module {module_name} does not have __all__ defined")
54
+ except ImportError as e:
55
+ logger.warning(f"Failed to import module {module_name}: {e}")
56
+ except Exception as e:
57
+ logger.warning(f"Error importing from module {module_name}: {e}")
58
+
59
+
60
+ # Load plugins
61
+ try:
62
+ from edsl.load_plugins import load_plugins
63
+ from edsl.plugins import get_plugin_manager, get_exports
64
+
65
+ # Load all plugins
66
+ plugins = load_plugins()
67
+ logger.info(f"Loaded {len(plugins)} plugins")
68
+
69
+ # Add plugins to globals and __all__
70
+ for plugin_name, plugin in plugins.items():
71
+ globals()[plugin_name] = plugin
72
+ __all__.append(plugin_name)
73
+ logger.info(f"Registered plugin {plugin_name} in global namespace")
74
+
75
+ # Get exports from plugins and add them to globals
76
+ exports = get_exports()
77
+ logger.info(f"Found {len(exports)} exported objects from plugins")
78
+
79
+ for name, obj in exports.items():
80
+ globals()[name] = obj
81
+ __all__.append(name)
82
+ logger.info(f"Added plugin export: {name}")
83
+
84
+ # Add placeholders for expected exports that are missing
85
+ # This maintains backward compatibility for common plugins
86
+ PLUGIN_PLACEHOLDERS = {
87
+ # No placeholders - removed Conjure for cleaner namespace
88
+ }
89
+
90
+ for placeholder_name, github_url in PLUGIN_PLACEHOLDERS.items():
91
+ if placeholder_name not in globals():
92
+ # Create a placeholder class
93
+ placeholder_class = type(placeholder_name, (), {
94
+ "__getattr__": lambda self, name: self._not_installed(name),
95
+ "_not_installed": lambda self, name: self._raise_import_error(),
96
+ "_raise_import_error": lambda self: exec(f"""
97
+ msg = (
98
+ "The {placeholder_name} plugin is not installed. "
99
+ "To use {placeholder_name} with EDSL, install it using:\\n"
100
+ " from edsl.plugins import install_from_github\\n"
101
+ " install_from_github('{github_url}')\\n"
102
+ "\\nOr from the command line:\\n"
103
+ " edsl plugins install {github_url}"
104
+ )
105
+ logger.warning(msg)
106
+ raise ImportError(msg)
107
+ """)
108
+ })
109
+
110
+ # Register the placeholder
111
+ globals()[placeholder_name] = placeholder_class()
112
+ __all__.append(placeholder_name)
113
+ logger.info(f"Added placeholder for {placeholder_name} with installation instructions")
114
+
115
+ except ImportError as e:
116
+ # Modules not available
117
+ logger.info("Plugin system not available, skipping plugin loading: %s", e)
118
+ logger.debug("Plugin system not available, skipping plugin loading: %s", e)
119
+ except Exception as e:
120
+ # Error loading plugins
121
+ logger.error("Error loading plugins: %s", e)
122
+ logger.debug("Error loading plugins: %s", e)
123
+
124
+ # Now that all modules are loaded, configure logging from the config
125
+ logger.configure_from_config()
126
+
127
+
128
+ # Installs a custom exception handling routine for edsl exceptions
129
+ from .base.base_exception import BaseException
130
+ BaseException.install_exception_hook()
131
+
132
+ # Log the total number of items in __all__ for debugging
133
+ logger.debug(f"EDSL initialization complete with {len(__all__)} items in __all__")
134
+
@@ -0,0 +1 @@
1
+ __version__ = "0.1.55"
@@ -481,6 +481,35 @@ class Agent(Base):
481
481
  new_agent.dynamic_traits_function = dynamic_traits_function
482
482
 
483
483
  return new_agent
484
+
485
+ def copy(self) -> Agent:
486
+ """Create a deep copy of this agent using serialization/deserialization.
487
+
488
+ This method uses to_dict/from_dict to create a completely independent copy
489
+ of the agent, including all its traits, codebook, instructions, and special
490
+ functions like dynamic traits and direct answering methods.
491
+
492
+ Returns:
493
+ Agent: A new agent instance that is functionally identical to this one
494
+
495
+ Examples:
496
+ >>> a = Agent(traits={"age": 10, "hair": "brown"},
497
+ ... codebook={'age': 'Their age is'})
498
+ >>> a2 = a.copy()
499
+ >>> a2 == a # Functionally equivalent
500
+ True
501
+ >>> id(a) == id(a2) # But different objects
502
+ False
503
+
504
+ Copy preserves direct answering methods:
505
+
506
+ >>> def f(self, question, scenario): return "I am a direct answer."
507
+ >>> a.add_direct_question_answering_method(f)
508
+ >>> a2 = a.copy()
509
+ >>> a2.answer_question_directly(None, None)
510
+ 'I am a direct answer.'
511
+ """
512
+ return self.duplicate()
484
513
 
485
514
  @property
486
515
  def agent_persona(self) -> Prompt:
@@ -600,7 +600,42 @@ class AgentList(UserList, Base, AgentListOperationsMixin):
600
600
  return "\n".join(lines)
601
601
  return lines
602
602
 
603
+ @classmethod
604
+ def from_scenario_list(cls, scenario_list: "ScenarioList") -> "AgentList":
605
+ """Create an AgentList from a ScenarioList.
606
+
607
+ This method supports special fields that map to Agent parameters:
608
+ - "name": Will be used as the agent's name
609
+ - "agent_parameters": A dictionary containing:
610
+ - "instruction": The agent's instruction text
611
+ - "name": The agent's name (overrides the "name" field if present)
612
+
613
+ Example:
614
+ >>> from edsl import ScenarioList, Scenario
615
+ >>> # Basic usage with traits
616
+ >>> s = ScenarioList([Scenario({'age': 22, 'hair': 'brown', 'height': 5.5})])
617
+ >>> al = AgentList.from_scenario_list(s)
618
+ >>> al
619
+ AgentList([Agent(traits = {'age': 22, 'hair': 'brown', 'height': 5.5})])
620
+ """
621
+ from .agent import Agent # Use direct relative import
622
+
623
+ agents = []
624
+ for scenario in scenario_list:
625
+ # Simple implementation to handle the basic test case
626
+ new_scenario = scenario.copy().data
627
+ new_agent = Agent(traits=new_scenario)
628
+ agents.append(new_agent)
629
+
630
+ # Add a debug check to verify we've processed the scenarios correctly
631
+ if len(agents) != len(scenario_list):
632
+ raise ValueError(f"Expected {len(scenario_list)} agents, but created {len(agents)}")
633
+
634
+ return cls(agents)
635
+
603
636
 
604
637
  if __name__ == "__main__":
605
638
  import doctest
606
- doctest.testmod(optionflags=doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)
639
+
640
+ # Just run the standard doctests with verbose flag
641
+ doctest.testmod(verbose=True, optionflags=doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)