setta 0.0.2__tar.gz → 0.0.3__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (279) hide show
  1. setta-0.0.3/PKG-INFO +146 -0
  2. setta-0.0.3/README.md +116 -0
  3. setta-0.0.3/backend/setta/__init__.py +1 -0
  4. setta-0.0.3/backend/setta/cli/__init__.py +1 -0
  5. {setta-0.0.2 → setta-0.0.3}/backend/setta/cli/logger.py +1 -3
  6. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/create_runnable_scripts.py +87 -34
  7. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/export_selected.py +1 -5
  8. setta-0.0.3/backend/setta/code_gen/find_placeholders.py +24 -0
  9. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/backup.py +1 -2
  10. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/artifacts/save.py +20 -4
  11. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/projects/save.py +1 -1
  12. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sections/load.py +5 -2
  13. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sections/save.py +2 -2
  14. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db_objs.py +6 -0
  15. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/export_db/export_raw.py +3 -3
  16. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/export_db/utils.py +2 -3
  17. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/settings_file.py +3 -3
  18. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/file_watcher.py +24 -23
  19. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/server.py +1 -1
  20. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/writer.py +2 -2
  21. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/interactive.py +38 -20
  22. {setta-0.0.2 → setta-0.0.3}/backend/setta/server.py +3 -4
  23. {setta-0.0.2 → setta-0.0.3}/backend/setta/start.py +4 -3
  24. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/constants/constants.json +4 -0
  25. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/constants/db_init.sql +2 -1
  26. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/constants/defaultValues.json +2 -1
  27. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/constants/settingsProject.json +31 -31
  28. setta-0.0.3/backend/setta/static/frontend/assets/index-03be034e.css +32 -0
  29. setta-0.0.2/backend/setta/static/frontend/assets/index-ee99dc72.js → setta-0.0.3/backend/setta/static/frontend/assets/index-59443547.js +171 -171
  30. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/index.html +2 -2
  31. setta-0.0.3/backend/setta/tasks/tasks.py +220 -0
  32. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/utils.py +108 -21
  33. {setta-0.0.2 → setta-0.0.3}/backend/setta/terminals/terminals.py +7 -6
  34. {setta-0.0.2 → setta-0.0.3}/backend/setta/utils/constants.py +5 -2
  35. {setta-0.0.2 → setta-0.0.3}/backend/setta/utils/websocket_manager.py +8 -3
  36. setta-0.0.3/backend/setta.egg-info/PKG-INFO +146 -0
  37. {setta-0.0.2 → setta-0.0.3}/backend/setta.egg-info/SOURCES.txt +2 -3
  38. setta-0.0.3/backend/setta.egg-info/requires.txt +24 -0
  39. setta-0.0.3/setup.cfg +52 -0
  40. setta-0.0.2/PKG-INFO +0 -24
  41. setta-0.0.2/README.md +0 -25
  42. setta-0.0.2/backend/setta/__init__.py +0 -1
  43. setta-0.0.2/backend/setta/cli/__init__.py +0 -1
  44. setta-0.0.2/backend/setta/code_gen/find_placeholders.py +0 -13
  45. setta-0.0.2/backend/setta/database/db_path.py +0 -8
  46. setta-0.0.2/backend/setta/static/frontend/assets/index-1d4b4ecf.css +0 -32
  47. setta-0.0.2/backend/setta/tasks/tasks.py +0 -152
  48. setta-0.0.2/backend/setta.egg-info/PKG-INFO +0 -24
  49. setta-0.0.2/backend/setta.egg-info/requires.txt +0 -23
  50. setta-0.0.2/setup.cfg +0 -45
  51. {setta-0.0.2 → setta-0.0.3}/LICENSE +0 -0
  52. {setta-0.0.2 → setta-0.0.3}/MANIFEST.in +0 -0
  53. {setta-0.0.2 → setta-0.0.3}/backend/setta/cli/connect.py +0 -0
  54. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/__init__.py +0 -0
  55. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/python/__init__.py +0 -0
  56. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/python/ast_utils.py +0 -0
  57. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/python/check_scope.py +0 -0
  58. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/python/generate_code.py +0 -0
  59. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/python/make_parseable.py +0 -0
  60. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/python/position_line_col.py +0 -0
  61. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/python/validate_imports.py +0 -0
  62. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/utils.py +0 -0
  63. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/yaml/__init__.py +0 -0
  64. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/yaml/generate_yaml.py +0 -0
  65. {setta-0.0.2 → setta-0.0.3}/backend/setta/code_gen/yaml/section_dict.py +0 -0
  66. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/__init__.py +0 -0
  67. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/__init__.py +0 -0
  68. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/artifacts/__init__.py +0 -0
  69. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/artifacts/load.py +0 -0
  70. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/artifacts/save_or_create.py +0 -0
  71. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/artifacts/utils.py +0 -0
  72. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/codeInfo/__init__.py +0 -0
  73. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/codeInfo/copy.py +0 -0
  74. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/codeInfo/load.py +0 -0
  75. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/codeInfo/save.py +0 -0
  76. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/codeInfo/utils.py +0 -0
  77. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/evRefs/__init__.py +0 -0
  78. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/evRefs/load.py +0 -0
  79. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/evRefs/save.py +0 -0
  80. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/projects/__init__.py +0 -0
  81. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/projects/copy.py +0 -0
  82. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/projects/delete.py +0 -0
  83. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/projects/load.py +0 -0
  84. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/projects/saveAs.py +0 -0
  85. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/projects/utils.py +0 -0
  86. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sectionVariants/__init__.py +0 -0
  87. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sectionVariants/copy.py +0 -0
  88. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sectionVariants/load.py +0 -0
  89. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sectionVariants/save.py +0 -0
  90. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sectionVariants/utils.py +0 -0
  91. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sections/__init__.py +0 -0
  92. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sections/copy.py +0 -0
  93. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sections/jsonSource.py +0 -0
  94. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/sections/utils.py +0 -0
  95. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/uiTypes/__init__.py +0 -0
  96. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/uiTypes/copy.py +0 -0
  97. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/uiTypes/load.py +0 -0
  98. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/uiTypes/save.py +0 -0
  99. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db/uiTypes/utils.py +0 -0
  100. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/db_init.py +0 -0
  101. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/export_db/__init__.py +0 -0
  102. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/export_db/export_db.py +0 -0
  103. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/export_db/export_readable.py +0 -0
  104. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/import_db.py +0 -0
  105. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/seed.py +0 -0
  106. {setta-0.0.2 → setta-0.0.3}/backend/setta/database/utils.py +0 -0
  107. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/__init__.py +0 -0
  108. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/reader.py +0 -0
  109. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/reader_fns/__init__.py +0 -0
  110. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/reader_fns/completion.py +0 -0
  111. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/reader_fns/definition.py +0 -0
  112. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/reader_fns/diagnostics.py +0 -0
  113. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/reader_fns/documentHighlight.py +0 -0
  114. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/reader_fns/references.py +0 -0
  115. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/reader_fns/signatureHelp.py +0 -0
  116. {setta-0.0.2 → setta-0.0.3}/backend/setta/lsp/utils.py +0 -0
  117. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/__init__.py +0 -0
  118. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/artifact.py +0 -0
  119. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/code_info.py +0 -0
  120. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/dependencies.py +0 -0
  121. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/in_memory_fn_stdout_websocket.py +0 -0
  122. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/lsp.py +0 -0
  123. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/projects.py +0 -0
  124. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/reference_renaming.py +0 -0
  125. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/sections.py +0 -0
  126. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/settings.py +0 -0
  127. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/terminals.py +0 -0
  128. {setta-0.0.2 → setta-0.0.3}/backend/setta/routers/websocket.py +0 -0
  129. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/constants/BaseUITypes.json +0 -0
  130. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/constants/Settings.json +0 -0
  131. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/android-chrome-192x192.png +0 -0
  132. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/android-chrome-512x512.png +0 -0
  133. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/apple-touch-icon.png +0 -0
  134. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_AMS-Regular-0cdd387c.woff2 +0 -0
  135. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_AMS-Regular-30da91e8.woff +0 -0
  136. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_AMS-Regular-68534840.ttf +0 -0
  137. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Bold-07d8e303.ttf +0 -0
  138. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Bold-1ae6bd74.woff +0 -0
  139. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Bold-de7701e4.woff2 +0 -0
  140. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Regular-3398dd02.woff +0 -0
  141. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Regular-5d53e70a.woff2 +0 -0
  142. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Regular-ed0b7437.ttf +0 -0
  143. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Bold-74444efd.woff2 +0 -0
  144. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Bold-9163df9c.ttf +0 -0
  145. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Bold-9be7ceb8.woff +0 -0
  146. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Regular-1e6f9579.ttf +0 -0
  147. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Regular-51814d27.woff2 +0 -0
  148. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Regular-5e28753b.woff +0 -0
  149. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-Bold-0f60d1b8.woff2 +0 -0
  150. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-Bold-138ac28d.ttf +0 -0
  151. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-Bold-c76c5d69.woff +0 -0
  152. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-BoldItalic-70ee1f64.ttf +0 -0
  153. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-BoldItalic-99cd42a3.woff2 +0 -0
  154. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-BoldItalic-a6f7ec0d.woff +0 -0
  155. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-Italic-0d85ae7c.ttf +0 -0
  156. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-Italic-97479ca6.woff2 +0 -0
  157. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-Italic-f1d6ef86.woff +0 -0
  158. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-Regular-c2342cd8.woff2 +0 -0
  159. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-Regular-c6368d87.woff +0 -0
  160. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Main-Regular-d0332f52.ttf +0 -0
  161. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Math-BoldItalic-850c0af5.woff +0 -0
  162. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Math-BoldItalic-dc47344d.woff2 +0 -0
  163. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Math-BoldItalic-f9377ab0.ttf +0 -0
  164. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Math-Italic-08ce98e5.ttf +0 -0
  165. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Math-Italic-7af58c5e.woff2 +0 -0
  166. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Math-Italic-8a8d2445.woff +0 -0
  167. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Bold-1ece03f7.ttf +0 -0
  168. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Bold-e99ae511.woff2 +0 -0
  169. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Bold-ece03cfd.woff +0 -0
  170. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Italic-00b26ac8.woff2 +0 -0
  171. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Italic-3931dd81.ttf +0 -0
  172. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Italic-91ee6750.woff +0 -0
  173. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Regular-11e4dc8a.woff +0 -0
  174. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Regular-68e8c73e.woff2 +0 -0
  175. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Regular-f36ea897.ttf +0 -0
  176. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Script-Regular-036d4e95.woff2 +0 -0
  177. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Script-Regular-1c67f068.ttf +0 -0
  178. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Script-Regular-d96cdf2b.woff +0 -0
  179. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size1-Regular-6b47c401.woff2 +0 -0
  180. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size1-Regular-95b6d2f1.ttf +0 -0
  181. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size1-Regular-c943cc98.woff +0 -0
  182. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size2-Regular-2014c523.woff +0 -0
  183. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size2-Regular-a6b2099f.ttf +0 -0
  184. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size2-Regular-d04c5421.woff2 +0 -0
  185. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size3-Regular-500e04d5.ttf +0 -0
  186. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size3-Regular-6ab6b62e.woff +0 -0
  187. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size4-Regular-99f9c675.woff +0 -0
  188. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size4-Regular-a4af7d41.woff2 +0 -0
  189. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Size4-Regular-c647367d.ttf +0 -0
  190. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Typewriter-Regular-71d517d6.woff2 +0 -0
  191. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Typewriter-Regular-e14fed02.woff +0 -0
  192. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/KaTeX_Typewriter-Regular-f01f3e87.ttf +0 -0
  193. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/cormorant-garamond-all-700-italic-c9b58582.woff +0 -0
  194. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/cormorant-garamond-cyrillic-700-italic-9101ad5f.woff2 +0 -0
  195. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/cormorant-garamond-cyrillic-ext-700-italic-950de0d6.woff2 +0 -0
  196. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/cormorant-garamond-latin-700-italic-0bc53e12.woff2 +0 -0
  197. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/cormorant-garamond-latin-ext-700-italic-525738e0.woff2 +0 -0
  198. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/cormorant-garamond-vietnamese-700-italic-99563037.woff2 +0 -0
  199. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/erase-5e0448ea.svg +0 -0
  200. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-all-400-normal-054f12d0.woff +0 -0
  201. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-all-600-normal-c03769e5.woff +0 -0
  202. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-all-800-normal-15dc6e4b.woff +0 -0
  203. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-cyrillic-400-normal-a4eee61a.woff2 +0 -0
  204. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-cyrillic-600-normal-8b14f703.woff2 +0 -0
  205. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-cyrillic-800-normal-e706eaaa.woff2 +0 -0
  206. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-cyrillic-ext-400-normal-70047a3b.woff2 +0 -0
  207. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-cyrillic-ext-600-normal-d4ab9bc4.woff2 +0 -0
  208. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-cyrillic-ext-800-normal-eae7515a.woff2 +0 -0
  209. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-greek-400-normal-381ea30d.woff2 +0 -0
  210. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-greek-600-normal-601f93a2.woff2 +0 -0
  211. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-greek-800-normal-7af4fb64.woff2 +0 -0
  212. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-greek-ext-400-normal-27027b17.woff2 +0 -0
  213. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-greek-ext-600-normal-f2ddf9de.woff2 +0 -0
  214. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-greek-ext-800-normal-4cb6189e.woff2 +0 -0
  215. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-latin-400-normal-d56fec21.woff2 +0 -0
  216. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-latin-600-normal-ff769fa6.woff2 +0 -0
  217. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-latin-800-normal-5eea1309.woff2 +0 -0
  218. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-latin-ext-400-normal-bb698d85.woff2 +0 -0
  219. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-latin-ext-600-normal-ca4808f9.woff2 +0 -0
  220. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/inter-latin-ext-800-normal-ebdacc0f.woff2 +0 -0
  221. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/logo/logo.svg +0 -0
  222. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/pen-455d7d8a.svg +0 -0
  223. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/source-code-pro-all-500-normal-6bdaa03b.woff +0 -0
  224. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/source-code-pro-cyrillic-500-normal-288a0d68.woff2 +0 -0
  225. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/source-code-pro-cyrillic-ext-500-normal-b110a13b.woff2 +0 -0
  226. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/source-code-pro-greek-500-normal-04328acb.woff2 +0 -0
  227. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/source-code-pro-latin-500-normal-06edef1e.woff2 +0 -0
  228. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/source-code-pro-latin-ext-500-normal-6dc60d5e.woff2 +0 -0
  229. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/web-vitals-44a8e082.js +0 -0
  230. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-all-400-normal-38034a3c.woff +0 -0
  231. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-all-500-normal-550d64e5.woff +0 -0
  232. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-all-600-normal-ccf14060.woff +0 -0
  233. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-all-700-normal-494c2971.woff +0 -0
  234. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-latin-400-normal-36735bc1.woff2 +0 -0
  235. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-latin-500-normal-3790bfda.woff2 +0 -0
  236. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-latin-600-normal-5fba494e.woff2 +0 -0
  237. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-latin-700-normal-a5033d0a.woff2 +0 -0
  238. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-latin-ext-400-normal-c20f571a.woff2 +0 -0
  239. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-latin-ext-500-normal-0f5ac96c.woff2 +0 -0
  240. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-latin-ext-600-normal-97a237d1.woff2 +0 -0
  241. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/assets/work-sans-latin-ext-700-normal-103e112c.woff2 +0 -0
  242. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/browserconfig.xml +0 -0
  243. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/favicon-16x16.png +0 -0
  244. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/favicon-32x32.png +0 -0
  245. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/favicon.ico +0 -0
  246. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/manifest.json +0 -0
  247. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/mstile-144x144.png +0 -0
  248. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/mstile-150x150.png +0 -0
  249. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/mstile-310x150.png +0 -0
  250. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/mstile-310x310.png +0 -0
  251. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/mstile-70x70.png +0 -0
  252. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/robots.txt +0 -0
  253. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/safari-pinned-tab.svg +0 -0
  254. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/frontend/site.webmanifest +0 -0
  255. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/seed/.DS_Store +0 -0
  256. {setta-0.0.2 → setta-0.0.3}/backend/setta/static/seed/examples/.DS_Store +0 -0
  257. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/__init__.py +0 -0
  258. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/fns/__init__.py +0 -0
  259. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/fns/codeAreaAutocomplete.py +0 -0
  260. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/fns/codeAreaFindTemplateVars.py +0 -0
  261. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/fns/codeAreaInitializeCode.py +0 -0
  262. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/fns/findEVRefs.py +0 -0
  263. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/fns/parametersRequest.py +0 -0
  264. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/fns/textFieldAutocomplete.py +0 -0
  265. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/fns/textFieldInitializeCode.py +0 -0
  266. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/fns/typeCheck.py +0 -0
  267. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/fns/utils.py +0 -0
  268. {setta-0.0.2 → setta-0.0.3}/backend/setta/tasks/task_runner.py +0 -0
  269. {setta-0.0.2 → setta-0.0.3}/backend/setta/terminals/__init__.py +0 -0
  270. {setta-0.0.2 → setta-0.0.3}/backend/setta/terminals/utils.py +0 -0
  271. {setta-0.0.2 → setta-0.0.3}/backend/setta/utils/__init__.py +0 -0
  272. {setta-0.0.2 → setta-0.0.3}/backend/setta/utils/generate_memorable_string.py +0 -0
  273. {setta-0.0.2 → setta-0.0.3}/backend/setta/utils/generate_new_filename.py +0 -0
  274. {setta-0.0.2 → setta-0.0.3}/backend/setta/utils/section_contents.py +0 -0
  275. {setta-0.0.2 → setta-0.0.3}/backend/setta/utils/utils.py +0 -0
  276. {setta-0.0.2 → setta-0.0.3}/backend/setta.egg-info/dependency_links.txt +0 -0
  277. {setta-0.0.2 → setta-0.0.3}/backend/setta.egg-info/entry_points.txt +0 -0
  278. {setta-0.0.2 → setta-0.0.3}/backend/setta.egg-info/top_level.txt +0 -0
  279. {setta-0.0.2 → setta-0.0.3}/pyproject.toml +0 -0
