setta 0.0.9.dev2__tar.gz → 0.0.10__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 (272) hide show
  1. {setta-0.0.9.dev2/backend/setta.egg-info → setta-0.0.10}/PKG-INFO +8 -10
  2. {setta-0.0.9.dev2 → setta-0.0.10}/README.md +7 -9
  3. setta-0.0.10/backend/setta/__init__.py +1 -0
  4. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/projects/load.py +1 -3
  5. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/projects/save.py +2 -2
  6. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/projects/utils.py +3 -3
  7. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/sectionVariants/copy.py +3 -11
  8. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/sections/copy.py +1 -1
  9. setta-0.0.10/backend/setta/database/db/sections/jsonSource.py +117 -0
  10. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/sections/load.py +68 -134
  11. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/settings_file.py +3 -3
  12. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/sections.py +6 -10
  13. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/constants/defaultValues.json +6 -7
  14. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/constants/settingsProject.json +71 -72
  15. setta-0.0.9.dev2/backend/setta/static/frontend/assets/index-bd04bc58.js → setta-0.0.10/backend/setta/static/frontend/assets/index-0304307e.js +142 -142
  16. setta-0.0.10/backend/setta/static/frontend/assets/index-030463f6.css +32 -0
  17. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/index.html +2 -2
  18. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/utils/constants.py +10 -4
  19. {setta-0.0.9.dev2 → setta-0.0.10/backend/setta.egg-info}/PKG-INFO +8 -10
  20. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta.egg-info/SOURCES.txt +2 -2
  21. setta-0.0.9.dev2/backend/setta/__init__.py +0 -1
  22. setta-0.0.9.dev2/backend/setta/database/db/sections/jsonSource.py +0 -186
  23. setta-0.0.9.dev2/backend/setta/static/frontend/assets/index-cf887608.css +0 -32
  24. {setta-0.0.9.dev2 → setta-0.0.10}/LICENSE +0 -0
  25. {setta-0.0.9.dev2 → setta-0.0.10}/MANIFEST.in +0 -0
  26. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/cli/__init__.py +0 -0
  27. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/cli/connect.py +0 -0
  28. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/cli/logger.py +0 -0
  29. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/__init__.py +0 -0
  30. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/create_runnable_scripts.py +0 -0
  31. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/export_selected.py +0 -0
  32. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/find_placeholders.py +0 -0
  33. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/python/__init__.py +0 -0
  34. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/python/ast_utils.py +0 -0
  35. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/python/check_scope.py +0 -0
  36. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/python/generate_code.py +0 -0
  37. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/python/make_parseable.py +0 -0
  38. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/python/position_line_col.py +0 -0
  39. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/python/validate_imports.py +0 -0
  40. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/utils.py +0 -0
  41. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/yaml/__init__.py +0 -0
  42. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/yaml/generate_yaml.py +0 -0
  43. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/code_gen/yaml/section_dict.py +0 -0
  44. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/__init__.py +0 -0
  45. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/backup.py +0 -0
  46. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/__init__.py +0 -0
  47. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/artifacts/__init__.py +0 -0
  48. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/artifacts/load.py +0 -0
  49. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/artifacts/save.py +0 -0
  50. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/artifacts/save_or_create.py +0 -0
  51. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/artifacts/utils.py +0 -0
  52. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/codeInfo/__init__.py +0 -0
  53. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/codeInfo/copy.py +0 -0
  54. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/codeInfo/load.py +0 -0
  55. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/codeInfo/save.py +0 -0
  56. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/codeInfo/utils.py +0 -0
  57. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/evRefs/__init__.py +0 -0
  58. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/evRefs/load.py +0 -0
  59. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/evRefs/save.py +0 -0
  60. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/projects/__init__.py +0 -0
  61. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/projects/copy.py +0 -0
  62. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/projects/delete.py +0 -0
  63. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/projects/saveAs.py +0 -0
  64. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/sectionVariants/__init__.py +0 -0
  65. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/sectionVariants/load.py +0 -0
  66. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/sectionVariants/save.py +0 -0
  67. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/sectionVariants/utils.py +0 -0
  68. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/sections/__init__.py +0 -0
  69. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/sections/save.py +0 -0
  70. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/sections/utils.py +0 -0
  71. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/uiTypes/__init__.py +0 -0
  72. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/uiTypes/copy.py +0 -0
  73. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/uiTypes/load.py +0 -0
  74. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/uiTypes/save.py +0 -0
  75. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db/uiTypes/utils.py +0 -0
  76. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db_init.py +0 -0
  77. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/db_objs.py +0 -0
  78. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/export_db/__init__.py +0 -0
  79. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/export_db/export_db.py +0 -0
  80. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/export_db/export_raw.py +0 -0
  81. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/export_db/export_readable.py +0 -0
  82. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/export_db/utils.py +0 -0
  83. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/import_db.py +0 -0
  84. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/seed.py +0 -0
  85. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/database/utils.py +0 -0
  86. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/__init__.py +0 -0
  87. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/file_watcher.py +0 -0
  88. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/reader.py +0 -0
  89. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/reader_fns/__init__.py +0 -0
  90. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/reader_fns/completion.py +0 -0
  91. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/reader_fns/definition.py +0 -0
  92. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/reader_fns/diagnostics.py +0 -0
  93. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/reader_fns/documentHighlight.py +0 -0
  94. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/reader_fns/references.py +0 -0
  95. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/reader_fns/signatureHelp.py +0 -0
  96. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/server.py +0 -0
  97. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/specific_file_watcher.py +0 -0
  98. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/utils.py +0 -0
  99. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/lsp/writer.py +0 -0
  100. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/__init__.py +0 -0
  101. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/artifact.py +0 -0
  102. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/code_info.py +0 -0
  103. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/dependencies.py +0 -0
  104. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/in_memory_fn_stdout_websocket.py +0 -0
  105. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/interactive.py +0 -0
  106. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/lsp.py +0 -0
  107. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/projects.py +0 -0
  108. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/reference_renaming.py +0 -0
  109. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/settings.py +0 -0
  110. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/terminals.py +0 -0
  111. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/routers/websocket.py +0 -0
  112. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/server.py +0 -0
  113. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/start.py +0 -0
  114. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/constants/BaseUITypes.json +0 -0
  115. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/constants/Settings.json +0 -0
  116. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/constants/constants.json +0 -0
  117. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/constants/db_init.sql +0 -0
  118. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/android-chrome-192x192.png +0 -0
  119. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/android-chrome-512x512.png +0 -0
  120. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/apple-touch-icon.png +0 -0
  121. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_AMS-Regular-0cdd387c.woff2 +0 -0
  122. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_AMS-Regular-30da91e8.woff +0 -0
  123. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_AMS-Regular-68534840.ttf +0 -0
  124. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Bold-07d8e303.ttf +0 -0
  125. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Bold-1ae6bd74.woff +0 -0
  126. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Bold-de7701e4.woff2 +0 -0
  127. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Regular-3398dd02.woff +0 -0
  128. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Regular-5d53e70a.woff2 +0 -0
  129. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Regular-ed0b7437.ttf +0 -0
  130. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Bold-74444efd.woff2 +0 -0
  131. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Bold-9163df9c.ttf +0 -0
  132. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Bold-9be7ceb8.woff +0 -0
  133. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Regular-1e6f9579.ttf +0 -0
  134. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Regular-51814d27.woff2 +0 -0
  135. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Regular-5e28753b.woff +0 -0
  136. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-Bold-0f60d1b8.woff2 +0 -0
  137. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-Bold-138ac28d.ttf +0 -0
  138. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-Bold-c76c5d69.woff +0 -0
  139. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-BoldItalic-70ee1f64.ttf +0 -0
  140. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-BoldItalic-99cd42a3.woff2 +0 -0
  141. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-BoldItalic-a6f7ec0d.woff +0 -0
  142. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-Italic-0d85ae7c.ttf +0 -0
  143. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-Italic-97479ca6.woff2 +0 -0
  144. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-Italic-f1d6ef86.woff +0 -0
  145. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-Regular-c2342cd8.woff2 +0 -0
  146. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-Regular-c6368d87.woff +0 -0
  147. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Main-Regular-d0332f52.ttf +0 -0
  148. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Math-BoldItalic-850c0af5.woff +0 -0
  149. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Math-BoldItalic-dc47344d.woff2 +0 -0
  150. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Math-BoldItalic-f9377ab0.ttf +0 -0
  151. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Math-Italic-08ce98e5.ttf +0 -0
  152. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Math-Italic-7af58c5e.woff2 +0 -0
  153. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Math-Italic-8a8d2445.woff +0 -0
  154. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Bold-1ece03f7.ttf +0 -0
  155. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Bold-e99ae511.woff2 +0 -0
  156. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Bold-ece03cfd.woff +0 -0
  157. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Italic-00b26ac8.woff2 +0 -0
  158. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Italic-3931dd81.ttf +0 -0
  159. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Italic-91ee6750.woff +0 -0
  160. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Regular-11e4dc8a.woff +0 -0
  161. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Regular-68e8c73e.woff2 +0 -0
  162. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Regular-f36ea897.ttf +0 -0
  163. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Script-Regular-036d4e95.woff2 +0 -0
  164. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Script-Regular-1c67f068.ttf +0 -0
  165. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Script-Regular-d96cdf2b.woff +0 -0
  166. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size1-Regular-6b47c401.woff2 +0 -0
  167. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size1-Regular-95b6d2f1.ttf +0 -0
  168. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size1-Regular-c943cc98.woff +0 -0
  169. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size2-Regular-2014c523.woff +0 -0
  170. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size2-Regular-a6b2099f.ttf +0 -0
  171. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size2-Regular-d04c5421.woff2 +0 -0
  172. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size3-Regular-500e04d5.ttf +0 -0
  173. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size3-Regular-6ab6b62e.woff +0 -0
  174. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size4-Regular-99f9c675.woff +0 -0
  175. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size4-Regular-a4af7d41.woff2 +0 -0
  176. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Size4-Regular-c647367d.ttf +0 -0
  177. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Typewriter-Regular-71d517d6.woff2 +0 -0
  178. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Typewriter-Regular-e14fed02.woff +0 -0
  179. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/KaTeX_Typewriter-Regular-f01f3e87.ttf +0 -0
  180. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/cormorant-garamond-all-700-italic-c9b58582.woff +0 -0
  181. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/cormorant-garamond-cyrillic-700-italic-9101ad5f.woff2 +0 -0
  182. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/cormorant-garamond-cyrillic-ext-700-italic-950de0d6.woff2 +0 -0
  183. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/cormorant-garamond-latin-700-italic-0bc53e12.woff2 +0 -0
  184. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/cormorant-garamond-latin-ext-700-italic-525738e0.woff2 +0 -0
  185. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/cormorant-garamond-vietnamese-700-italic-99563037.woff2 +0 -0
  186. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/erase-5e0448ea.svg +0 -0
  187. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-all-400-normal-054f12d0.woff +0 -0
  188. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-all-600-normal-c03769e5.woff +0 -0
  189. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-all-800-normal-15dc6e4b.woff +0 -0
  190. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-cyrillic-400-normal-a4eee61a.woff2 +0 -0
  191. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-cyrillic-600-normal-8b14f703.woff2 +0 -0
  192. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-cyrillic-800-normal-e706eaaa.woff2 +0 -0
  193. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-cyrillic-ext-400-normal-70047a3b.woff2 +0 -0
  194. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-cyrillic-ext-600-normal-d4ab9bc4.woff2 +0 -0
  195. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-cyrillic-ext-800-normal-eae7515a.woff2 +0 -0
  196. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-greek-400-normal-381ea30d.woff2 +0 -0
  197. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-greek-600-normal-601f93a2.woff2 +0 -0
  198. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-greek-800-normal-7af4fb64.woff2 +0 -0
  199. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-greek-ext-400-normal-27027b17.woff2 +0 -0
  200. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-greek-ext-600-normal-f2ddf9de.woff2 +0 -0
  201. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-greek-ext-800-normal-4cb6189e.woff2 +0 -0
  202. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-latin-400-normal-d56fec21.woff2 +0 -0
  203. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-latin-600-normal-ff769fa6.woff2 +0 -0
  204. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-latin-800-normal-5eea1309.woff2 +0 -0
  205. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-latin-ext-400-normal-bb698d85.woff2 +0 -0
  206. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-latin-ext-600-normal-ca4808f9.woff2 +0 -0
  207. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/inter-latin-ext-800-normal-ebdacc0f.woff2 +0 -0
  208. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/logo/logo.svg +0 -0
  209. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/pen-455d7d8a.svg +0 -0
  210. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/source-code-pro-all-500-normal-6bdaa03b.woff +0 -0
  211. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/source-code-pro-cyrillic-500-normal-288a0d68.woff2 +0 -0
  212. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/source-code-pro-cyrillic-ext-500-normal-b110a13b.woff2 +0 -0
  213. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/source-code-pro-greek-500-normal-04328acb.woff2 +0 -0
  214. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/source-code-pro-latin-500-normal-06edef1e.woff2 +0 -0
  215. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/source-code-pro-latin-ext-500-normal-6dc60d5e.woff2 +0 -0
  216. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/web-vitals-44a8e082.js +0 -0
  217. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-all-400-normal-38034a3c.woff +0 -0
  218. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-all-500-normal-550d64e5.woff +0 -0
  219. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-all-600-normal-ccf14060.woff +0 -0
  220. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-all-700-normal-494c2971.woff +0 -0
  221. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-latin-400-normal-36735bc1.woff2 +0 -0
  222. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-latin-500-normal-3790bfda.woff2 +0 -0
  223. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-latin-600-normal-5fba494e.woff2 +0 -0
  224. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-latin-700-normal-a5033d0a.woff2 +0 -0
  225. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-latin-ext-400-normal-c20f571a.woff2 +0 -0
  226. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-latin-ext-500-normal-0f5ac96c.woff2 +0 -0
  227. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-latin-ext-600-normal-97a237d1.woff2 +0 -0
  228. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/assets/work-sans-latin-ext-700-normal-103e112c.woff2 +0 -0
  229. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/browserconfig.xml +0 -0
  230. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/favicon-16x16.png +0 -0
  231. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/favicon-32x32.png +0 -0
  232. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/favicon.ico +0 -0
  233. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/manifest.json +0 -0
  234. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/mstile-144x144.png +0 -0
  235. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/mstile-150x150.png +0 -0
  236. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/mstile-310x150.png +0 -0
  237. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/mstile-310x310.png +0 -0
  238. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/mstile-70x70.png +0 -0
  239. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/robots.txt +0 -0
  240. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/safari-pinned-tab.svg +0 -0
  241. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/frontend/site.webmanifest +0 -0
  242. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/seed/.DS_Store +0 -0
  243. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/static/seed/examples/.DS_Store +0 -0
  244. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/__init__.py +0 -0
  245. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/fns/__init__.py +0 -0
  246. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/fns/codeAreaAutocomplete.py +0 -0
  247. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/fns/codeAreaFindTemplateVars.py +0 -0
  248. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/fns/codeAreaInitializeCode.py +0 -0
  249. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/fns/findEVRefs.py +0 -0
  250. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/fns/parametersRequest.py +0 -0
  251. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/fns/textFieldAutocomplete.py +0 -0
  252. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/fns/textFieldInitializeCode.py +0 -0
  253. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/fns/typeCheck.py +0 -0
  254. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/fns/utils.py +0 -0
  255. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/task_runner.py +0 -0
  256. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/tasks.py +0 -0
  257. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/tasks/utils.py +0 -0
  258. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/terminals/__init__.py +0 -0
  259. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/terminals/terminals.py +0 -0
  260. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/terminals/utils.py +0 -0
  261. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/utils/__init__.py +0 -0
  262. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/utils/generate_memorable_string.py +0 -0
  263. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/utils/generate_new_filename.py +0 -0
  264. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/utils/section_contents.py +0 -0
  265. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/utils/utils.py +0 -0
  266. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta/utils/websocket_manager.py +0 -0
  267. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta.egg-info/dependency_links.txt +0 -0
  268. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta.egg-info/entry_points.txt +0 -0
  269. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta.egg-info/requires.txt +0 -0
  270. {setta-0.0.9.dev2 → setta-0.0.10}/backend/setta.egg-info/top_level.txt +0 -0
  271. {setta-0.0.9.dev2 → setta-0.0.10}/pyproject.toml +0 -0
  272. {setta-0.0.9.dev2 → setta-0.0.10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: setta
3
- Version: 0.0.9.dev2
3
+ Version: 0.0.10
4
4
  Summary: Python without the donkeywork.
5
5
  Home-page: https://setta.dev
6
6
  Author: Kevin Musgrave, Jeff Musgrave
@@ -42,19 +42,16 @@ Requires-Dist: flake8==6.1.0; extra == "dev"
42
42
 
43
43
  ## News
44
44
 
45
+ **March 1**: [v0.0.10](https://github.com/settadev/setta/releases/tag/v0.0.10)
46
+ - Made JSON source sections more user-friendly.
47
+
48
+ **February 27**: [v0.0.9](https://github.com/settadev/setta/releases/tag/v0.0.9)
49
+ - Improvements to the JSON file referencing mechanism.
50
+
45
51
  **February 24**: [v0.0.8](https://github.com/settadev/setta/releases/tag/v0.0.8)
46
52
  - Added options to the `export-db` cli command.
47
53
  - Allow artifacts to be renamed directly in the side pane.
48
54
 
49
- **February 23**: [v0.0.7](https://github.com/settadev/setta/releases/tag/v0.0.7)
50
- - Added a new "Chat" section type for sending chats and displaying chat history. Here's what it looks like:
51
- <p align="center">
52
- <img width="350" src="https://github.com/user-attachments/assets/65fd504e-4dcb-42db-b32e-d21c540354ee" />
53
-
54
- </p>
55
-
56
- **February 22**: [v0.0.6](https://github.com/settadev/setta/releases/tag/v0.0.6)
57
- - Fixed bug where the language server URIs weren't created properly on Windows.
58
55
 
59
56
  ## What does Setta do?
60
57
 
@@ -82,6 +79,7 @@ Or click on one of the images below to go directly to that example:
82
79
  <tr>
83
80
  <td><a href="https://github.com/settadev/examples/tree/main/stream_diffusion_img_to_img"><img src="https://github.com/user-attachments/assets/2a063779-ed61-4103-90a5-bf127f3ea012" /></a></td>
84
81
  <td><a href="https://github.com/settadev/examples/tree/main/trl_language_model_finetuning"><img src="https://github.com/user-attachments/assets/96775341-4b6d-4d3c-8bc2-743eafce458a" /></a></td>
82
+ <td><a href="https://github.com/settadev/examples/tree/main/groq_api_chat"><img src="https://github.com/user-attachments/assets/0d8ff9c1-2557-4549-a816-3c6693430d98" /></a></td>
85
83
  </tr>
86
84
  <tr>
87
85
  <td><a href="https://github.com/settadev/examples/tree/main/transformers_trainer"><img src="https://github.com/user-attachments/assets/1f6554f8-8d49-4ba8-af48-f5dc6bc5d845" /></a></td>
@@ -12,19 +12,16 @@
12
12
 
13
13
  ## News
14
14
 
15
+ **March 1**: [v0.0.10](https://github.com/settadev/setta/releases/tag/v0.0.10)
16
+ - Made JSON source sections more user-friendly.
17
+
18
+ **February 27**: [v0.0.9](https://github.com/settadev/setta/releases/tag/v0.0.9)
19
+ - Improvements to the JSON file referencing mechanism.
20
+
15
21
  **February 24**: [v0.0.8](https://github.com/settadev/setta/releases/tag/v0.0.8)
16
22
  - Added options to the `export-db` cli command.
17
23
  - Allow artifacts to be renamed directly in the side pane.
18
24
 
19
- **February 23**: [v0.0.7](https://github.com/settadev/setta/releases/tag/v0.0.7)
20
- - Added a new "Chat" section type for sending chats and displaying chat history. Here's what it looks like:
21
- <p align="center">
22
- <img width="350" src="https://github.com/user-attachments/assets/65fd504e-4dcb-42db-b32e-d21c540354ee" />
23
-
24
- </p>
25
-
26
- **February 22**: [v0.0.6](https://github.com/settadev/setta/releases/tag/v0.0.6)
27
- - Fixed bug where the language server URIs weren't created properly on Windows.
28
25
 
29
26
  ## What does Setta do?
30
27
 
@@ -52,6 +49,7 @@ Or click on one of the images below to go directly to that example:
52
49
  <tr>
53
50
  <td><a href="https://github.com/settadev/examples/tree/main/stream_diffusion_img_to_img"><img src="https://github.com/user-attachments/assets/2a063779-ed61-4103-90a5-bf127f3ea012" /></a></td>
54
51
  <td><a href="https://github.com/settadev/examples/tree/main/trl_language_model_finetuning"><img src="https://github.com/user-attachments/assets/96775341-4b6d-4d3c-8bc2-743eafce458a" /></a></td>
52
+ <td><a href="https://github.com/settadev/examples/tree/main/groq_api_chat"><img src="https://github.com/user-attachments/assets/0d8ff9c1-2557-4549-a816-3c6693430d98" /></a></td>
55
53
  </tr>
56
54
  <tr>
57
55
  <td><a href="https://github.com/settadev/examples/tree/main/transformers_trainer"><img src="https://github.com/user-attachments/assets/1f6554f8-8d49-4ba8-af48-f5dc6bc5d845" /></a></td>
@@ -0,0 +1 @@
1
+ __version__ = "0.0.10"
@@ -128,9 +128,7 @@ def load_project_config(db, project_config_name, do_load_json_sources=True):
128
128
  load_ev_refs_into_data_structures(db, sectionVariants, codeInfo)
129
129
  load_template_vars_into_data_structures(db, sectionVariants)
130
130
  if do_load_json_sources:
131
- load_json_sources_into_data_structures(
132
- sections, codeInfo, codeInfoCols, sectionVariants
133
- )
131
+ load_json_sources_into_data_structures(codeInfo, codeInfoCols, sectionVariants)
134
132
 
135
133
  return {
136
134
  "projectConfig": projectConfig,
@@ -15,7 +15,7 @@ from setta.utils.generate_memorable_string import generate_memorable_available_s
15
15
  from setta.utils.utils import filter_dict
16
16
 
17
17
  from ..codeInfo.save import save_code_info, save_code_info_col
18
- from ..sections.jsonSource import remove_json_source_data, save_json_source_data
18
+ from ..sections.jsonSource import remove_json_source_values, save_json_source_data
19
19
  from ..sections.save import save_sections
20
20
  from ..sectionVariants.save import save_section_variants
21
21
  from ..uiTypes.save import save_ui_type_cols, save_ui_types
@@ -24,7 +24,7 @@ from ..uiTypes.save import save_ui_type_cols, save_ui_types
24
24
  def save_project_details(db, p, do_save_json_source_data=True):
25
25
  if do_save_json_source_data:
26
26
  save_json_source_data(p)
27
- remove_json_source_data(p)
27
+ remove_json_source_values(p)
28
28
  save_artifacts(db, p["artifacts"])
29
29
  save_artifact_groups(db, p["artifactGroups"], p["sections"])
30
30
  save_code_info(db, p["codeInfo"])
@@ -5,7 +5,7 @@ from setta.database.db.codeInfo.utils import (
5
5
  add_defaults_to_code_info,
6
6
  add_defaults_to_code_info_cols,
7
7
  )
8
- from setta.database.db.sections.jsonSource import remove_json_source_data
8
+ from setta.database.db.sections.jsonSource import remove_json_source_values
9
9
  from setta.database.db.sections.load import load_json_sources_into_data_structures
10
10
  from setta.database.db.sections.utils import add_defaults_to_sections
11
11
  from setta.database.db.sectionVariants.utils import add_defaults_to_section_variants
@@ -35,7 +35,7 @@ def add_defaults_to_project(p):
35
35
  def add_defaults_to_project_and_load_json_sources(p):
36
36
  add_defaults_to_project(p)
37
37
  load_json_sources_into_data_structures(
38
- p["sections"], p["codeInfo"], p["codeInfoCols"], p["sectionVariants"]
38
+ p["codeInfo"], p["codeInfoCols"], p["sectionVariants"]
39
39
  )
40
40
 
41
41
 
@@ -44,7 +44,7 @@ def remove_empty(x):
44
44
 
45
45
 
46
46
  def filter_data_for_json_export(p):
47
- remove_json_source_data(p)
47
+ remove_json_source_values(p)
48
48
 
49
49
  p["projectConfig"] = filter_dict(
50
50
  p["projectConfig"],
@@ -2,19 +2,11 @@ from setta.database.utils import remap_ids, rename_keys
2
2
  from setta.utils.generate_memorable_string import generate_memorable_string
3
3
 
4
4
 
5
- def copy_section_variants(
6
- sections, section_variants, code_info_id_map, code_info_col_id_map
7
- ):
5
+ def copy_section_variants(section_variants, code_info_id_map, code_info_col_id_map):
8
6
  new_section_variants, section_variant_id_map = remap_ids(section_variants)
9
- keep_old_name = set()
10
- for s in sections.values():
11
- if not s["jsonSource"]:
12
- continue
13
- for v in s["variantIds"]:
14
- keep_old_name.add(section_variant_id_map[v])
15
7
 
16
- for id, obj in new_section_variants.items():
17
- if id not in keep_old_name:
8
+ for obj in new_section_variants.values():
9
+ if not obj["isJsonSource"]:
18
10
  obj["name"] = generate_memorable_string()
19
11
  obj["values"] = rename_keys(obj["values"], code_info_id_map)
20
12
  if obj["codeInfoColId"]:
@@ -44,7 +44,7 @@ def copy_sections_and_other_info(x):
44
44
  x["codeInfoCols"], code_info_id_map
45
45
  )
46
46
  new_section_variants, section_variant_id_map = copy_section_variants(
47
- x["sections"], x["sectionVariants"], code_info_id_map, code_info_col_id_map
47
+ x["sectionVariants"], code_info_id_map, code_info_col_id_map
48
48
  )
49
49
  new_ui_types, ui_type_id_map = copy_ui_types(x["uiTypes"])
50
50
  new_ui_type_cols, ui_type_col_id_map = copy_ui_type_cols(
@@ -0,0 +1,117 @@
1
+ from collections import defaultdict
2
+
3
+ from setta.utils.utils import replace_null_keys_with_none, save_json_to_file, try_json
4
+
5
+
6
+ def save_json_source_data(p, variant_ids=None):
7
+ variants = {
8
+ k: v
9
+ for k, v in p["sectionVariants"].items()
10
+ if ((not variant_ids) or k in variant_ids)
11
+ }
12
+
13
+ to_be_saved = defaultdict(dict)
14
+
15
+ p["codeInfoCols"] = replace_null_keys_with_none(p["codeInfoCols"])
16
+
17
+ for variant in variants.values():
18
+ if not variant["isJsonSource"]:
19
+ continue
20
+ codeInfoColId = variant["codeInfoColId"]
21
+ if not codeInfoColId:
22
+ continue
23
+ codeInfoCol = p["codeInfoCols"][codeInfoColId]
24
+ filename = variant["name"]
25
+
26
+ ancestor_paths = build_ancestor_paths(p["codeInfo"], codeInfoCol["children"])
27
+ recursively_add_keys(
28
+ p,
29
+ variant,
30
+ codeInfoCol,
31
+ to_be_saved[filename],
32
+ None,
33
+ variant["jsonSourceKeys"],
34
+ ancestor_paths,
35
+ )
36
+
37
+ # Make sure the jsonSourceKeys are present.
38
+ # (They might not be because they are completely empty)
39
+ add_key_path_to_dict(to_be_saved[filename], variant["jsonSourceKeys"])
40
+
41
+ # Save each file
42
+ for filename, data in to_be_saved.items():
43
+ save_json_to_file(filename, data)
44
+
45
+ return to_be_saved
46
+
47
+
48
+ def build_ancestor_paths(codeInfo, codeInfoColChildren):
49
+ parent_map = {}
50
+ for parent_id, children in codeInfoColChildren.items():
51
+ for child_id in children:
52
+ parent_map[child_id] = parent_id
53
+
54
+ ancestor_paths = {}
55
+ for id in parent_map.keys():
56
+ if id not in ancestor_paths:
57
+ path = []
58
+ current_id = id
59
+
60
+ # Traverse up to build the path
61
+ while current_id is not None:
62
+ if current_id in codeInfo: # Skip if not a valid codeInfo node
63
+ name = codeInfo[current_id]["name"]
64
+ path.insert(0, name)
65
+
66
+ # Get parent using the map
67
+ parent_id = parent_map.get(current_id)
68
+ current_id = parent_id
69
+ else:
70
+ break
71
+
72
+ ancestor_paths[id] = path
73
+
74
+ return ancestor_paths
75
+
76
+
77
+ def recursively_add_keys(
78
+ p, variant, codeInfoCol, input_dict, codeInfoId, jsonSourceKeys, ancestor_paths
79
+ ):
80
+ for k in codeInfoCol["children"][codeInfoId]:
81
+ children = codeInfoCol["children"][k]
82
+
83
+ # Get pre-computed key path
84
+ key_path = [*jsonSourceKeys, *ancestor_paths[k]]
85
+ value = try_getting_value(variant, k, children)
86
+ current_dict = add_key_path_to_dict(input_dict, key_path[:-1])
87
+
88
+ # Set the value at the final position
89
+ if key_path: # Only set if we have a path
90
+ current_dict[key_path[-1]] = value
91
+
92
+ recursively_add_keys(
93
+ p, variant, codeInfoCol, input_dict, k, jsonSourceKeys, ancestor_paths
94
+ )
95
+
96
+
97
+ def add_key_path_to_dict(output, key_path):
98
+ for path_part in key_path:
99
+ # Create nested dictionaries if they don't exist
100
+ if path_part not in output:
101
+ output[path_part] = {}
102
+ output = output[path_part]
103
+ return output
104
+
105
+
106
+ def try_getting_value(variant, codeInfoId, codeInfoChildren):
107
+ if len(codeInfoChildren) == 0:
108
+ if codeInfoId in variant["values"]:
109
+ return try_json(variant["values"][codeInfoId]["value"])
110
+ return ""
111
+ return {}
112
+
113
+
114
+ def remove_json_source_values(p):
115
+ for variant in p["sectionVariants"].values():
116
+ if variant["isJsonSource"]:
117
+ variant["values"] = {}
@@ -1,5 +1,4 @@
1
1
  import copy
2
- import glob
3
2
  import itertools
4
3
  import json
5
4
  import logging
@@ -9,7 +8,7 @@ from setta.database.db.artifacts.load import load_artifact_groups
9
8
  from setta.database.db.codeInfo.utils import new_code_info_col, with_code_info_defaults
10
9
  from setta.database.db.sections.jsonSource import build_ancestor_paths
11
10
  from setta.database.db.sections.utils import with_section_defaults
12
- from setta.database.db.sectionVariants.utils import new_ev_entry, new_section_variant
11
+ from setta.database.db.sectionVariants.utils import new_ev_entry
13
12
  from setta.database.utils import create_new_id
14
13
 
15
14
  from ..sectionVariants.load import load_section_variants
@@ -201,148 +200,84 @@ def num_projects_each_section_exists_in(db, section_ids):
201
200
 
202
201
 
203
202
  def load_json_sources_into_data_structures(
204
- sections, codeInfo, codeInfoCols, sectionVariants, section_ids=None
203
+ codeInfo, codeInfoCols, sectionVariants, variant_ids=None
205
204
  ):
206
- filenames_loaded = set()
207
- sections = {
205
+ sectionVariants = {
208
206
  k: v
209
- for k, v in sections.items()
210
- if v["jsonSource"] and ((not section_ids) or k in section_ids)
207
+ for k, v in sectionVariants.items()
208
+ if ((not variant_ids) or k in variant_ids)
211
209
  }
212
- for s in sections.values():
213
- logger.debug(
214
- f'Attempting to read {s["jsonSource"]} with keys {s["jsonSourceKeys"]}'
215
- )
216
- new_data = load_json_source(s["jsonSource"], s["jsonSourceKeys"])
217
- filenames_loaded.update(
218
- merge_into_existing(new_data, s, sectionVariants, codeInfo, codeInfoCols)
219
- )
220
210
 
221
- # delete variants that aren't associated with a loaded file
222
- to_delete = []
223
- for s in sections.values():
224
- for vid in s["variantIds"]:
225
- if sectionVariants[vid]["name"] not in filenames_loaded:
226
- logger.debug(
227
- f'Removing variant {sectionVariants[vid]["name"]} because the associated json was not found'
228
- )
229
- to_delete.append(vid)
211
+ for variant in sectionVariants.values():
212
+ if not variant["isJsonSource"]:
213
+ continue
214
+ new_data, isMissing = load_json_source(
215
+ variant["name"], variant["jsonSourceKeys"]
216
+ )
217
+ variant["jsonSourcMissing"] = isMissing
218
+ if not isMissing:
219
+ if not variant["codeInfoColId"]:
220
+ variant["codeInfoColId"] = create_new_id()
221
+ codeInfoCols[variant["codeInfoColId"]] = new_code_info_col()
222
+ codeInfoCol = codeInfoCols[variant["codeInfoColId"]]
223
+ merge_into_existing(new_data, variant, codeInfo, codeInfoCol)
230
224
 
231
- for vid in to_delete:
232
- if sectionVariants[vid]["codeInfoColId"]:
233
- del codeInfoCols[sectionVariants[vid]["codeInfoColId"]]
234
- del sectionVariants[vid]
235
225
 
236
- for s in sections.values():
237
- s["jsonSourceMissing"] = False
238
- s["variantIds"] = [v for v in s["variantIds"] if v in sectionVariants]
239
- if len(s["variantIds"]) == 0:
240
- logger.debug("Section has no variantIds. Creating new section variant.")
241
- variantId, variant = new_section_variant()
242
- sectionVariants[variantId] = variant
243
- s["variantId"] = variantId
244
- s["variantIds"].append(variantId)
245
- s["jsonSourceMissing"] = True
246
- elif s["variantId"] not in s["variantIds"]:
247
- logger.debug(
248
- "Selected variantId is not in list of variantIds. Changing selected variantId"
249
- )
250
- s["variantId"] = s["variantIds"][0]
251
-
252
- if s["defaultVariantId"] not in s["variantIds"]:
253
- logger.debug(
254
- "Default variantId is not in list of variantIds. Changing default variantId"
255
- )
256
- s["defaultVariantId"] = s["variantId"]
257
-
258
-
259
- def merge_into_existing(new_data, section, sectionVariants, codeInfo, codeInfoCols):
260
- filenames_loaded = set()
226
+ def merge_into_existing(data, sectionVariant, codeInfo, codeInfoCol):
227
+ filename = sectionVariant["name"]
261
228
  jsonSourceMetadata_to_id = {}
262
- ancestor_paths = build_ancestor_paths(codeInfo, codeInfoCols)
263
- for id, info in codeInfo.items():
229
+ ancestor_paths = build_ancestor_paths(codeInfo, codeInfoCol["children"])
230
+ for id in ancestor_paths:
264
231
  jsonSourceMetadata_to_id[
265
- createMetadataJsonString(info["jsonSource"], ancestor_paths[id])
232
+ createMetadataJsonString(filename, ancestor_paths[id])
266
233
  ] = id
267
234
 
268
- for filename, data in new_data.items():
269
- replacements = {}
270
- new_ancestor_paths = build_ancestor_paths(
271
- data["codeInfo"], {None: {"children": data["codeInfoColChildren"]}}
235
+ replacements = {}
236
+ new_ancestor_paths = build_ancestor_paths(
237
+ data["codeInfo"], data["codeInfoColChildren"]
238
+ )
239
+ for newId, newInfo in data["codeInfo"].items():
240
+ existingId = jsonSourceMetadata_to_id.get(
241
+ createMetadataJsonString(filename, new_ancestor_paths[newId])
272
242
  )
273
- for newId, newInfo in data["codeInfo"].items():
274
- existingId = jsonSourceMetadata_to_id.get(
275
- createMetadataJsonString(
276
- newInfo["jsonSource"], new_ancestor_paths[newId]
277
- )
278
- )
279
- if existingId:
280
- replacements[newId] = existingId
281
- else:
282
- codeInfo[newId] = newInfo
283
-
284
- for newId, existingId in replacements.items():
285
- del data["codeInfo"][newId]
286
- data["codeInfoColChildren"][existingId] = [
287
- replacements.get(x, x) for x in data["codeInfoColChildren"][newId]
288
- ]
289
- data["codeInfoColChildren"][None] = [
290
- replacements.get(x, x) for x in data["codeInfoColChildren"][None]
291
- ]
292
- del data["codeInfoColChildren"][newId]
293
- data["sectionVariantValues"][existingId] = data["sectionVariantValues"][
294
- newId
295
- ]
296
- del data["sectionVariantValues"][newId]
297
-
298
- variantId = None
299
- for vid in section["variantIds"]:
300
- if sectionVariants[vid]["name"] == filename:
301
- variantId = vid
302
- break
303
- if not variantId:
304
- variantId, section_variant = new_section_variant(
305
- name=filename,
306
- )
307
- section["variantIds"].append(variantId)
308
- sectionVariants[variantId] = section_variant
309
-
310
- curr_section_variant = sectionVariants[variantId]
311
- curr_section_variant["values"] = data["sectionVariantValues"]
312
- codeInfoColId = curr_section_variant["codeInfoColId"]
313
-
314
- if not codeInfoColId:
315
- codeInfoColId = create_new_id()
316
- curr_section_variant["codeInfoColId"] = codeInfoColId
317
- codeInfoCols[codeInfoColId] = new_code_info_col()
318
-
319
- codeInfoCols[codeInfoColId]["children"] = data["codeInfoColChildren"]
320
-
321
- section["configLanguage"] = "json"
322
- filenames_loaded.add(filename)
323
-
324
- return filenames_loaded
325
-
326
-
327
- def load_json_source(filename_glob, jsonSourceKeys):
328
- new_data = {}
329
-
330
- filenames = glob.glob(filename_glob)
331
- for filename in filenames:
332
- try:
333
- with open(filename, "r") as f:
334
- jsonSourceData = json.load(f)
335
- except json.JSONDecodeError:
336
- jsonSourceData = {}
337
- except FileNotFoundError:
338
- logger.debug(f"couldn't find: {filename}")
339
- continue
243
+ if existingId:
244
+ replacements[newId] = existingId
245
+ else:
246
+ codeInfo[newId] = newInfo
247
+
248
+ for newId, existingId in replacements.items():
249
+ del data["codeInfo"][newId]
250
+ data["codeInfoColChildren"][existingId] = [
251
+ replacements.get(x, x) for x in data["codeInfoColChildren"][newId]
252
+ ]
253
+ data["codeInfoColChildren"][None] = [
254
+ replacements.get(x, x) for x in data["codeInfoColChildren"][None]
255
+ ]
256
+ del data["codeInfoColChildren"][newId]
257
+ data["sectionVariantValues"][existingId] = data["sectionVariantValues"][newId]
258
+ del data["sectionVariantValues"][newId]
259
+
260
+ sectionVariant["values"] = data["sectionVariantValues"]
261
+ codeInfoCol["children"] = data["codeInfoColChildren"]
262
+
263
+
264
+ def load_json_source(filename, jsonSourceKeys):
265
+ jsonSourceData = {}
266
+ isMissing = False
340
267
 
341
- new_data[filename] = process_json_object(
342
- jsonSourceData, filename, jsonSourceKeys
343
- )
268
+ try:
269
+ logger.debug(f"Attempting to read {filename} with keys {jsonSourceKeys}")
270
+ with open(filename, "r") as f:
271
+ jsonSourceData = json.load(f)
272
+ except json.JSONDecodeError:
273
+ pass
274
+ except FileNotFoundError:
275
+ logger.debug(f"couldn't find: {filename}")
276
+ isMissing = True
344
277
 
345
- return new_data
278
+ new_data = process_json_object(jsonSourceData, filename, jsonSourceKeys)
279
+
280
+ return new_data, isMissing
346
281
 
347
282
 
348
283
  def process_json_object(jsonSourceData, filename, jsonSourceKeys):
@@ -381,7 +316,7 @@ def process_json_object_helper(output, obj, filename, current_path, metadataToId
381
316
  children_keys = []
382
317
  for k, v in obj.items():
383
318
  path = current_path + [k]
384
- paramInfoId, is_dict = create_json_code_info(filename, k, v, output)
319
+ paramInfoId, is_dict = create_json_code_info(k, v, output)
385
320
  metadataToId[createMetadataJsonString(filename, path)] = paramInfoId
386
321
  children_keys.append(paramInfoId)
387
322
  if is_dict:
@@ -399,14 +334,13 @@ def process_json_object_helper(output, obj, filename, current_path, metadataToId
399
334
  return parent_id
400
335
 
401
336
 
402
- def create_json_code_info(filename, key, value, output):
337
+ def create_json_code_info(key, value, output):
403
338
  paramInfoId = create_new_id()
404
339
  # Create code info entry
405
340
  output["codeInfo"][paramInfoId] = with_code_info_defaults(
406
341
  id=paramInfoId,
407
342
  name=key,
408
343
  editable=True,
409
- jsonSource=filename,
410
344
  )
411
345
  output["codeInfoColChildren"][paramInfoId] = []
412
346
 
@@ -77,9 +77,9 @@ class MetaSettingsFile:
77
77
  return settings_slice_to_path
78
78
 
79
79
  def find_path_for_settings_slice(self, p, slice):
80
- for sectionId, section in p["sections"].items():
81
- if section["jsonSourceKeys"] == [slice]:
82
- variant = get_selected_section_variant(p, sectionId)
80
+ for sectionId in p["sections"].keys():
81
+ variant = get_selected_section_variant(p, sectionId)
82
+ if variant["jsonSourceKeys"] == [slice]:
83
83
  return variant["name"]
84
84
  return None
85
85
 
@@ -54,17 +54,16 @@ class GlobalParamSweepSectionToYamlRequest(BaseModel):
54
54
 
55
55
  class LoadSectionJSONSourceRequest(BaseModel):
56
56
  project: dict
57
- sectionIdToJSONSource: Dict[str, str]
57
+ variantIdsToLoad: List[str]
58
58
 
59
59
 
60
60
  class SaveSectionJSONSourceRequest(BaseModel):
61
61
  project: dict
62
- sectionId: str
63
- forking_from: str
62
+ variantId: str
64
63
 
65
64
 
66
65
  class NewJSONVersionNameRequest(BaseModel):
67
- filenameGlob: str
66
+ filename: str
68
67
 
69
68
 
70
69
  class CreateFileRequest(BaseModel):
@@ -134,21 +133,18 @@ def route_global_param_sweep_section_to_yaml(x: GlobalParamSweepSectionToYamlReq
134
133
  @router.post(C.ROUTE_LOAD_SECTION_JSON_SOURCE)
135
134
  def route_load_section_json_source(x: LoadSectionJSONSourceRequest):
136
135
  p = x.project
137
- for k, v in x.sectionIdToJSONSource.items():
138
- p["sections"][k]["jsonSource"] = v
139
136
  load_json_sources_into_data_structures(
140
- p["sections"],
141
137
  p["codeInfo"],
142
138
  p["codeInfoCols"],
143
139
  p["sectionVariants"],
144
- section_ids=list(x.sectionIdToJSONSource.keys()),
140
+ variant_ids=x.variantIdsToLoad,
145
141
  )
146
142
  return {"project": p}
147
143
 
148
144
 
149
145
  @router.post(C.ROUTE_NEW_JSON_VERSION_NAME)
150
146
  def route_new_json_version_name(x: NewJSONVersionNameRequest):
151
- new_filename = generate_new_filename(x.filenameGlob)
147
+ new_filename = generate_new_filename(x.filename)
152
148
  Path(new_filename).parent.mkdir(parents=True, exist_ok=True)
153
149
  Path(new_filename).touch()
154
150
  return new_filename
@@ -162,7 +158,7 @@ def route_create_file(x: CreateFileRequest):
162
158
 
163
159
  @router.post(C.ROUTE_SAVE_SECTION_JSON_SOURCE)
164
160
  def route_save_section_json_source(x: SaveSectionJSONSourceRequest):
165
- save_json_source_data(x.project, [x.sectionId], x.forking_from)
161
+ save_json_source_data(x.project, [x.variantId])
166
162
 
167
163
 
168
164
  @router.post(C.ROUTE_GET_JSON_SOURCE_PATH_TO_BE_DELETED)
@@ -21,7 +21,6 @@
21
21
  "paramSweepSectionId": null,
22
22
  "nonPresetUITypeIds": [],
23
23
  "codeLanguage": "python",
24
- "configLanguage": "python",
25
24
  "runInMemory": false,
26
25
  "isFrozen": false,
27
26
  "isHorizontalOrientation": false,
@@ -54,11 +53,8 @@
54
53
  "isReadOnlyTerminal": false,
55
54
  "renderMarkdown": false,
56
55
  "positionAndSizeLocked": false,
57
- "jsonSource": "",
58
- "jsonSourceKeys": [],
59
56
  "selectedVariantIds": {},
60
57
  "paramFilter": "",
61
- "jsonSourceMissing": false,
62
58
  "isInOtherProjectConfigs": false,
63
59
  "aspectRatio": false,
64
60
  "aspectRatioExtraHeight": 0,
@@ -80,7 +76,11 @@
80
76
  "templateVars": [],
81
77
  "isFrozen": false,
82
78
  "sweep": [],
83
- "runGroup": {}
79
+ "runGroup": {},
80
+ "configLanguage": "python",
81
+ "isJsonSource": false,
82
+ "jsonSourceKeys": [],
83
+ "jsonSourceMissing": false
84
84
  },
85
85
  "codeInfo": {
86
86
  "id": null,
@@ -94,8 +94,7 @@
94
94
  "isFrozen": false,
95
95
  "isSelected": false,
96
96
  "evRefs": [],
97
- "ignoreTypeErrors": false,
98
- "jsonSource": null
97
+ "ignoreTypeErrors": false
99
98
  },
100
99
  "codeInfoCol": {
101
100
  "children": { "null": [] }