beaker-notebook 2.0.0b1__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 (202) hide show
  1. beaker_notebook-2.0.0b1/.gitignore +74 -0
  2. beaker_notebook-2.0.0b1/LICENSE.txt +9 -0
  3. beaker_notebook-2.0.0b1/PKG-INFO +86 -0
  4. beaker_notebook-2.0.0b1/README.md +43 -0
  5. beaker_notebook-2.0.0b1/hatch_build.py +93 -0
  6. beaker_notebook-2.0.0b1/pyproject.toml +301 -0
  7. beaker_notebook-2.0.0b1/src/beaker_kernel/__init__.py +37 -0
  8. beaker_notebook-2.0.0b1/src/beaker_notebook/__init__.py +172 -0
  9. beaker_notebook-2.0.0b1/src/beaker_notebook/app/__init__.py +13 -0
  10. beaker_notebook-2.0.0b1/src/beaker_notebook/app/api/__init__.py +0 -0
  11. beaker_notebook-2.0.0b1/src/beaker_notebook/app/api/handlers.py +84 -0
  12. beaker_notebook-2.0.0b1/src/beaker_notebook/app/api/integrations.py +299 -0
  13. beaker_notebook-2.0.0b1/src/beaker_notebook/app/api/notebook.py +118 -0
  14. beaker_notebook-2.0.0b1/src/beaker_notebook/app/api/subkernels.py +70 -0
  15. beaker_notebook-2.0.0b1/src/beaker_notebook/app/base.py +377 -0
  16. beaker_notebook-2.0.0b1/src/beaker_notebook/app/dev_app.py +145 -0
  17. beaker_notebook-2.0.0b1/src/beaker_notebook/app/handlers.py +607 -0
  18. beaker_notebook-2.0.0b1/src/beaker_notebook/app/notebook_app.py +13 -0
  19. beaker_notebook-2.0.0b1/src/beaker_notebook/app/server_app.py +16 -0
  20. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/beaker.svg +101 -0
  21. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/favicon.ico +0 -0
  22. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/index.html +15 -0
  23. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/BaseQueryCell-BkYxksI5.js +1 -0
  24. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/BeakerAdmin-CmINXWMq.css +1 -0
  25. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/BeakerAdmin-DZrn90Yo.js +531 -0
  26. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/BeakerNotebookPanel-DlwDdhcR.css +1 -0
  27. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/BeakerNotebookPanel.vue_vue_type_style_index_0_lang-DVEpDAgJ.js +2352 -0
  28. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/BeakerQueryCell-CLP87HiT.css +1 -0
  29. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/BeakerQueryCell.vue_vue_type_style_index_0_lang-CsPbh_vB.js +364 -0
  30. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/BeakerRawCell-CYX7jUwf.css +1 -0
  31. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/BeakerRawCell.vue_vue_type_style_index_0_lang-C0LQPDG_.js +845 -0
  32. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/BrainIcon-Cu5xmR-n.js +1 -0
  33. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/ChatInterface-CQS-IhF0.js +1065 -0
  34. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/ChatInterface-DKDl_3ZW.css +1 -0
  35. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/DevInterface-CX6JI9k4.css +1 -0
  36. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/DevInterface-D89vpZ2M.js +1171 -0
  37. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/IntegrationPanel-DKP_5B7W.css +1 -0
  38. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/IntegrationPanel.vue_vue_type_style_index_0_lang-c-zr1Dig.js +762 -0
  39. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/IntegrationsInterface-BlUeSxlA.js +1656 -0
  40. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/IntegrationsInterface-BzFBE6eg.css +1 -0
  41. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/MediaPanel-DNCoIEA4.css +1 -0
  42. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/MediaPanel.vue_vue_type_style_index_0_lang-qeorC2Wr.js +709 -0
  43. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/NextBeakerQueryCell-C426bZbZ.css +1 -0
  44. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/NextBeakerQueryCell.vue_vue_type_style_index_0_lang-COubACPH.js +1 -0
  45. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/NextNotebookInterface-CnSA3fCt.js +1090 -0
  46. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/NextNotebookInterface-DxBYBP58.css +1 -0
  47. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/NotebookInterface-B63z6cMq.js +597 -0
  48. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/NotebookInterface-BdxzVo_D.css +1 -0
  49. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/NotebookSvg-2w04pLXO.js +1 -0
  50. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/PlaygroundInterface-BiWl-IG6.css +1 -0
  51. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/PlaygroundInterface-CQXkNf61.js +1 -0
  52. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/WorkflowOutputPanel-CLNRizln.css +1 -0
  53. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/WorkflowOutputPanel.vue_vue_type_style_index_0_lang-CdsA6Nlb.js +20070 -0
  54. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
  55. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/cellOperations-DiO7UBn1.css +1 -0
  56. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/cellOperations-mmhE2rpR.js +296 -0
  57. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/codemirror-CEJpu35t.js +12 -0
  58. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/index-8H8ONTyz.js +7212 -0
  59. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/index-CDHrXzwd.css +1 -0
  60. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/jupyterlab-DCB4j3g5.js +89 -0
  61. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-300-CGqVYVBd.woff2 +0 -0
  62. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-300-D-Ix9km9.woff +0 -0
  63. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-700-CCBIyjkE.woff +0 -0
  64. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-700-C_mCopxe.woff2 +0 -0
  65. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-regular-Dz3ZLxjK.woff +0 -0
  66. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-regular-GAITDyQJ.woff2 +0 -0
  67. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/pdf.worker-BQQyum15.mjs +58272 -0
  68. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/pdfjs-B7zhfHd9.js +16052 -0
  69. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/primeicons-C6QP2o4f.woff2 +0 -0
  70. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/primeicons-DMOk5skT.eot +0 -0
  71. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/primeicons-Dr5RGzOO.svg +345 -0
  72. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/primeicons-MpK4pl85.ttf +0 -0
  73. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/primeicons-WjwUDZjB.woff +0 -0
  74. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/primevue-DXcp5I-A.js +5711 -0
  75. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/renderers-D-ztt1K4.js +19617 -0
  76. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/renderers-DTrMDJiK.css +1 -0
  77. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/vue.esm-browser.prod.js +12 -0
  78. beaker_notebook-2.0.0b1/src/beaker_notebook/app/ui/static/xlsx-C3u7rb2R.js +63 -0
  79. beaker_notebook-2.0.0b1/src/beaker_notebook/builder/__init__.py +0 -0
  80. beaker_notebook-2.0.0b1/src/beaker_notebook/builder/beaker.py +210 -0
  81. beaker_notebook-2.0.0b1/src/beaker_notebook/builder/hooks.py +22 -0
  82. beaker_notebook-2.0.0b1/src/beaker_notebook/builder/templates.py +99 -0
  83. beaker_notebook-2.0.0b1/src/beaker_notebook/builder/utils.py +12 -0
  84. beaker_notebook-2.0.0b1/src/beaker_notebook/cli/__init__.py +0 -0
  85. beaker_notebook-2.0.0b1/src/beaker_notebook/cli/app.py +131 -0
  86. beaker_notebook-2.0.0b1/src/beaker_notebook/cli/config.py +270 -0
  87. beaker_notebook-2.0.0b1/src/beaker_notebook/cli/context.py +236 -0
  88. beaker_notebook-2.0.0b1/src/beaker_notebook/cli/helpers.py +77 -0
  89. beaker_notebook-2.0.0b1/src/beaker_notebook/cli/main.py +73 -0
  90. beaker_notebook-2.0.0b1/src/beaker_notebook/cli/project.py +340 -0
  91. beaker_notebook-2.0.0b1/src/beaker_notebook/cli/running.py +114 -0
  92. beaker_notebook-2.0.0b1/src/beaker_notebook/cli/server.py +210 -0
  93. beaker_notebook-2.0.0b1/src/beaker_notebook/cli/subkernel.py +499 -0
  94. beaker_notebook-2.0.0b1/src/beaker_notebook/contexts/__init__.py +0 -0
  95. beaker_notebook-2.0.0b1/src/beaker_notebook/contexts/default/__init__.py +0 -0
  96. beaker_notebook-2.0.0b1/src/beaker_notebook/contexts/default/agent.py +91 -0
  97. beaker_notebook-2.0.0b1/src/beaker_notebook/contexts/default/context.py +46 -0
  98. beaker_notebook-2.0.0b1/src/beaker_notebook/contexts/default/default_payload.json +1 -0
  99. beaker_notebook-2.0.0b1/src/beaker_notebook/kernel.json +9 -0
  100. beaker_notebook-2.0.0b1/src/beaker_notebook/kernel.py +900 -0
  101. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/__init__.py +9 -0
  102. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/admin.py +105 -0
  103. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/agent.py +471 -0
  104. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/agent_tasks.py +111 -0
  105. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/app.py +458 -0
  106. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/autodiscovery.py +198 -0
  107. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/code_analysis/__init__.py +19 -0
  108. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/code_analysis/analysis_agent.py +149 -0
  109. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/code_analysis/analysis_types.py +144 -0
  110. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/code_analysis/analyzer.py +74 -0
  111. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/code_analysis/message_types.py +0 -0
  112. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/code_analysis/rules/__init__.py +1 -0
  113. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/code_analysis/rules/base.py +134 -0
  114. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/code_analysis/rules/trust/__init__.py +6 -0
  115. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/code_analysis/rules/trust/categories.py +103 -0
  116. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/code_analysis/rules/trust/rules.py +138 -0
  117. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/config.py +550 -0
  118. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/context.py +1225 -0
  119. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/context_dump.py +453 -0
  120. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/exporters/__init__.py +0 -0
  121. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/exporters/chat.py +349 -0
  122. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/exporters/full_context_notebook.py +24 -0
  123. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/exporters/streamline.py +223 -0
  124. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/extension.py +53 -0
  125. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/integrations/__init__.py +0 -0
  126. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/integrations/adhoc.py +645 -0
  127. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/integrations/base.py +203 -0
  128. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/integrations/registry.py +52 -0
  129. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/integrations/skill.py +746 -0
  130. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/integrations/types.py +254 -0
  131. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/jupyter_kernel_proxy.py +391 -0
  132. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/kernel_state.py +131 -0
  133. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/message_types.py +38 -0
  134. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/notebook_state.py +236 -0
  135. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/reflector.py +247 -0
  136. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/subkernel.py +898 -0
  137. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/templates/__init__.py +105 -0
  138. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/templates/agent_file.py +70 -0
  139. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/templates/context_file.py +57 -0
  140. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/templates/paths.py +12 -0
  141. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/templates/procedure_file.py +21 -0
  142. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/templates/readme_file.py +74 -0
  143. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/templates/subkernel_file.py +50 -0
  144. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/types.py +327 -0
  145. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/utils.py +400 -0
  146. beaker_notebook-2.0.0b1/src/beaker_notebook/lib/workflow.py +341 -0
  147. beaker_notebook-2.0.0b1/src/beaker_notebook/services/__init__.py +59 -0
  148. beaker_notebook-2.0.0b1/src/beaker_notebook/services/auth/__init__.py +185 -0
  149. beaker_notebook-2.0.0b1/src/beaker_notebook/services/auth/dummy.py +33 -0
  150. beaker_notebook-2.0.0b1/src/beaker_notebook/services/auth/notebook.py +22 -0
  151. beaker_notebook-2.0.0b1/src/beaker_notebook/services/context/__init__.py +0 -0
  152. beaker_notebook-2.0.0b1/src/beaker_notebook/services/context/discovery_service.py +78 -0
  153. beaker_notebook-2.0.0b1/src/beaker_notebook/services/context/handlers.py +36 -0
  154. beaker_notebook-2.0.0b1/src/beaker_notebook/services/context/manager.py +88 -0
  155. beaker_notebook-2.0.0b1/src/beaker_notebook/services/context/util.py +64 -0
  156. beaker_notebook-2.0.0b1/src/beaker_notebook/services/kernel/__init__.py +5 -0
  157. beaker_notebook-2.0.0b1/src/beaker_notebook/services/kernel/manager.py +158 -0
  158. beaker_notebook-2.0.0b1/src/beaker_notebook/services/kernel/mappingmanager.py +125 -0
  159. beaker_notebook-2.0.0b1/src/beaker_notebook/services/kernel/provisioner.py +60 -0
  160. beaker_notebook-2.0.0b1/src/beaker_notebook/services/kernel/spec.py +115 -0
  161. beaker_notebook-2.0.0b1/src/beaker_notebook/services/session/__init__.py +245 -0
  162. beaker_notebook-2.0.0b1/src/beaker_notebook/services/storage/__init__.py +0 -0
  163. beaker_notebook-2.0.0b1/src/beaker_notebook/services/storage/base.py +93 -0
  164. beaker_notebook-2.0.0b1/src/beaker_notebook/services/storage/notebook.py +361 -0
  165. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/__init__.py +0 -0
  166. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/julia/__init__.py +3 -0
  167. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/julia/procedures/.gitkeep +0 -0
  168. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/julia/procedures/fetch_state.jl +71 -0
  169. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/julia/procedures/reflectors/array.jl +24 -0
  170. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/julia/procedures/reflectors/default.jl +20 -0
  171. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/julia/procedures/reflectors/dict.jl +34 -0
  172. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/julia/procedures/reflectors/function.jl +7 -0
  173. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/julia/procedures/reflectors/module.jl +7 -0
  174. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/julia/procedures/reflectors/type.jl +7 -0
  175. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/julia/subkernel.py +39 -0
  176. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/__init__.py +3 -0
  177. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/.gitkeep +0 -0
  178. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/describe_variables.py +69 -0
  179. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/fetch_state.py +59 -0
  180. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/class.py +14 -0
  181. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/dataframe.py +28 -0
  182. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/default.py +32 -0
  183. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/function.py +18 -0
  184. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/mapping.py +36 -0
  185. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/module.py +9 -0
  186. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/ndarray.py +27 -0
  187. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/primitive.py +22 -0
  188. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/sequence.py +32 -0
  189. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/series.py +26 -0
  190. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/procedures/reflectors/string.py +21 -0
  191. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/python/subkernel.py +165 -0
  192. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/rlang/__init__.py +3 -0
  193. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/rlang/procedures/.gitkeep +0 -0
  194. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/rlang/procedures/fetch_state.r +55 -0
  195. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/rlang/procedures/reflectors/data_frame.r +28 -0
  196. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/rlang/procedures/reflectors/default.r +23 -0
  197. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/rlang/procedures/reflectors/function.r +11 -0
  198. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/rlang/procedures/reflectors/list.r +23 -0
  199. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/rlang/procedures/reflectors/vector.r +25 -0
  200. beaker_notebook-2.0.0b1/src/beaker_notebook/subkernels/rlang/subkernel.py +38 -0
  201. beaker_notebook-2.0.0b1/src/beaker_notebook/util/__init__.py +0 -0
  202. beaker_notebook-2.0.0b1/src/beaker_notebook/util/refactor.py +52 -0