setta-0.0.3/PKG-INFO ADDED
@@ -0,0 +1,146 @@
1
+ Metadata-Version: 2.2
2
+ Name: setta
3
+ Version: 0.0.3
4
+ Summary: Python without the donkeywork.
5
+ Home-page: https://setta.dev
6
+ Author: Kevin Musgrave, Jeff Musgrave
7
+ License: Apache-2.0
8
+ Project-URL: GitHub, https://github.com/settadev/setta
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Requires-Dist: click>=8.1.8
12
+ Requires-Dist: requests>=2.32.3
13
+ Requires-Dist: PyYAML>=6.0.2
14
+ Requires-Dist: websockets>=15.0
15
+ Requires-Dist: fastapi>=0.115.8
16
+ Requires-Dist: uvicorn>=0.34.0
17
+ Requires-Dist: docstring_parser>=0.16
18
+ Requires-Dist: pywinpty>=2.0.15; platform_system == "Windows"
19
+ Requires-Dist: ptyprocess>=0.7.0; platform_system != "Windows"
20
+ Requires-Dist: psutil>=7.0.0
21
+ Requires-Dist: basedpyright>=1.27.1
22
+ Requires-Dist: docstring-to-markdown>=0.15
23
+ Requires-Dist: black>=23.7.0
24
+ Requires-Dist: watchdog>=6.0.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: black==23.7.0; extra == "dev"
27
+ Requires-Dist: build==1.0.3; extra == "dev"
28
+ Requires-Dist: isort==5.12.0; extra == "dev"
29
+ Requires-Dist: flake8==6.1.0; extra == "dev"
30
+
31
+ ![Setta Logo](images/setta-github-light.png#gh-light-mode-only)
32
+ ![Setta Logo](images/setta-github-dark.png#gh-dark-mode-only)
33
+
34
+
35
+ # Python Without The Donkeywork
36
+
37
+ https://github.com/user-attachments/assets/0599b754-1fbc-470b-ad6f-ac44b01da761
38
+
39
+ [![PyPI version](https://badge.fury.io/py/setta.svg)](https://badge.fury.io/py/setta)
40
+ [![License](https://img.shields.io/pypi/l/setta)](https://github.com/settadev/setta/blob/main/LICENSE)
41
+ [![Discord](https://img.shields.io/badge/Discord-Join-7389D8?logo=discord&logoColor=white)](https://discord.gg/MmHJz75bZ5)
42
+
43
+ ## What does Setta do?
44
+ Setta enables you to:
45
+ - Streamline your code.
46
+ - Skip the boilerplate parsers and frontend.
47
+ - Effortlessly expose your Python functions as a flexible UI.
48
+ - Configure, interact, and share with ease.
49
+
50
+ ## What Setta Is Not
51
+ Setta is **not**:
52
+ - A frontend framework.
53
+ - A visual programming system.
54
+
55
+ ## Why Setta Is Betta
56
+
57
+
58
+ <table>
59
+ <tr>
60
+ <td style="vertical-align: top; padding-right: 20px;">
61
+ <h3>Built for Devs</h3>
62
+ <ul>
63
+ <li>Write your core logic wherever you want, whether that’s inside a Setta code block, or in your favorite IDE.</li>
64
+ <li>Set your configs inside Setta, with autocompletions, type-checking, and refactoring support.</li>
65
+ <li>Run. No config parsers needed.</li>
66
+ <li>Auto-export your Setta projects in a Git-friendly yaml format.</li>
67
+ </ul>
68
+ </td>
69
+ <td style="vertical-align: top;">
70
+ <video src="https://github.com/user-attachments/assets/ab5786d4-cf3f-4f8d-8951-7a9fd4a9f9bf" />
71
+ </td>
72
+ </tr>
73
+ <tr>
74
+ <td style="vertical-align: top; padding-right: 20px;">
75
+ <h3>Powerful Config Management</h3>
76
+ <ul>
77
+ <li>Version your configs at a granular level.</li>
78
+ <li>Share configurations between projects.</li>
79
+ <li>Run param sweeps across both scalar values and config versions.</li>
80
+ </ul>
81
+ </td>
82
+ <td style="vertical-align: top;">
83
+ <video src="https://github.com/user-attachments/assets/3303294e-20e7-419a-8274-57ac8e5aea92" />
84
+ </td>
85
+ </tr>
86
+ <tr>
87
+ <td style="vertical-align: top; padding-right: 20px;">
88
+ <h3>Customizable, Integrated Documentation</h3>
89
+ Integrate your documentation, tooltips, markdown, social content, and images to make your configurations more approachable.
90
+ </td>
91
+ <td style="vertical-align: top;">
92
+ <video src="https://github.com/user-attachments/assets/d08bcede-06b5-4b66-9559-c3f7574e5894" />
93
+ </td>
94
+ </tr>
95
+ <tr>
96
+ <td style="vertical-align: top; padding-right: 20px;">
97
+ <h3>Flexible UI</h3>
98
+ <ul>
99
+ <li>Create, organize and set your configs in a flexible drag-and-drop user interface.</li>
100
+ <li>Utilize common UI types like sliders, color pickers, switches, and text input fields.</li>
101
+ </ul>
102
+ </td>
103
+ <td style="vertical-align: top;">
104
+ <video src="https://github.com/user-attachments/assets/8730c9f3-dbcb-47af-8290-a5d460e82e4b" />
105
+ </td>
106
+ </tr>
107
+ <tr>
108
+ <td style="vertical-align: top; padding-right: 20px;">
109
+ <h3>Monitor Long Running Scripts</h3>
110
+ Configure your machine-learning training runs, LLM evals, and data analysis scripts.
111
+ </td>
112
+ <td style="vertical-align: top;">
113
+ <video src="https://github.com/user-attachments/assets/a118f895-19c5-4d0f-bebe-4a0b594ee405" />
114
+ </td>
115
+ </tr>
116
+ <tr>
117
+ <td style="vertical-align: top; padding-right: 20px;">
118
+ <h3>Interact In Real-Time</h3>
119
+ Inpaint your AI images and adjust data visualizations with real-time outputs in Setta.
120
+ </td>
121
+ <td style="vertical-align: top;">
122
+ <video src="https://github.com/user-attachments/assets/3e04c72f-3422-40b7-ba08-328b4534ea2b" />
123
+ </td>
124
+ </tr>
125
+ </table>
126
+
127
+
128
+ ## Installation
129
+
130
+ ```
131
+ pip install setta
132
+ ```
133
+
134
+ ## Documentation
135
+
136
+ Documentation is in progress: https://docs.setta.dev/
137
+
138
+ ## Examples
139
+
140
+ Examples showing how to use Setta will be here: https://github.com/settadev/examples
141
+
142
+
143
+ ## Contributors
144
+
145
+ - [Kevin Musgrave](https://github.com/KevinMusgrave): co-creator & full-stack developer.
146
+ - [Jeff Musgrave](https://github.com/JeffMusgrave): co-creator, UI/UX developer, frontend developer, and designer.
setta-0.0.3/README.md ADDED
@@ -0,0 +1,116 @@
1
+ ![Setta Logo](images/setta-github-light.png#gh-light-mode-only)
2
+ ![Setta Logo](images/setta-github-dark.png#gh-dark-mode-only)
3
+
4
+
5
+ # Python Without The Donkeywork
6
+
7
+ https://github.com/user-attachments/assets/0599b754-1fbc-470b-ad6f-ac44b01da761
8
+
9
+ [![PyPI version](https://badge.fury.io/py/setta.svg)](https://badge.fury.io/py/setta)
10
+ [![License](https://img.shields.io/pypi/l/setta)](https://github.com/settadev/setta/blob/main/LICENSE)
11
+ [![Discord](https://img.shields.io/badge/Discord-Join-7389D8?logo=discord&logoColor=white)](https://discord.gg/MmHJz75bZ5)
12
+
13
+ ## What does Setta do?
14
+ Setta enables you to:
15
+ - Streamline your code.
16
+ - Skip the boilerplate parsers and frontend.
17
+ - Effortlessly expose your Python functions as a flexible UI.
18
+ - Configure, interact, and share with ease.
19
+
20
+ ## What Setta Is Not
21
+ Setta is **not**:
22
+ - A frontend framework.
23
+ - A visual programming system.
24
+
25
+ ## Why Setta Is Betta
26
+
27
+
28
+ <table>
29
+ <tr>
30
+ <td style="vertical-align: top; padding-right: 20px;">
31
+ <h3>Built for Devs</h3>
32
+ <ul>
33
+ <li>Write your core logic wherever you want, whether that’s inside a Setta code block, or in your favorite IDE.</li>
34
+ <li>Set your configs inside Setta, with autocompletions, type-checking, and refactoring support.</li>
35
+ <li>Run. No config parsers needed.</li>
36
+ <li>Auto-export your Setta projects in a Git-friendly yaml format.</li>
37
+ </ul>
38
+ </td>
39
+ <td style="vertical-align: top;">
40
+ <video src="https://github.com/user-attachments/assets/ab5786d4-cf3f-4f8d-8951-7a9fd4a9f9bf" />
41
+ </td>
42
+ </tr>
43
+ <tr>
44
+ <td style="vertical-align: top; padding-right: 20px;">
45
+ <h3>Powerful Config Management</h3>
46
+ <ul>
47
+ <li>Version your configs at a granular level.</li>
48
+ <li>Share configurations between projects.</li>
49
+ <li>Run param sweeps across both scalar values and config versions.</li>
50
+ </ul>
51
+ </td>
52
+ <td style="vertical-align: top;">
53
+ <video src="https://github.com/user-attachments/assets/3303294e-20e7-419a-8274-57ac8e5aea92" />
54
+ </td>
55
+ </tr>
56
+ <tr>
57
+ <td style="vertical-align: top; padding-right: 20px;">
58
+ <h3>Customizable, Integrated Documentation</h3>
59
+ Integrate your documentation, tooltips, markdown, social content, and images to make your configurations more approachable.
60
+ </td>
61
+ <td style="vertical-align: top;">
62
+ <video src="https://github.com/user-attachments/assets/d08bcede-06b5-4b66-9559-c3f7574e5894" />
63
+ </td>
64
+ </tr>
65
+ <tr>
66
+ <td style="vertical-align: top; padding-right: 20px;">
67
+ <h3>Flexible UI</h3>
68
+ <ul>
69
+ <li>Create, organize and set your configs in a flexible drag-and-drop user interface.</li>
70
+ <li>Utilize common UI types like sliders, color pickers, switches, and text input fields.</li>
71
+ </ul>
72
+ </td>
73
+ <td style="vertical-align: top;">
74
+ <video src="https://github.com/user-attachments/assets/8730c9f3-dbcb-47af-8290-a5d460e82e4b" />
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <td style="vertical-align: top; padding-right: 20px;">
79
+ <h3>Monitor Long Running Scripts</h3>
80
+ Configure your machine-learning training runs, LLM evals, and data analysis scripts.
81
+ </td>
82
+ <td style="vertical-align: top;">
83
+ <video src="https://github.com/user-attachments/assets/a118f895-19c5-4d0f-bebe-4a0b594ee405" />
84
+ </td>
85
+ </tr>
86
+ <tr>
87
+ <td style="vertical-align: top; padding-right: 20px;">
88
+ <h3>Interact In Real-Time</h3>
89
+ Inpaint your AI images and adjust data visualizations with real-time outputs in Setta.
90
+ </td>
91
+ <td style="vertical-align: top;">
92
+ <video src="https://github.com/user-attachments/assets/3e04c72f-3422-40b7-ba08-328b4534ea2b" />
93
+ </td>
94
+ </tr>
95
+ </table>
96
+
97
+
98
+ ## Installation
99
+
100
+ ```
101
+ pip install setta
102
+ ```
103
+
104
+ ## Documentation
105
+
106
+ Documentation is in progress: https://docs.setta.dev/
107
+
108
+ ## Examples
109
+
110
+ Examples showing how to use Setta will be here: https://github.com/settadev/examples
111
+
112
+
113
+ ## Contributors
114
+
115
+ - [Kevin Musgrave](https://github.com/KevinMusgrave): co-creator & full-stack developer.
116
+ - [Jeff Musgrave](https://github.com/JeffMusgrave): co-creator, UI/UX developer, frontend developer, and designer.
@@ -0,0 +1 @@
1
+ __version__ = "0.0.3"
@@ -0,0 +1 @@
1
+ from .logger import Setta, SettaImg, SettaList
@@ -26,9 +26,7 @@ class Setta:
26
26
  if root_path:
27
27
  self.root_path = Path(root_path)
28
28
  else:
29
- self.root_path = Path(
30
- os.environ.get(CODE_FOLDER_ENV_VARIABLE, os.path.relpath(os.getcwd()))
31
- )
29
+ self.root_path = Path(os.environ.get(CODE_FOLDER_ENV_VARIABLE, "."))
32
30
 
33
31
  self.name_path_type_to_id = {}
34
32
 
@@ -1,15 +1,15 @@
1
1
  import copy
2
- import os
3
2
  from datetime import datetime
4
3
  from pathlib import Path
5
4
 
6
5
  from setta.code_gen.export_selected import (
7
6
  export_selected,
8
7
  get_gen_code_template_var,
8
+ get_section_name,
9
9
  get_section_type,
10
10
  get_selected_section_variant,
11
11
  )
12
- from setta.code_gen.find_placeholders import remove_tp, tp
12
+ from setta.code_gen.find_placeholders import parse_template_var, tp
13
13
  from setta.code_gen.python.generate_code import (
14
14
  convert_var_names_to_readable_form,
15
15
  generate_code,
@@ -23,6 +23,7 @@ from setta.code_gen.utils import process_refs
23
23
  from setta.utils.constants import (
24
24
  CODE_FOLDER,
25
25
  CODE_FOLDER_ENV_VARIABLE,
26
+ CWD,
26
27
  USER_SETTINGS,
27
28
  C,
28
29
  )
@@ -56,13 +57,13 @@ async def runCode(message, lsp_writers):
56
57
  id_to_relpath = {}
57
58
  for sid in to_write:
58
59
  curr_code = code_dict[sid]
59
- rel_path = write_code_to_file(
60
+ rel_path_str = write_code_to_file(
60
61
  folder_path,
61
62
  curr_code["sanitized_full_name"],
62
63
  curr_code["code"],
63
64
  curr_code["codeLanguage"],
64
65
  )
65
- id_to_relpath[sid] = rel_path
66
+ id_to_relpath[sid] = rel_path_str
66
67
 
67
68
  # Only run code that isn't referenced by other code
68
69
  run_order = [
@@ -71,8 +72,8 @@ async def runCode(message, lsp_writers):
71
72
 
72
73
  # create a wrapper script if there are multiple files to run
73
74
  if len(run_order) > 1:
74
- rel_path = create_wrapper_bash_script(folder_path, run_order, code_dict)
75
- command = codeCallStr(rel_path, "bash")
75
+ rel_path_str = create_wrapper_bash_script(folder_path, run_order, code_dict)
76
+ command = codeCallStr(rel_path_str, "bash")
76
77
  else:
77
78
  sid = run_order[0]
78
79
  command = codeCallStr(id_to_relpath[sid], code_dict[sid]["codeLanguage"])
@@ -280,17 +281,41 @@ def get_template_var_replacement_value_fn(
280
281
  chars_before_template_var,
281
282
  )
282
283
  else:
283
- section_dependencies.append(template_var["sectionId"])
284
- keyword = remove_tp(keyword)
285
- return construct_module_path(folder_path, keyword)
284
+ return process_non_hardcoded_template_var(
285
+ keyword,
286
+ template_var,
287
+ exporter_obj,
288
+ section_dependencies,
289
+ folder_path,
290
+ )
291
+
286
292
  elif codeLanguage == "bash":
287
- section_dependencies.append(template_var["sectionId"])
288
- keyword = sanitize_section_path_full_name(remove_tp(keyword))
289
- return codePathStr(Path(os.path.relpath(folder_path)), keyword, "python")
293
+ return process_non_hardcoded_template_var(
294
+ keyword, template_var, exporter_obj, section_dependencies, folder_path
295
+ )
290
296
 
291
297
  return get_template_var_replacement_value
292
298
 
293
299
 
300
+ def process_non_hardcoded_template_var(
301
+ keyword, template_var, exporter_obj, section_dependencies, folder_path
302
+ ):
303
+ keyword, keyword_type = parse_template_var(keyword)
304
+ if keyword_type == C.TEMPLATE_VAR_IMPORT_PATH_SUFFIX:
305
+ section_dependencies.append(template_var["sectionId"])
306
+ return construct_module_path(folder_path, keyword)
307
+ elif keyword_type == C.TEMPLATE_VAR_VERSION_SUFFIX:
308
+ version_name = get_selected_section_variant(
309
+ exporter_obj.p, template_var["sectionId"]
310
+ )["name"]
311
+ section_name = get_section_name(exporter_obj.p, template_var["sectionId"])
312
+ return f'"{section_name}@{version_name}"'
313
+ elif keyword_type == C.TEMPLATE_VAR_FILE_PATH_SUFFIX:
314
+ section_dependencies.append(template_var["sectionId"])
315
+ keyword = sanitize_section_path_full_name(keyword)
316
+ return f'"{codePathStr(folder_path, keyword, "python")}"'
317
+
318
+
294
319
  def get_absolute_decl_position_from_rel_position(
295
320
  template_var, var_name_to_decl_rel_position_dict
296
321
  ):
@@ -337,7 +362,7 @@ def preprocess_template_vars(code, evRefs, templateVars, cursor_position):
337
362
 
338
363
 
339
364
  def convert_folder_path_to_module_path(folder_path):
340
- return os.path.relpath(folder_path).replace("/", ".").replace("\\", ".")
365
+ return folder_path.relative_to(CWD).as_posix().replace("/", ".").replace("\\", ".")
341
366
 
342
367
 
343
368
  def languageToExtension(x):
@@ -351,7 +376,7 @@ def languageToCall(x):
351
376
  def codePathStr(folder_path, filename, codeLanguage):
352
377
  extension = languageToExtension(codeLanguage)
353
378
  output = folder_path / f"{filename}{extension}"
354
- return os.path.relpath(output).replace(os.sep, "/")
379
+ return output.relative_to(CWD).as_posix()
355
380
 
356
381
 
357
382
  def codeCallStr(filepath, codeLanguage):
@@ -377,8 +402,46 @@ def prune_and_topological_sort(code_dict, to_keep):
377
402
  return topological_sort(section_dependencies), section_dependencies
378
403
 
379
404
 
405
+ # TODO: eliminate redundancy between this and prune_and_topological_sort
406
+ def prune_and_find_top_nodes(code_dict, to_keep):
407
+ section_dependencies = {k: v["section_dependencies"] for k, v in code_dict.items()}
408
+ section_dependencies = prune_dict(section_dependencies, to_keep)
409
+ return find_top_nodes(section_dependencies), section_dependencies
410
+
411
+
412
+ def get_import_order_for_top_node(top_node, dependency_dict):
413
+ # Build a subgraph consisting of top_node and all its descendants.
414
+ subgraph = get_subgraph(top_node, dependency_dict)
415
+ # Get a topologically sorted list where each dependency comes before the node that depends on it.
416
+ sorted_nodes = topological_sort(subgraph)
417
+ # Because you plan to import starting from the end of the list and work backwards,
418
+ # reverse the topological order so that the deepest dependency is imported first.
419
+ import_order = sorted_nodes[::-1]
420
+ return import_order
421
+
422
+
423
+ def find_top_nodes(dependency_dict):
424
+ all_nodes = set(dependency_dict.keys())
425
+ all_deps = {dep for deps in dependency_dict.values() for dep in deps}
426
+ return all_nodes - all_deps
427
+
428
+
429
+ def get_subgraph(top_node, dependency_dict):
430
+ visited = set()
431
+
432
+ def dfs(node):
433
+ if node not in visited:
434
+ visited.add(node)
435
+ for dep in dependency_dict.get(node, []):
436
+ dfs(dep)
437
+
438
+ dfs(top_node)
439
+ return {node: dependency_dict.get(node, []) for node in visited}
440
+
441
+
442
+ # TODO: is this function actually necessary anymore?
380
443
  def topological_sort(objects):
381
- graph = {id: refs for id, refs in objects.items()}
444
+ graph = {node: refs for node, refs in objects.items()}
382
445
  visiting, visited = set(), set()
383
446
  order = []
384
447
 
@@ -387,16 +450,15 @@ def topological_sort(objects):
387
450
  raise ValueError("Circular reference detected")
388
451
  if node not in visited:
389
452
  visiting.add(node)
390
- for neighbour in graph[node]:
391
- dfs(neighbour)
453
+ for neighbor in graph.get(node, []):
454
+ dfs(neighbor)
392
455
  visiting.remove(node)
393
456
  visited.add(node)
394
457
  order.append(node)
395
458
 
396
- for id in objects.keys():
397
- if id not in visited:
398
- dfs(id)
399
-
459
+ for node in graph.keys():
460
+ if node not in visited:
461
+ dfs(node)
400
462
  return order[::-1]
401
463
 
402
464
 
@@ -407,28 +469,19 @@ def create_timestamped_folder(base_dir, prefix=""):
407
469
  folder_name = f"_{prefix}{timestamp}"
408
470
  # Full path for the new folder
409
471
  folder_path = Path(base_dir) / folder_name
410
-
411
- if not os.path.exists(folder_path):
412
- try:
413
- os.makedirs(folder_path)
414
- except FileExistsError:
415
- pass
416
-
472
+ folder_path.mkdir(parents=True, exist_ok=True)
417
473
  return folder_path
418
474
 
419
475
 
420
476
  def write_code_to_file(folder_path, filename, code, codeLanguage):
421
477
  extension = languageToExtension(codeLanguage)
422
478
  filepath = write_string_to_file(folder_path, f"{filename}{extension}", code)
423
- return os.path.relpath(filepath).replace(os.sep, "/")
479
+ return filepath.relative_to(CWD).as_posix()
424
480
 
425
481
 
426
482
  def write_string_to_file(folder, filename, content):
427
- # Full path to the file
428
- file_path = os.path.join(folder, filename)
429
- # Write the content to the file
430
- with open(file_path, "w") as file:
431
- file.write(content)
483
+ file_path = Path(folder) / filename
484
+ file_path.write_text(content)
432
485
  return file_path
433
486
 
434
487
 
@@ -11,10 +11,6 @@ from .find_placeholders import tp
11
11
  from .utils import process_refs
12
12
 
13
13
 
14
- def get_args_var_name(var_name):
15
- return f"{C.ARGS_PREFIX}{var_name}"
16
-
17
-
18
14
  def get_section_type(p, id):
19
15
  ui_type_id = p["sections"][id]["uiTypeId"]
20
16
  ui_type = p["uiTypes"].get(ui_type_id) or BASE_UI_TYPES[ui_type_id]
@@ -144,7 +140,7 @@ def no_entered_value(value):
144
140
 
145
141
 
146
142
  def get_var_name(var_name_mapping):
147
- return f"__x{len(var_name_mapping)}"
143
+ return f"{C.ARGS_PREFIX}x{len(var_name_mapping)}"
148
144
 
149
145
 
150
146
  def get_for_section_id(p, section_id):
@@ -0,0 +1,24 @@
1
+ from setta.utils.constants import C
2
+
3
+
4
+ def tp(x):
5
+ return f"{C.TEMPLATE_PREFIX}{x}"
6
+
7
+
8
+ def remove_tp(x):
9
+ return x.lstrip(C.TEMPLATE_PREFIX)
10
+
11
+
12
+ def parse_template_var(template_str: str) -> tuple[str, str | None]:
13
+ suffixes = [
14
+ f"{tp(C.TEMPLATE_VAR_IMPORT_PATH_SUFFIX)}",
15
+ f"{tp(C.TEMPLATE_VAR_VERSION_SUFFIX)}",
16
+ f"{tp(C.TEMPLATE_VAR_FILE_PATH_SUFFIX)}",
17
+ ]
18
+
19
+ for suffix in suffixes:
20
+ if template_str.endswith(suffix):
21
+ base_str = remove_tp(template_str[: -len(suffix)])
22
+ return base_str, remove_tp(suffix)
23
+
24
+ return template_str, None
@@ -1,5 +1,4 @@
1
1
  import logging
2
- import os
3
2
  import shutil
4
3
  import time
5
4
  from datetime import datetime
@@ -54,7 +53,7 @@ def create_backup(db_path):
54
53
  ensure_backup_dir_exists()
55
54
  timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
56
55
  backup_filename = f"backup_{timestamp}.db"
57
- backup_path = os.path.join(DB_BACKUP_FOLDER, backup_filename)
56
+ backup_path = DB_BACKUP_FOLDER / backup_filename
58
57
  logger.debug(f"creating backup: {backup_path}")
59
58
 
60
59
  shutil.copy2(db_path, backup_path)
@@ -35,23 +35,28 @@ def save_artifacts(db, artifacts):
35
35
  db.executemany(query, query_params)
36
36
 
37
37
 
38
- def save_artifact_groups(db, artifact_groups):
38
+ def save_artifact_groups(db, artifact_groups, sections):
39
39
  query = """
40
- INSERT INTO ArtifactGroupId (id, name, data)
41
- VALUES (:id, :name, :data)
40
+ INSERT INTO ArtifactGroupId (id, name, data, "order")
41
+ VALUES (:id, :name, :data, :order)
42
42
  ON CONFLICT (id)
43
43
  DO UPDATE SET
44
44
  name = :name,
45
- data = :data
45
+ data = :data,
46
+ "order" = :order
46
47
  """
47
48
  query_params = []
48
49
  for k, group in artifact_groups.items():
50
+ order = get_artifact_group_idx(k, sections)
51
+ if order is None:
52
+ continue
49
53
  data_keys = group.keys() - {"name", "artifactTransforms"}
50
54
  query_params.append(
51
55
  {
52
56
  "id": k,
53
57
  "name": group["name"],
54
58
  "data": json.dumps(filter_dict(group, data_keys)),
59
+ "order": order,
55
60
  }
56
61
  )
57
62
  db.executemany(query, query_params)
@@ -83,3 +88,14 @@ def save_artifact_groups(db, artifact_groups):
83
88
  )
84
89
 
85
90
  db.executemany(query, query_params)
91
+
92
+
93
+ def get_artifact_group_idx(artifact_group_id, sections):
94
+ for section in sections.values():
95
+ try:
96
+ if "artifactGroupIds" in section:
97
+ idx = section["artifactGroupIds"].index(artifact_group_id)
98
+ return idx
99
+ except ValueError:
100
+ continue
101
+ return None
@@ -25,7 +25,7 @@ def save_project_details(db, p):
25
25
  save_json_source_data(p)
26
26
  remove_json_source_data(p)
27
27
  save_artifacts(db, p["artifacts"])
28
- save_artifact_groups(db, p["artifactGroups"])
28
+ save_artifact_groups(db, p["artifactGroups"], p["sections"])
29
29
  save_code_info(db, p["codeInfo"])
30
30
  save_code_info_col(db, p["codeInfoCols"])
31
31
  save_ui_types(db, p["uiTypes"])
@@ -57,8 +57,11 @@ def load_sections(db, ids):
57
57
  SELECT
58
58
  originSectionId,
59
59
  GROUP_CONCAT(id) AS artifactGroupIds
60
- FROM
61
- ArtifactGroupId
60
+ FROM (
61
+ SELECT id, originSectionId
62
+ FROM ArtifactGroupId
63
+ ORDER BY "order"
64
+ )
62
65
  GROUP BY
63
66
  originSectionId
64
67
  ) AS A ON S.id = A.originSectionId
@@ -110,14 +110,14 @@ def save_sections(db, sections, section_variants):
110
110
  query = """
111
111
  UPDATE ArtifactGroupId
112
112
  SET originSectionId = :sectionId
113
- WHERE id = :artifactId
113
+ WHERE id = :artifactGroupId
114
114
  """
115
115
  for s in sections.values():
116
116
  for a in s["artifactGroupIds"]:
117
117
  query_params.append(
118
118
  {
119
119
  "sectionId": s["id"],
120
- "artifactId": a,
120
+ "artifactGroupId": a,
121
121
  }
122
122
  )
123
123
  db.executemany(query, query_params)
@@ -1,6 +1,8 @@
1
1
  import queue
2
2
  import sqlite3
3
3
 
4
+ from setta.utils.constants import SETTA_FILES_FOLDER
5
+
4
6
 
5
7
  class DB:
6
8
  def __init__(self, path):
@@ -100,3 +102,7 @@ class DBQueue:
100
102
  def __exit__(self, *args, **kwargs):
101
103
  self.curr.__exit__(*args, **kwargs)
102
104
  self.put_back_curr()
105
+
106
+
107
+ def get_default_db_path():
108
+ return SETTA_FILES_FOLDER / "setta.db"