@@ -0,0 +1,74 @@
1
+ **/__pycache__/**
2
+ *.pyc
3
+ .ipynb_checkpoints
4
+ /*.ipynb
5
+ **/.cache
6
+ **/.ipython
7
+ **/.notebooks/
8
+
9
+ # Gradle
10
+ .gradle/
11
+ build/
12
+
13
+ # Eclipse
14
+ .project
15
+ .classpath
16
+ .settings/
17
+ bin/
18
+
19
+ # IntelliJ
20
+ .idea/*
21
+ *.ipr
22
+ *.iml
23
+ *.iws
24
+
25
+ # NetBeans
26
+ nb-configuration.xml
27
+
28
+ # Visual Studio Code
29
+ .vscode/*
30
+ .factorypath
31
+
32
+ # Nova
33
+ .nova/*
34
+
35
+ # OSX
36
+ .DS_Store
37
+
38
+ # Vim
39
+ *.swp
40
+ *.swo
41
+
42
+ # patch
43
+ *.orig
44
+ *.rej
45
+
46
+ # Local environment
47
+ .env
48
+
49
+ # Yarn
50
+ **/.yarn/*
51
+ **/!.yarn/patches
52
+ **/!.yarn/plugins
53
+ **/!.yarn/releases
54
+ **/!.yarn/sdks
55
+ **/!.yarn/versions
56
+ **/.pnp.*
57
+
58
+ # NPM
59
+ node_modules
60
+ dist
61
+ build
62
+
63
+ # MISC
64
+ create.sql
65
+ .eslintcache
66
+ **/.venv/
67
+ .openai.toml
68
+ shell.nix
69
+ **/.jekyll-cache
70
+
71
+ .beaker.conf
72
+ beaker_config.py
73
+ beaker_*_config.py
74
+ src/beaker_notebook/**/ui/*
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present Jataware Corp
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,86 @@
1
+ Metadata-Version: 2.4
2
+ Name: beaker-notebook
3
+ Version: 2.0.0b1
4
+ Summary: Beaker Notebook is a general-purpose, computational notebook with embedded agentic AI designed . It provides a flexible context system that enables domain-specific customization for domains such as data science, research, and computational workflows through specialized AI agents, integrations with external data sources and APIs, and structured workflows.
5
+ Project-URL: Documentation, https://github.com/jataware/beaker-kernel#readme
6
+ Project-URL: Issues, https://github.com/jataware/beaker-kernel/issues
7
+ Project-URL: Source, https://github.com/jataware/beaker-kernel
8
+ Author-email: Matthew Printz <matt@jataware.com>, Brandon Rose <brandon@jataware.com>, Five Grant <five@jataware.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE.txt
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: Implementation :: CPython
18
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: archytas>=2.0.0b0
21
+ Requires-Dist: click~=8.1
22
+ Requires-Dist: dill
23
+ Requires-Dist: hatch
24
+ Requires-Dist: jinja2~=3.1.2
25
+ Requires-Dist: jupyterlab-server<3,>=2.22.1
26
+ Requires-Dist: jupyterlab~=4.0
27
+ Requires-Dist: matplotlib
28
+ Requires-Dist: numpy
29
+ Requires-Dist: openpyxl
30
+ Requires-Dist: pandas
31
+ Requires-Dist: python-dotenv~=1.0
32
+ Requires-Dist: requests<3,>=2.24
33
+ Requires-Dist: scipy
34
+ Requires-Dist: six
35
+ Requires-Dist: toml
36
+ Requires-Dist: tornado>=6.4.0
37
+ Requires-Dist: tree-sitter-julia<0.25
38
+ Requires-Dist: tree-sitter-python<0.25
39
+ Requires-Dist: tree-sitter<0.25
40
+ Requires-Dist: watchdog~=3.0
41
+ Requires-Dist: xarray
42
+ Description-Content-Type: text/markdown
43
+
44
+ # Beaker: the AI-first coding notebook
45
+
46
+ Beaker is a next-generation coding notebook built for the AI era. Beaker seamlessly integrates a Jupyter-like experience with an AI agent that can generate and run code on your behalf. The agent has access to the entire notebook environment as its context, allowing it to make smart decisions about the code it generates and runs. It can even read tracebacks and fix its own errors, and install missing libraries automatically when it needs them.
47
+
48
+ Beaker also lets you swap effortlessly between a notebook-style coding interface and a chat-style interface, giving you the best of both worlds. Since everything is interoperable with Jupyter, you can always export your notebook and use it in any other Jupyter-compatible environment.
49
+
50
+ Beaker is built on top of [Archytas](https://github.com/jataware/archytas), our framework for building AI agents that can interact with code. Advanced users can build their own custom agents with custom ReAct toolsets to support any number of use cases.
51
+
52
+ We like to think of Beaker as a (much better!) drop-in replacement for workflows where you'd normally rely on Jupyter notebooks, and we hope you'll give it a try and let us know what you think.
53
+
54
+ ## Getting Started
55
+
56
+ Getting Beaker up and running is easy. Install Beaker with:
57
+
58
+ ```bash
59
+ pip install beaker-kernel
60
+ ```
61
+
62
+ Next, run `beaker config update` to set up your configuration. This creates a `beaker.conf` configuration file (you can find its location at any time with `beaker config find`). You can leave most fields at their defaults, but you'll need to set `LLM_SERVICE_TOKEN` to your OpenAI API key — or the API key for whichever LLM provider you've selected.
63
+
64
+ Once installed and configured, start a notebook with:
65
+
66
+ ```bash
67
+ beaker notebook
68
+ ```
69
+
70
+ Your notebook server will start up and Beaker will be ready to use at [`localhost:8888`](http://localhost:8888).
71
+
72
+ ## Quick demo
73
+
74
+ Here is a quick demo of using Beaker to interact with a [free weather API](https://open-meteo.com/en/docs), fetch some data, perform some data transformations and a bit of analysis. This is really just scratching the surface of what you can do with Beaker, but it gives you a sense of the kinds of things it can do.
75
+
76
+ <div align="center">
77
+ <a href="https://www.youtube.com/watch?v=AP9LT_cxjzY" target="_blank">
78
+ <img src="docs/assets/beaker-movie-3x-optimized-higherres.gif" alt="Beaker demo" width="90%">
79
+ </a>
80
+ <br/>
81
+ Watch original video on <a href="https://www.youtube.com/watch?v=AP9LT_cxjzY">Youtube here</a>.
82
+ </div>
83
+
84
+ ## Want to know more?
85
+
86
+ There is a lot more to Beaker than what we've covered here. The full [documentation](https://jataware.github.io/beaker-kernel/) covers how to customize and extend Beaker — building your own custom contexts, agents, subkernels, and integrations to make Beaker fit your specific needs. It also covers using the `beaker-ts` TypeScript library to embed Beaker into your own front-end application.
@@ -0,0 +1,43 @@
1
+ # Beaker: the AI-first coding notebook
2
+
3
+ Beaker is a next-generation coding notebook built for the AI era. Beaker seamlessly integrates a Jupyter-like experience with an AI agent that can generate and run code on your behalf. The agent has access to the entire notebook environment as its context, allowing it to make smart decisions about the code it generates and runs. It can even read tracebacks and fix its own errors, and install missing libraries automatically when it needs them.
4
+
5
+ Beaker also lets you swap effortlessly between a notebook-style coding interface and a chat-style interface, giving you the best of both worlds. Since everything is interoperable with Jupyter, you can always export your notebook and use it in any other Jupyter-compatible environment.
6
+
7
+ Beaker is built on top of [Archytas](https://github.com/jataware/archytas), our framework for building AI agents that can interact with code. Advanced users can build their own custom agents with custom ReAct toolsets to support any number of use cases.
8
+
9
+ We like to think of Beaker as a (much better!) drop-in replacement for workflows where you'd normally rely on Jupyter notebooks, and we hope you'll give it a try and let us know what you think.
10
+
11
+ ## Getting Started
12
+
13
+ Getting Beaker up and running is easy. Install Beaker with:
14
+
15
+ ```bash
16
+ pip install beaker-kernel
17
+ ```
18
+
19
+ Next, run `beaker config update` to set up your configuration. This creates a `beaker.conf` configuration file (you can find its location at any time with `beaker config find`). You can leave most fields at their defaults, but you'll need to set `LLM_SERVICE_TOKEN` to your OpenAI API key — or the API key for whichever LLM provider you've selected.
20
+
21
+ Once installed and configured, start a notebook with:
22
+
23
+ ```bash
24
+ beaker notebook
25
+ ```
26
+
27
+ Your notebook server will start up and Beaker will be ready to use at [`localhost:8888`](http://localhost:8888).
28
+
29
+ ## Quick demo
30
+
31
+ Here is a quick demo of using Beaker to interact with a [free weather API](https://open-meteo.com/en/docs), fetch some data, perform some data transformations and a bit of analysis. This is really just scratching the surface of what you can do with Beaker, but it gives you a sense of the kinds of things it can do.
32
+
33
+ <div align="center">
34
+ <a href="https://www.youtube.com/watch?v=AP9LT_cxjzY" target="_blank">
35
+ <img src="docs/assets/beaker-movie-3x-optimized-higherres.gif" alt="Beaker demo" width="90%">
36
+ </a>
37
+ <br/>
38
+ Watch original video on <a href="https://www.youtube.com/watch?v=AP9LT_cxjzY">Youtube here</a>.
39
+ </div>
40
+
41
+ ## Want to know more?
42
+
43
+ There is a lot more to Beaker than what we've covered here. The full [documentation](https://jataware.github.io/beaker-kernel/) covers how to customize and extend Beaker — building your own custom contexts, agents, subkernels, and integrations to make Beaker fit your specific needs. It also covers using the `beaker-ts` TypeScript library to embed Beaker into your own front-end application.
@@ -0,0 +1,93 @@
1
+ """Custom hatch build hook"""
2
+ import ast
3
+ import importlib
4
+ import inspect
5
+ import json
6
+ import os
7
+ import shutil
8
+ import sys
9
+ from pathlib import Path
10
+ from typing import Any
11
+ from types import GenericAlias
12
+
13
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
14
+
15
+
16
+ class CustomHook(BuildHookInterface):
17
+ """The IPykernel build hook."""
18
+
19
+ def initialize(self, version, build_data):
20
+ """Initialize the hook."""
21
+
22
+ here = os.path.dirname(__file__)
23
+ dest = os.path.join("build", "data_share_beaker")
24
+
25
+ # Import code into build environment
26
+ sys.path.insert(0, str(here))
27
+
28
+ # Recreate the destination directory, clearing any existing build artifacts
29
+ if os.path.exists(dest):
30
+ shutil.rmtree(dest)
31
+ os.makedirs(dest)
32
+
33
+ # Inspect context files to build a dynamic mapping of context slugs to context classes
34
+ context_classes = {}
35
+ context_src = os.path.join(here, "beaker_kernel", "contexts")
36
+ if os.path.exists(context_src):
37
+ for fpath in os.listdir(context_src):
38
+ if fpath.startswith("_"):
39
+ continue
40
+ package_name = f"beaker_kernel.contexts.{fpath}.context"
41
+ slug = fpath
42
+ full_path = os.path.join(context_src, fpath, "context.py")
43
+ with open(full_path) as f:
44
+ src = f.read()
45
+ symbols = ast.parse(src, full_path)
46
+ for symbol in symbols.body:
47
+ if isinstance(symbol, ast.ClassDef) and "BaseContext" in [attr.id for attr in getattr(symbol, "bases", [])]:
48
+ if slug in context_classes:
49
+ raise SyntaxError("Only one context is allowed to be defined per module.")
50
+ class_name = symbol.name
51
+ context_classes[slug] = (package_name, class_name)
52
+
53
+
54
+ # Inspect subkernel files to build a dynamic map of defined subkernels
55
+ subkernel_classes = {}
56
+ subkernel_src = os.path.join(here, "beaker_kernel", "lib", "subkernels")
57
+ if os.path.exists(subkernel_src):
58
+ from beaker_kernel.lib.subkernel import BeakerSubkernel
59
+ for fpath in os.listdir(subkernel_src):
60
+ if fpath.startswith("_") or fpath.startswith("base"):
61
+ continue
62
+ package_name = f"beaker_kernel.subkernels.{os.path.splitext(fpath)[0]}"
63
+ module = importlib.import_module(package_name)
64
+ def subkernel_criteria(member):
65
+ return inspect.isclass(member) \
66
+ and not member.__name__.startswith("Base") \
67
+ and not isinstance(member, GenericAlias) \
68
+ and issubclass(member, BeakerSubkernel)
69
+ subkernel_list = inspect.getmembers(module, subkernel_criteria)
70
+ for class_name, class_instance in subkernel_list:
71
+ slug = getattr(class_instance, "SLUG")
72
+ if slug in context_classes:
73
+ raise SyntaxError("Only one context is allowed to be defined per module.")
74
+ subkernel_classes[slug] = (package_name, class_name)
75
+
76
+
77
+ build_config = self.build_config.build_config
78
+ shared_data = build_config["targets"]["wheel"]["shared-data"]
79
+
80
+ # Map the main beaker kernel for inclusion/installation
81
+ kernel_json_file = os.path.join(here, "beaker_kernel", "kernel.json")
82
+ shared_data[kernel_json_file] = f"share/jupyter/kernels/beaker_kernel/kernel.json"
83
+
84
+ # Write out mappings for each context and subkernel to an individual json file
85
+ for typename, src in [("contexts", context_classes), ("subkernels", subkernel_classes)]:
86
+ dest_dir = os.path.join(dest, typename)
87
+ os.makedirs(dest_dir, exist_ok=True)
88
+ for slug, (package_name, class_name) in src.items():
89
+ dest_file = os.path.join(dest_dir, f"{slug}.json")
90
+ with open(dest_file, "w") as f:
91
+ json.dump({"slug": slug, "package": package_name, "class_name": class_name}, f, indent=2)
92
+ # Add wheel.shared-data mappings for each file so it is installed to the correct location
93
+ shared_data[dest_file] = f"share/beaker/{typename}/{slug}.json"
@@ -0,0 +1,301 @@
1
+ [build-system]
2
+ requires = ["hatch", "hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "beaker-notebook"
7
+ version = "2.0.0b1"
8
+ description = "Beaker Notebook is a general-purpose, computational notebook with embedded agentic AI designed . It provides a flexible context system that enables domain-specific customization for domains such as data science, research, and computational workflows through specialized AI agents, integrations with external data sources and APIs, and structured workflows."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "MIT"
12
+ keywords = []
13
+ authors = [
14
+ { name = "Matthew Printz", email = "matt@jataware.com" },
15
+ { name = "Brandon Rose", email = "brandon@jataware.com" },
16
+ { name = "Five Grant", email = "five@jataware.com" },
17
+ ]
18
+ classifiers = [
19
+ "Development Status :: 4 - Beta",
20
+ "Programming Language :: Python",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Programming Language :: Python :: Implementation :: CPython",
26
+ "Programming Language :: Python :: Implementation :: PyPy",
27
+ ]
28
+ dependencies = [
29
+ "archytas>=2.0.0b0",
30
+ "jupyterlab~=4.0",
31
+ "jupyterlab-server>=2.22.1,<3",
32
+ "requests>=2.24,<3",
33
+ "six",
34
+ "tornado>=6.4.0",
35
+ "jinja2~=3.1.2",
36
+ "watchdog~=3.0",
37
+ "click~=8.1",
38
+ "python-dotenv~=1.0",
39
+ "hatch",
40
+ "toml",
41
+ "dill",
42
+ "pandas",
43
+ "matplotlib",
44
+ "xarray",
45
+ "numpy",
46
+ "scipy",
47
+ "openpyxl",
48
+ "tree-sitter<0.25",
49
+ "tree-sitter-python<0.25",
50
+ "tree-sitter-julia<0.25",
51
+ ]
52
+
53
+ [project.entry-points.hatch]
54
+ beaker = "beaker_notebook.builder.hooks"
55
+
56
+ [project.scripts]
57
+ beaker = "beaker_notebook.cli.main:cli"
58
+
59
+ [tool.hatch.metadata]
60
+ allow-direct-references = true
61
+
62
+ [tool.hatch.build]
63
+ require-runtime-dependencies = true
64
+ artifacts = [
65
+ "src/beaker_notebook/app/ui",
66
+ ]
67
+
68
+ [tool.hatch.build.targets.wheel]
69
+ packages = [
70
+ "src/beaker_notebook",
71
+ "src/beaker_kernel",
72
+ ]
73
+
74
+ [tool.hatch.build.targets.sdist]
75
+ only-include = ["src"]
76
+
77
+ [tool.hatch.envs.hatch-build]
78
+ system-packages = true
79
+
80
+ # Beaker builder, loaded as a custom hook since it's not yet registered.
81
+ [tool.hatch.build.targets.wheel.hooks.custom]
82
+ path = "src/beaker_notebook/builder/beaker.py"
83
+
84
+ [tool.hatch.build.targets.wheel.shared-data]
85
+ "src/beaker_notebook/kernel.json" = "share/jupyter/kernels/beaker_kernel/kernel.json"
86
+
87
+
88
+ [tool.bumpversion]
89
+ current_version="2.0.0b1"
90
+ parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)((?P<release>[ab])(?P<revision>\\d+))?"
91
+ serialize = [
92
+ "{major}.{minor}.{patch}{release}{revision}",
93
+ "{major}.{minor}.{patch}"
94
+ ]
95
+ search = "{current_version}"
96
+ replace = "{new_version}"
97
+ regex = false
98
+ ignore_missing_version = false
99
+ ignore_missing_files = false
100
+ tag = true
101
+ sign_tags = false
102
+ tag_name = "v{new_version}"
103
+ tag_message = "Bump version: {current_version} → {new_version}"
104
+ allow_dirty = true
105
+ commit = true
106
+ message = "Bump version: {current_version} → {new_version}"
107
+ commit_args = ""
108
+
109
+ [tool.bumpversion.parts.release]
110
+ values = [
111
+ "a",
112
+ "b",
113
+ ]
114
+
115
+ [[tool.bumpversion.files]]
116
+ filename = "pyproject.toml"
117
+ search = 'version = "{current_version}"'
118
+ replace = 'version = "{new_version}"'
119
+
120
+ [[tool.bumpversion.files]]
121
+ glob = "beaker-vue/package*.json"
122
+ parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)-((?P<release>[ab]).(?P<revision>\\d+))?"
123
+ serialize = [
124
+ "{major}.{minor}.{patch}-{release}.{revision}",
125
+ "{major}.{minor}.{patch}"
126
+ ]
127
+ search = """beaker-kernel": "^{current_version}"""
128
+ replace = """beaker-kernel": "^{new_version}"""
129
+
130
+ [[tool.bumpversion.files]]
131
+ glob = "beaker-*/package*.json"
132
+ parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)-((?P<release>[ab]).(?P<revision>\\d+))?"
133
+ serialize = [
134
+ "{major}.{minor}.{patch}-{release}.{revision}",
135
+ "{major}.{minor}.{patch}"
136
+ ]
137
+ regex = true
138
+ search = """
139
+ ([^\\n]*"[^\\n"]*beaker-(?:kernel|ts|vue)"[^\\n]*)
140
+ ([\\s]*)"version": "{current_version}"([^\\n]*)"""
141
+ replace = """
142
+ \\1
143
+ \\2"version": "{new_version}"\\3"""
144
+
145
+ [project.urls]
146
+ Documentation = "https://github.com/jataware/beaker-kernel#readme"
147
+ Issues = "https://github.com/jataware/beaker-kernel/issues"
148
+ Source = "https://github.com/jataware/beaker-kernel"
149
+
150
+ [tool.hatch.version]
151
+ path = "src/beaker_notebook/__about__.py"
152
+
153
+ [tool.hatch.envs.default]
154
+ dependencies = [
155
+ "bump-my-version",
156
+ "coverage[toml]>=6.5",
157
+ "pytest",
158
+ "pytest-asyncio",
159
+ ]
160
+ [tool.hatch.envs.default.scripts]
161
+ test = "pytest {args:tests}"
162
+ test-cov = "coverage run -m pytest {args:tests}"
163
+ cov-report = [
164
+ "- coverage combine",
165
+ "coverage report",
166
+ ]
167
+ cov = [
168
+ "test-cov",
169
+ "cov-report",
170
+ ]
171
+ bump = [
172
+ "bump-my-version bump {args:--help}"
173
+ ]
174
+
175
+ [[tool.hatch.envs.all.matrix]]
176
+ python = ["3.10", "3.11"]
177
+
178
+ [tool.hatch.envs.lint]
179
+ detached = true
180
+ dependencies = [
181
+ "black>=23.1.0",
182
+ "mypy>=1.0.0",
183
+ "ruff>=0.0.243",
184
+ ]
185
+ [tool.hatch.envs.lint.scripts]
186
+ typing = "mypy --install-types --non-interactive {args:beaker_notebook tests}"
187
+ style = [
188
+ "ruff {args:.}",
189
+ "black --check --diff {args:.}",
190
+ ]
191
+ fmt = [
192
+ "black {args:.}",
193
+ "ruff --fix {args:.}",
194
+ "style",
195
+ ]
196
+ all = [
197
+ "style",
198
+ "typing",
199
+ ]
200
+
201
+ [tool.black]
202
+ target-version = ["py310"]
203
+ line-length = 120
204
+ skip-string-normalization = true
205
+
206
+ [tool.ruff]
207
+ target-version = "py310"
208
+ line-length = 120
209
+ select = [
210
+ "A",
211
+ "ARG",
212
+ "B",
213
+ "C",
214
+ "DTZ",
215
+ "E",
216
+ "EM",
217
+ "F",
218
+ "FBT",
219
+ "I",
220
+ "ICN",
221
+ "ISC",
222
+ "N",
223
+ "PLC",
224
+ "PLE",
225
+ "PLR",
226
+ "PLW",
227
+ "Q",
228
+ "RUF",
229
+ "S",
230
+ "T",
231
+ "TID",
232
+ "UP",
233
+ "W",
234
+ "YTT",
235
+ ]
236
+ ignore = [
237
+ # Allow non-abstract empty methods in abstract base classes
238
+ "B027",
239
+ # Allow boolean positional values in function calls, like `dict.get(... True)`
240
+ "FBT003",
241
+ # Ignore checks for possible passwords
242
+ "S105", "S106", "S107",
243
+ # Ignore complexity
244
+ "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
245
+ ]
246
+ unfixable = [
247
+ # Don't touch unused imports
248
+ "F401",
249
+ ]
250
+
251
+ [tool.ruff.isort]
252
+ known-first-party = ["beaker_notebook"]
253
+
254
+ [tool.ruff.flake8-tidy-imports]
255
+ ban-relative-imports = "all"
256
+
257
+ [tool.ruff.per-file-ignores]
258
+ # Tests can use magic values, assertions, and relative imports
259
+ "tests/**/*" = ["PLR2004", "S101", "TID252"]
260
+
261
+ [tool.coverage.run]
262
+ source_pkgs = ["beaker_notebook", "tests"]
263
+ branch = true
264
+ parallel = true
265
+ omit = [
266
+ "src/beaker_notebook/__about__.py",
267
+ ]
268
+
269
+ [tool.coverage.paths]
270
+ beaker_notebook = ["beaker_notebook"]
271
+ tests = ["tests"]
272
+
273
+ [tool.coverage.report]
274
+ exclude_lines = [
275
+ "no cov",
276
+ "if __name__ == .__main__.:",
277
+ "if TYPE_CHECKING:",
278
+ ]
279
+
280
+
281
+
282
+
283
+
284
+ [tool.hatch.envs.hatch-test]
285
+ extra-dependencies = [
286
+ "pytest",
287
+ "pytest-asyncio",
288
+ "rich",
289
+ ]
290
+
291
+ [tool.pytest.ini_options]
292
+ asyncio_mode = "auto"
293
+ asyncio_default_fixture_loop_scope = "function"
294
+
295
+ [project.entry-points."nbconvert.exporters"]
296
+ streamline = "beaker_notebook.lib.exporters.streamline:StreamlineExporter"
297
+ full_context_notebook = "beaker_notebook.lib.exporters.full_context_notebook:FullContextNotebookExporter"
298
+ chat = "beaker_notebook.lib.exporters.chat:ChatExporter"
299
+
300
+ [project.entry-points."jupyter_client.kernel_provisioners"]
301
+ beaker-local-provisioner = "beaker_notebook.services.kernel.provisioner:BeakerLocalProvisioner"
@@ -0,0 +1,37 @@
1
+ """
2
+ Compatibility shim: redirects any `beaker_kernel[.X]` import to `beaker_notebook[.X]`.
3
+ """
4
+ import importlib
5
+ import sys
6
+ from importlib.abc import MetaPathFinder, Loader
7
+ from importlib.machinery import ModuleSpec
8
+
9
+ _OLD = "beaker_kernel"
10
+ _NEW = "beaker_notebook"
11
+
12
+
13
+ class _RenameLoader(Loader):
14
+ def create_module(self, spec):
15
+ target = _NEW + spec.name[len(_OLD):]
16
+ module = importlib.import_module(target)
17
+ sys.modules[spec.name] = module
18
+ return module
19
+
20
+ def exec_module(self, module):
21
+ pass
22
+
23
+
24
+ class _RenameFinder(MetaPathFinder):
25
+ def find_spec(self, fullname, path=None, target=None):
26
+ if fullname == _OLD or fullname.startswith(_OLD + "."):
27
+ return ModuleSpec(fullname, _RenameLoader(), is_package=True)
28
+ return None
29
+
30
+
31
+ # Install once.
32
+ if not any(isinstance(f, _RenameFinder) for f in sys.meta_path):
33
+ sys.meta_path.insert(0, _RenameFinder())
34
+
35
+ # Make `beaker_kernel` itself be `beaker_notebook`.
36
+ import beaker_notebook as _bn
37
+ sys.modules[__name__] = _bn