setta 0.0.9.dev0__tar.gz → 0.0.9.dev2__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.
- {setta-0.0.9.dev0/backend/setta.egg-info → setta-0.0.9.dev2}/PKG-INFO +1 -1
- setta-0.0.9.dev2/backend/setta/__init__.py +1 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/python/generate_code.py +2 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/codeInfo/copy.py +1 -4
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/projects/saveAs.py +0 -3
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/projects/utils.py +2 -2
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/sectionVariants/copy.py +12 -3
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/sections/copy.py +4 -1
- setta-0.0.9.dev2/backend/setta/database/db/sections/jsonSource.py +186 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/sections/load.py +130 -73
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/settings_file.py +1 -1
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/specific_file_watcher.py +33 -4
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/projects.py +1 -1
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/sections.py +15 -5
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/constants/constants.json +1 -1
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/constants/defaultValues.json +3 -2
- setta-0.0.9.dev2/backend/setta/static/constants/settingsProject.json +447 -0
- setta-0.0.9.dev0/backend/setta/static/frontend/assets/index-0134e43f.js → setta-0.0.9.dev2/backend/setta/static/frontend/assets/index-bd04bc58.js +155 -155
- setta-0.0.9.dev0/backend/setta/static/frontend/assets/index-c59176d8.css → setta-0.0.9.dev2/backend/setta/static/frontend/assets/index-cf887608.css +1 -1
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/index.html +2 -2
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/utils/constants.py +1 -4
- {setta-0.0.9.dev0 → setta-0.0.9.dev2/backend/setta.egg-info}/PKG-INFO +1 -1
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta.egg-info/SOURCES.txt +2 -2
- setta-0.0.9.dev0/backend/setta/__init__.py +0 -1
- setta-0.0.9.dev0/backend/setta/database/db/sections/jsonSource.py +0 -119
- setta-0.0.9.dev0/backend/setta/static/constants/settingsProject.json +0 -276
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/LICENSE +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/MANIFEST.in +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/README.md +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/cli/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/cli/connect.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/cli/logger.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/create_runnable_scripts.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/export_selected.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/find_placeholders.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/python/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/python/ast_utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/python/check_scope.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/python/make_parseable.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/python/position_line_col.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/python/validate_imports.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/yaml/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/yaml/generate_yaml.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/code_gen/yaml/section_dict.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/backup.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/artifacts/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/artifacts/load.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/artifacts/save.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/artifacts/save_or_create.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/artifacts/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/codeInfo/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/codeInfo/load.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/codeInfo/save.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/codeInfo/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/evRefs/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/evRefs/load.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/evRefs/save.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/projects/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/projects/copy.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/projects/delete.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/projects/load.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/projects/save.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/sectionVariants/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/sectionVariants/load.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/sectionVariants/save.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/sectionVariants/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/sections/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/sections/save.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/sections/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/uiTypes/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/uiTypes/copy.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/uiTypes/load.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/uiTypes/save.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db/uiTypes/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db_init.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/db_objs.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/export_db/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/export_db/export_db.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/export_db/export_raw.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/export_db/export_readable.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/export_db/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/import_db.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/seed.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/database/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/file_watcher.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/reader.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/reader_fns/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/reader_fns/completion.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/reader_fns/definition.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/reader_fns/diagnostics.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/reader_fns/documentHighlight.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/reader_fns/references.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/reader_fns/signatureHelp.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/server.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/lsp/writer.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/artifact.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/code_info.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/dependencies.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/in_memory_fn_stdout_websocket.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/interactive.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/lsp.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/reference_renaming.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/settings.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/terminals.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/routers/websocket.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/server.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/start.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/constants/BaseUITypes.json +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/constants/Settings.json +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/constants/db_init.sql +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/android-chrome-192x192.png +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/android-chrome-512x512.png +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/apple-touch-icon.png +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_AMS-Regular-0cdd387c.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_AMS-Regular-30da91e8.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_AMS-Regular-68534840.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Bold-07d8e303.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Bold-1ae6bd74.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Bold-de7701e4.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Regular-3398dd02.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Regular-5d53e70a.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Caligraphic-Regular-ed0b7437.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Bold-74444efd.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Bold-9163df9c.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Bold-9be7ceb8.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Regular-1e6f9579.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Regular-51814d27.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Fraktur-Regular-5e28753b.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-Bold-0f60d1b8.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-Bold-138ac28d.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-Bold-c76c5d69.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-BoldItalic-70ee1f64.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-BoldItalic-99cd42a3.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-BoldItalic-a6f7ec0d.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-Italic-0d85ae7c.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-Italic-97479ca6.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-Italic-f1d6ef86.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-Regular-c2342cd8.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-Regular-c6368d87.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Main-Regular-d0332f52.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Math-BoldItalic-850c0af5.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Math-BoldItalic-dc47344d.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Math-BoldItalic-f9377ab0.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Math-Italic-08ce98e5.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Math-Italic-7af58c5e.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Math-Italic-8a8d2445.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Bold-1ece03f7.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Bold-e99ae511.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Bold-ece03cfd.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Italic-00b26ac8.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Italic-3931dd81.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Italic-91ee6750.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Regular-11e4dc8a.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Regular-68e8c73e.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_SansSerif-Regular-f36ea897.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Script-Regular-036d4e95.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Script-Regular-1c67f068.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Script-Regular-d96cdf2b.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size1-Regular-6b47c401.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size1-Regular-95b6d2f1.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size1-Regular-c943cc98.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size2-Regular-2014c523.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size2-Regular-a6b2099f.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size2-Regular-d04c5421.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size3-Regular-500e04d5.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size3-Regular-6ab6b62e.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size4-Regular-99f9c675.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size4-Regular-a4af7d41.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Size4-Regular-c647367d.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Typewriter-Regular-71d517d6.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Typewriter-Regular-e14fed02.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/KaTeX_Typewriter-Regular-f01f3e87.ttf +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/cormorant-garamond-all-700-italic-c9b58582.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/cormorant-garamond-cyrillic-700-italic-9101ad5f.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/cormorant-garamond-cyrillic-ext-700-italic-950de0d6.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/cormorant-garamond-latin-700-italic-0bc53e12.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/cormorant-garamond-latin-ext-700-italic-525738e0.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/cormorant-garamond-vietnamese-700-italic-99563037.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/erase-5e0448ea.svg +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-all-400-normal-054f12d0.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-all-600-normal-c03769e5.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-all-800-normal-15dc6e4b.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-cyrillic-400-normal-a4eee61a.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-cyrillic-600-normal-8b14f703.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-cyrillic-800-normal-e706eaaa.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-cyrillic-ext-400-normal-70047a3b.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-cyrillic-ext-600-normal-d4ab9bc4.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-cyrillic-ext-800-normal-eae7515a.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-greek-400-normal-381ea30d.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-greek-600-normal-601f93a2.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-greek-800-normal-7af4fb64.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-greek-ext-400-normal-27027b17.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-greek-ext-600-normal-f2ddf9de.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-greek-ext-800-normal-4cb6189e.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-latin-400-normal-d56fec21.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-latin-600-normal-ff769fa6.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-latin-800-normal-5eea1309.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-latin-ext-400-normal-bb698d85.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-latin-ext-600-normal-ca4808f9.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/inter-latin-ext-800-normal-ebdacc0f.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/logo/logo.svg +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/pen-455d7d8a.svg +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/source-code-pro-all-500-normal-6bdaa03b.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/source-code-pro-cyrillic-500-normal-288a0d68.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/source-code-pro-cyrillic-ext-500-normal-b110a13b.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/source-code-pro-greek-500-normal-04328acb.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/source-code-pro-latin-500-normal-06edef1e.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/source-code-pro-latin-ext-500-normal-6dc60d5e.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/web-vitals-44a8e082.js +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-all-400-normal-38034a3c.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-all-500-normal-550d64e5.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-all-600-normal-ccf14060.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-all-700-normal-494c2971.woff +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-latin-400-normal-36735bc1.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-latin-500-normal-3790bfda.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-latin-600-normal-5fba494e.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-latin-700-normal-a5033d0a.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-latin-ext-400-normal-c20f571a.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-latin-ext-500-normal-0f5ac96c.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-latin-ext-600-normal-97a237d1.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/assets/work-sans-latin-ext-700-normal-103e112c.woff2 +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/browserconfig.xml +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/favicon-16x16.png +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/favicon-32x32.png +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/favicon.ico +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/manifest.json +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/mstile-144x144.png +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/mstile-150x150.png +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/mstile-310x150.png +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/mstile-310x310.png +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/mstile-70x70.png +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/robots.txt +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/safari-pinned-tab.svg +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/frontend/site.webmanifest +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/seed/.DS_Store +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/static/seed/examples/.DS_Store +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/fns/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/fns/codeAreaAutocomplete.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/fns/codeAreaFindTemplateVars.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/fns/codeAreaInitializeCode.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/fns/findEVRefs.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/fns/parametersRequest.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/fns/textFieldAutocomplete.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/fns/textFieldInitializeCode.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/fns/typeCheck.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/fns/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/task_runner.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/tasks.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/tasks/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/terminals/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/terminals/terminals.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/terminals/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/utils/__init__.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/utils/generate_memorable_string.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/utils/generate_new_filename.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/utils/section_contents.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/utils/utils.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta/utils/websocket_manager.py +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta.egg-info/dependency_links.txt +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta.egg-info/entry_points.txt +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta.egg-info/requires.txt +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/backend/setta.egg-info/top_level.txt +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/pyproject.toml +0 -0
- {setta-0.0.9.dev0 → setta-0.0.9.dev2}/setup.cfg +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.0.9.dev2"
|
@@ -258,6 +258,8 @@ def convert_var_names_to_readable_form(
|
|
258
258
|
# only create nice_var_name if we haven't already created it for this var_name
|
259
259
|
if var_name not in var_name_to_nice_var_name_mapping:
|
260
260
|
nice_name = exporter_obj.output[var_name]["name"]
|
261
|
+
# TODO: do the same thing on the frontend to find naming conflicts
|
262
|
+
nice_name = nice_name.replace(" ", "_")
|
261
263
|
nice_var_name = create_nice_var_name(top_level_symbols, nice_name)
|
262
264
|
top_level_symbols.add(nice_var_name)
|
263
265
|
var_name_to_nice_var_name_mapping[var_name] = nice_var_name
|
@@ -1,11 +1,8 @@
|
|
1
1
|
from setta.database.utils import remap_ids, rename_keys
|
2
|
-
from setta.utils.constants import is_from_json_source
|
3
2
|
|
4
3
|
|
5
4
|
def copy_code_info(code_info):
|
6
|
-
|
7
|
-
new_code_info, code_info_id_map = remap_ids(code_info, ids_to_rename)
|
8
|
-
code_info_id_map.update({k: k for k in code_info.keys() if is_from_json_source(k)})
|
5
|
+
new_code_info, code_info_id_map = remap_ids(code_info)
|
9
6
|
|
10
7
|
for c in new_code_info.values():
|
11
8
|
c["id"] = code_info_id_map[c["id"]]
|
@@ -1,12 +1,10 @@
|
|
1
1
|
import copy
|
2
2
|
|
3
|
-
from ..sections.jsonSource import remove_json_source_data
|
4
3
|
from .copy import copy_project_config, copy_project_details
|
5
4
|
from .save import save_project_details
|
6
5
|
|
7
6
|
|
8
7
|
def save_as_new_project_config(db, project, new_config_name, with_refs):
|
9
|
-
remove_json_source_data(project)
|
10
8
|
if not with_refs:
|
11
9
|
project_to_save = copy_project_details(
|
12
10
|
project, new_config_name, do_create_new_id=True
|
@@ -21,7 +19,6 @@ def save_as_new_project_config(db, project, new_config_name, with_refs):
|
|
21
19
|
|
22
20
|
|
23
21
|
def save_as_existing_project_config(db, project, config_name):
|
24
|
-
remove_json_source_data(project)
|
25
22
|
query = """
|
26
23
|
SELECT *
|
27
24
|
FROM ProjectConfig
|
@@ -43,8 +43,8 @@ def remove_empty(x):
|
|
43
43
|
return {k: v for k, v in x.items() if len(v) > 0}
|
44
44
|
|
45
45
|
|
46
|
-
def filter_data_for_json_export(p
|
47
|
-
remove_json_source_data(p
|
46
|
+
def filter_data_for_json_export(p):
|
47
|
+
remove_json_source_data(p)
|
48
48
|
|
49
49
|
p["projectConfig"] = filter_dict(
|
50
50
|
p["projectConfig"],
|
@@ -2,11 +2,20 @@ 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(
|
5
|
+
def copy_section_variants(
|
6
|
+
sections, section_variants, code_info_id_map, code_info_col_id_map
|
7
|
+
):
|
6
8
|
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])
|
7
15
|
|
8
|
-
for obj in new_section_variants.
|
9
|
-
|
16
|
+
for id, obj in new_section_variants.items():
|
17
|
+
if id not in keep_old_name:
|
18
|
+
obj["name"] = generate_memorable_string()
|
10
19
|
obj["values"] = rename_keys(obj["values"], code_info_id_map)
|
11
20
|
if obj["codeInfoColId"]:
|
12
21
|
obj["codeInfoColId"] = code_info_col_id_map[obj["codeInfoColId"]]
|
@@ -18,6 +18,9 @@ def copy_sections(
|
|
18
18
|
for section in new_sections.values():
|
19
19
|
section["id"] = section_id_map[section["id"]]
|
20
20
|
section["variantId"] = section_variant_id_map[section["variantId"]]
|
21
|
+
section["defaultVariantId"] = section_variant_id_map[
|
22
|
+
section["defaultVariantId"]
|
23
|
+
]
|
21
24
|
section["uiTypeId"] = ui_type_id_map[section["uiTypeId"]]
|
22
25
|
if section["uiTypeColId"]:
|
23
26
|
section["uiTypeColId"] = ui_type_col_id_map[section["uiTypeColId"]]
|
@@ -41,7 +44,7 @@ def copy_sections_and_other_info(x):
|
|
41
44
|
x["codeInfoCols"], code_info_id_map
|
42
45
|
)
|
43
46
|
new_section_variants, section_variant_id_map = copy_section_variants(
|
44
|
-
x["sectionVariants"], code_info_id_map, code_info_col_id_map
|
47
|
+
x["sections"], x["sectionVariants"], code_info_id_map, code_info_col_id_map
|
45
48
|
)
|
46
49
|
new_ui_types, ui_type_id_map = copy_ui_types(x["uiTypes"])
|
47
50
|
new_ui_type_cols, ui_type_col_id_map = copy_ui_type_cols(
|
@@ -0,0 +1,186 @@
|
|
1
|
+
import json
|
2
|
+
from collections import defaultdict
|
3
|
+
|
4
|
+
from setta.utils.constants import BASE_UI_TYPE_IDS, C
|
5
|
+
from setta.utils.utils import (
|
6
|
+
recursive_dict_merge,
|
7
|
+
replace_null_keys_with_none,
|
8
|
+
save_json_to_file,
|
9
|
+
try_json,
|
10
|
+
)
|
11
|
+
|
12
|
+
|
13
|
+
def save_json_source_data(p, section_ids=None, forking_from=None):
|
14
|
+
sections = {
|
15
|
+
k: v
|
16
|
+
for k, v in p["sections"].items()
|
17
|
+
if v.get("jsonSource", None) and ((not section_ids) or k in section_ids)
|
18
|
+
}
|
19
|
+
|
20
|
+
to_be_saved = defaultdict(dict)
|
21
|
+
|
22
|
+
forking_from_data = {}
|
23
|
+
if forking_from:
|
24
|
+
with open(forking_from, "r") as f:
|
25
|
+
forking_from_data = json.load(f)
|
26
|
+
|
27
|
+
p["codeInfoCols"] = replace_null_keys_with_none(p["codeInfoCols"])
|
28
|
+
|
29
|
+
ancestor_paths = build_ancestor_paths(p["codeInfo"], p["codeInfoCols"])
|
30
|
+
|
31
|
+
for s in sections.values():
|
32
|
+
if not s["jsonSource"] or s["jsonSourceMissing"]:
|
33
|
+
continue
|
34
|
+
|
35
|
+
for variantId in s["variantIds"]:
|
36
|
+
variant = p["sectionVariants"][variantId]
|
37
|
+
codeInfoColId = variant["codeInfoColId"]
|
38
|
+
codeInfoCol = p["codeInfoCols"][codeInfoColId]
|
39
|
+
filename = variant["name"]
|
40
|
+
|
41
|
+
recursively_add_keys(
|
42
|
+
p,
|
43
|
+
variant,
|
44
|
+
codeInfoCol,
|
45
|
+
to_be_saved[filename],
|
46
|
+
None,
|
47
|
+
s["jsonSourceKeys"],
|
48
|
+
ancestor_paths,
|
49
|
+
)
|
50
|
+
|
51
|
+
# Make sure the jsonSourceKeys are present.
|
52
|
+
# (They might not be because they are completely empty)
|
53
|
+
add_key_path_to_dict(to_be_saved[filename], s["jsonSourceKeys"])
|
54
|
+
|
55
|
+
# Save each file
|
56
|
+
for filename, data in to_be_saved.items():
|
57
|
+
data = recursive_dict_merge(forking_from_data, data)
|
58
|
+
save_json_to_file(filename, data)
|
59
|
+
|
60
|
+
return to_be_saved
|
61
|
+
|
62
|
+
|
63
|
+
def build_ancestor_paths(codeInfo, codeInfoCols):
|
64
|
+
parent_map = {}
|
65
|
+
for col in codeInfoCols.values():
|
66
|
+
for parent_id, children in col["children"].items():
|
67
|
+
for child_id in children:
|
68
|
+
parent_map[(codeInfo[child_id]["jsonSource"], child_id)] = parent_id
|
69
|
+
|
70
|
+
ancestor_paths = {}
|
71
|
+
for node_id in codeInfo:
|
72
|
+
if node_id not in ancestor_paths:
|
73
|
+
path = []
|
74
|
+
current_id = node_id
|
75
|
+
|
76
|
+
# Traverse up to build the path
|
77
|
+
while current_id is not None:
|
78
|
+
if current_id in codeInfo: # Skip if not a valid codeInfo node
|
79
|
+
name = codeInfo[current_id]["name"]
|
80
|
+
path.insert(0, name)
|
81
|
+
|
82
|
+
# Get parent using the map
|
83
|
+
parent_id = parent_map.get(
|
84
|
+
(codeInfo[current_id]["jsonSource"], current_id)
|
85
|
+
)
|
86
|
+
current_id = parent_id
|
87
|
+
else:
|
88
|
+
break
|
89
|
+
|
90
|
+
ancestor_paths[node_id] = path
|
91
|
+
|
92
|
+
return ancestor_paths
|
93
|
+
|
94
|
+
|
95
|
+
def recursively_add_keys(
|
96
|
+
p, variant, codeInfoCol, input_dict, codeInfoId, jsonSourceKeys, ancestor_paths
|
97
|
+
):
|
98
|
+
for k in codeInfoCol["children"][codeInfoId]:
|
99
|
+
children = codeInfoCol["children"][k]
|
100
|
+
json_source = p["codeInfo"][k].get("jsonSource")
|
101
|
+
|
102
|
+
if json_source:
|
103
|
+
# Get pre-computed key path
|
104
|
+
key_path = [*jsonSourceKeys, *ancestor_paths[k]]
|
105
|
+
value = try_getting_value(variant, k, children)
|
106
|
+
|
107
|
+
current_dict = add_key_path_to_dict(input_dict, key_path[:-1])
|
108
|
+
|
109
|
+
# Set the value at the final position
|
110
|
+
if key_path: # Only set if we have a path
|
111
|
+
current_dict[key_path[-1]] = value
|
112
|
+
|
113
|
+
# Continue recursion regardless of whether this node has a jsonSource
|
114
|
+
recursively_add_keys(
|
115
|
+
p, variant, codeInfoCol, input_dict, k, jsonSourceKeys, ancestor_paths
|
116
|
+
)
|
117
|
+
|
118
|
+
|
119
|
+
def add_key_path_to_dict(output, key_path):
|
120
|
+
for path_part in key_path:
|
121
|
+
# Create nested dictionaries if they don't exist
|
122
|
+
if path_part not in output:
|
123
|
+
output[path_part] = {}
|
124
|
+
output = output[path_part]
|
125
|
+
return output
|
126
|
+
|
127
|
+
|
128
|
+
def try_getting_value(variant, codeInfoId, codeInfoChildren):
|
129
|
+
if len(codeInfoChildren) == 0:
|
130
|
+
if codeInfoId in variant["values"]:
|
131
|
+
return try_json(variant["values"][codeInfoId]["value"])
|
132
|
+
return ""
|
133
|
+
return {}
|
134
|
+
|
135
|
+
|
136
|
+
def condition_keep_code_info(codeInfo, jsonCodeInfoWithUIType):
|
137
|
+
if not codeInfo:
|
138
|
+
return False
|
139
|
+
return not codeInfo["jsonSource"] or codeInfo["id"] in jsonCodeInfoWithUIType
|
140
|
+
|
141
|
+
|
142
|
+
def remove_json_source_data(p):
|
143
|
+
for variant in p["sectionVariants"].values():
|
144
|
+
variant["values"] = {
|
145
|
+
k: v
|
146
|
+
for k, v in variant["values"].items()
|
147
|
+
if not p["codeInfo"][k]["jsonSource"]
|
148
|
+
}
|
149
|
+
|
150
|
+
jsonCodeInfoWithUIType = set()
|
151
|
+
for uiTypeCol in p["uiTypeCols"].values():
|
152
|
+
for paramInfoId, uiTypeInfo in uiTypeCol.items():
|
153
|
+
# we want to know which json source params have an associated uiTypeId
|
154
|
+
# only if it's not the base TEXT type, since that's the default
|
155
|
+
if (
|
156
|
+
p["codeInfo"][paramInfoId]["jsonSource"]
|
157
|
+
and uiTypeInfo["uiTypeId"] != BASE_UI_TYPE_IDS[C.TEXT]
|
158
|
+
):
|
159
|
+
jsonCodeInfoWithUIType.add(paramInfoId)
|
160
|
+
|
161
|
+
p["codeInfo"] = {
|
162
|
+
k: v
|
163
|
+
for k, v in p["codeInfo"].items()
|
164
|
+
if condition_keep_code_info(v, jsonCodeInfoWithUIType)
|
165
|
+
}
|
166
|
+
|
167
|
+
for codeInfoColId in p["codeInfoCols"].keys():
|
168
|
+
codeInfoCol = p["codeInfoCols"][codeInfoColId]
|
169
|
+
codeInfoCol["children"] = {
|
170
|
+
k: v
|
171
|
+
for k, v in codeInfoCol["children"].items()
|
172
|
+
if k is None
|
173
|
+
or condition_keep_code_info(
|
174
|
+
p["codeInfo"].get(k),
|
175
|
+
jsonCodeInfoWithUIType,
|
176
|
+
)
|
177
|
+
}
|
178
|
+
for id, children in codeInfoCol["children"].items():
|
179
|
+
codeInfoCol["children"][id] = [
|
180
|
+
c
|
181
|
+
for c in children
|
182
|
+
if condition_keep_code_info(
|
183
|
+
p["codeInfo"].get(c),
|
184
|
+
jsonCodeInfoWithUIType,
|
185
|
+
)
|
186
|
+
]
|
@@ -7,10 +7,10 @@ from collections import defaultdict
|
|
7
7
|
|
8
8
|
from setta.database.db.artifacts.load import load_artifact_groups
|
9
9
|
from setta.database.db.codeInfo.utils import new_code_info_col, with_code_info_defaults
|
10
|
+
from setta.database.db.sections.jsonSource import build_ancestor_paths
|
10
11
|
from setta.database.db.sections.utils import with_section_defaults
|
11
12
|
from setta.database.db.sectionVariants.utils import new_ev_entry, new_section_variant
|
12
13
|
from setta.database.utils import create_new_id
|
13
|
-
from setta.utils.constants import C
|
14
14
|
|
15
15
|
from ..sectionVariants.load import load_section_variants
|
16
16
|
from ..uiTypes.load import load_uitypecols, load_uitypes
|
@@ -214,34 +214,9 @@ def load_json_sources_into_data_structures(
|
|
214
214
|
f'Attempting to read {s["jsonSource"]} with keys {s["jsonSourceKeys"]}'
|
215
215
|
)
|
216
216
|
new_data = load_json_source(s["jsonSource"], s["jsonSourceKeys"])
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
variantId = None
|
221
|
-
for vid in s["variantIds"]:
|
222
|
-
if sectionVariants[vid]["name"] == filename:
|
223
|
-
variantId = vid
|
224
|
-
break
|
225
|
-
if not variantId:
|
226
|
-
variantId, section_variant = new_section_variant(
|
227
|
-
name=filename,
|
228
|
-
)
|
229
|
-
s["variantIds"].append(variantId)
|
230
|
-
sectionVariants[variantId] = section_variant
|
231
|
-
|
232
|
-
curr_section_variant = sectionVariants[variantId]
|
233
|
-
curr_section_variant["values"] = data["sectionVariantValues"]
|
234
|
-
codeInfoColId = curr_section_variant["codeInfoColId"]
|
235
|
-
|
236
|
-
if not codeInfoColId:
|
237
|
-
codeInfoColId = create_new_id()
|
238
|
-
curr_section_variant["codeInfoColId"] = codeInfoColId
|
239
|
-
codeInfoCols[codeInfoColId] = new_code_info_col()
|
240
|
-
|
241
|
-
codeInfoCols[codeInfoColId]["children"] = data["codeInfoColChildren"]
|
242
|
-
|
243
|
-
s["configLanguage"] = "json"
|
244
|
-
filenames_loaded.add(filename)
|
217
|
+
filenames_loaded.update(
|
218
|
+
merge_into_existing(new_data, s, sectionVariants, codeInfo, codeInfoCols)
|
219
|
+
)
|
245
220
|
|
246
221
|
# delete variants that aren't associated with a loaded file
|
247
222
|
to_delete = []
|
@@ -281,6 +256,74 @@ def load_json_sources_into_data_structures(
|
|
281
256
|
s["defaultVariantId"] = s["variantId"]
|
282
257
|
|
283
258
|
|
259
|
+
def merge_into_existing(new_data, section, sectionVariants, codeInfo, codeInfoCols):
|
260
|
+
filenames_loaded = set()
|
261
|
+
jsonSourceMetadata_to_id = {}
|
262
|
+
ancestor_paths = build_ancestor_paths(codeInfo, codeInfoCols)
|
263
|
+
for id, info in codeInfo.items():
|
264
|
+
jsonSourceMetadata_to_id[
|
265
|
+
createMetadataJsonString(info["jsonSource"], ancestor_paths[id])
|
266
|
+
] = id
|
267
|
+
|
268
|
+
for filename, data in new_data.items():
|
269
|
+
replacements = {}
|
270
|
+
new_ancestor_paths = build_ancestor_paths(
|
271
|
+
data["codeInfo"], {None: {"children": data["codeInfoColChildren"]}}
|
272
|
+
)
|
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
|
+
|
284
327
|
def load_json_source(filename_glob, jsonSourceKeys):
|
285
328
|
new_data = {}
|
286
329
|
|
@@ -289,83 +332,97 @@ def load_json_source(filename_glob, jsonSourceKeys):
|
|
289
332
|
try:
|
290
333
|
with open(filename, "r") as f:
|
291
334
|
jsonSourceData = json.load(f)
|
292
|
-
except:
|
335
|
+
except json.JSONDecodeError:
|
336
|
+
jsonSourceData = {}
|
337
|
+
except FileNotFoundError:
|
293
338
|
logger.debug(f"couldn't find: {filename}")
|
294
339
|
continue
|
295
340
|
|
296
|
-
new_data[filename] =
|
297
|
-
|
298
|
-
"codeInfoColChildren": {},
|
299
|
-
"sectionVariantValues": {},
|
300
|
-
}
|
301
|
-
|
302
|
-
try:
|
303
|
-
for k in jsonSourceKeys:
|
304
|
-
jsonSourceData = jsonSourceData[k]
|
305
|
-
except:
|
306
|
-
# TODO print warning or something
|
307
|
-
pass
|
308
|
-
|
309
|
-
process_json_object(
|
310
|
-
new_data, jsonSourceData, filename, filename_glob, jsonSourceKeys
|
341
|
+
new_data[filename] = process_json_object(
|
342
|
+
jsonSourceData, filename, jsonSourceKeys
|
311
343
|
)
|
312
344
|
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
345
|
+
return new_data
|
346
|
+
|
347
|
+
|
348
|
+
def process_json_object(jsonSourceData, filename, jsonSourceKeys):
|
349
|
+
new_data = {
|
350
|
+
"codeInfo": {},
|
351
|
+
"codeInfoColChildren": {},
|
352
|
+
"sectionVariantValues": {},
|
353
|
+
}
|
354
|
+
|
355
|
+
try:
|
356
|
+
for k in jsonSourceKeys:
|
357
|
+
jsonSourceData = jsonSourceData[k]
|
358
|
+
except:
|
359
|
+
# TODO print warning or something
|
360
|
+
pass
|
361
|
+
|
362
|
+
metadataToId = {}
|
363
|
+
|
364
|
+
highest_key = process_json_object_helper(
|
365
|
+
new_data, jsonSourceData, filename, jsonSourceKeys, metadataToId
|
366
|
+
)
|
367
|
+
|
368
|
+
if len(jsonSourceKeys) > 0:
|
369
|
+
# point directly from None (the root) to the children
|
370
|
+
codeInfoChildren = new_data["codeInfoColChildren"]
|
371
|
+
codeInfoChildren[None] = codeInfoChildren[highest_key]
|
372
|
+
del codeInfoChildren[highest_key]
|
319
373
|
|
320
374
|
return new_data
|
321
375
|
|
322
376
|
|
323
|
-
def
|
377
|
+
def process_json_object_helper(output, obj, filename, current_path, metadataToId):
|
324
378
|
if not isinstance(obj, dict):
|
325
379
|
return
|
326
380
|
|
327
381
|
children_keys = []
|
328
382
|
for k, v in obj.items():
|
329
383
|
path = current_path + [k]
|
330
|
-
|
331
|
-
|
332
|
-
)
|
333
|
-
children_keys.append(full_key)
|
384
|
+
paramInfoId, is_dict = create_json_code_info(filename, k, v, output)
|
385
|
+
metadataToId[createMetadataJsonString(filename, path)] = paramInfoId
|
386
|
+
children_keys.append(paramInfoId)
|
334
387
|
if is_dict:
|
335
|
-
|
388
|
+
process_json_object_helper(output, v, filename, path, metadataToId)
|
336
389
|
|
337
390
|
parent_id = None
|
338
391
|
if len(current_path) > 0:
|
339
|
-
|
392
|
+
metadata = createMetadataJsonString(filename, current_path)
|
393
|
+
parent_id = metadataToId.get(metadata)
|
394
|
+
if not parent_id:
|
395
|
+
parent_id = create_new_id()
|
396
|
+
metadataToId[metadata] = parent_id
|
340
397
|
|
341
|
-
output[
|
398
|
+
output["codeInfoColChildren"][parent_id] = children_keys
|
399
|
+
return parent_id
|
342
400
|
|
343
401
|
|
344
|
-
def create_json_code_info(filename,
|
345
|
-
|
402
|
+
def create_json_code_info(filename, key, value, output):
|
403
|
+
paramInfoId = create_new_id()
|
346
404
|
# Create code info entry
|
347
|
-
output[
|
348
|
-
id=
|
405
|
+
output["codeInfo"][paramInfoId] = with_code_info_defaults(
|
406
|
+
id=paramInfoId,
|
407
|
+
name=key,
|
408
|
+
editable=True,
|
409
|
+
jsonSource=filename,
|
349
410
|
)
|
350
|
-
output[
|
411
|
+
output["codeInfoColChildren"][paramInfoId] = []
|
351
412
|
|
352
413
|
is_dict = isinstance(value, dict)
|
353
414
|
# Create variant value entry
|
354
415
|
if is_dict:
|
355
416
|
# For objects, store empty value and process children
|
356
|
-
output[
|
417
|
+
output["sectionVariantValues"][paramInfoId] = new_ev_entry()
|
357
418
|
else:
|
358
419
|
# For non-objects, store the value directly
|
359
|
-
output[
|
420
|
+
output["sectionVariantValues"][paramInfoId] = new_ev_entry(
|
360
421
|
value=json.dumps(value)
|
361
422
|
)
|
362
423
|
|
363
|
-
return
|
424
|
+
return paramInfoId, is_dict
|
364
425
|
|
365
426
|
|
366
|
-
def
|
367
|
-
|
368
|
-
key = json.dumps(
|
369
|
-
{"filenameGlob": filename_glob, "key": path}, separators=(",", ":")
|
370
|
-
)
|
371
|
-
return f"{C.JSON_SOURCE_PREFIX}{key}"
|
427
|
+
def createMetadataJsonString(filename, path):
|
428
|
+
return json.dumps({"filename": filename, "key": path})
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import asyncio
|
2
|
+
import glob
|
2
3
|
import logging
|
3
4
|
import os
|
4
5
|
from typing import Dict, List, Set
|
@@ -23,8 +24,12 @@ class SpecificFileWatcher:
|
|
23
24
|
"""
|
24
25
|
self.observer = Observer()
|
25
26
|
self.watched_files: Set[str] = set()
|
27
|
+
self.file_to_patterns = {}
|
26
28
|
self.handler = SpecificFileEventHandler(
|
27
|
-
callback,
|
29
|
+
callback,
|
30
|
+
asyncio.get_event_loop(),
|
31
|
+
self.watched_files,
|
32
|
+
self.file_to_patterns,
|
28
33
|
)
|
29
34
|
|
30
35
|
def add_file(self, file_path: str) -> bool:
|
@@ -79,17 +84,21 @@ class SpecificFileWatcher:
|
|
79
84
|
if absolute_path in self.watched_files:
|
80
85
|
self.watched_files.remove(absolute_path)
|
81
86
|
|
82
|
-
def update_watch_list(
|
87
|
+
def update_watch_list(
|
88
|
+
self, filepaths_and_glob_patterns: List[str]
|
89
|
+
) -> Dict[str, List[str]]:
|
83
90
|
"""
|
84
91
|
Update the entire list of files being watched with a single function call.
|
85
92
|
This efficiently handles adding new files and removing files that are no longer needed.
|
86
93
|
|
87
94
|
Args:
|
88
|
-
|
95
|
+
filepaths_and_glob_patterns: List of file paths that should be watched
|
89
96
|
|
90
97
|
Returns:
|
91
98
|
Dict containing 'added' and 'removed' lists of file paths
|
92
99
|
"""
|
100
|
+
file_paths = self.get_actual_file_paths_to_watch(filepaths_and_glob_patterns)
|
101
|
+
|
93
102
|
# Convert all input paths to absolute paths (only if they exist)
|
94
103
|
absolute_paths = [
|
95
104
|
os.path.abspath(path) for path in file_paths if os.path.exists(path)
|
@@ -116,6 +125,24 @@ class SpecificFileWatcher:
|
|
116
125
|
# Return information about what changed
|
117
126
|
return {"added": added_files, "removed": list(files_to_remove)}
|
118
127
|
|
128
|
+
def get_actual_file_paths_to_watch(self, filepaths_and_glob_patterns):
|
129
|
+
actual_filepaths = set()
|
130
|
+
# Expand glob patterns and build the mapping
|
131
|
+
for pattern in filepaths_and_glob_patterns:
|
132
|
+
matching_files = glob.glob(pattern)
|
133
|
+
for file_path in matching_files:
|
134
|
+
# Only add actual files, not directories
|
135
|
+
if os.path.isfile(file_path):
|
136
|
+
abs_path = os.path.abspath(file_path)
|
137
|
+
actual_filepaths.add(abs_path)
|
138
|
+
|
139
|
+
# Add to the mapping
|
140
|
+
if abs_path not in self.file_to_patterns:
|
141
|
+
self.file_to_patterns[abs_path] = set()
|
142
|
+
self.file_to_patterns[abs_path].add(pattern)
|
143
|
+
|
144
|
+
return actual_filepaths
|
145
|
+
|
119
146
|
def start(self) -> None:
|
120
147
|
"""Start the file watcher."""
|
121
148
|
self.observer.start()
|
@@ -131,7 +158,7 @@ class SpecificFileWatcher:
|
|
131
158
|
class SpecificFileEventHandler(FileSystemEventHandler):
|
132
159
|
"""Event handler for specific file events."""
|
133
160
|
|
134
|
-
def __init__(self, callback, loop, watched_files_ref):
|
161
|
+
def __init__(self, callback, loop, watched_files_ref, file_to_patterns):
|
135
162
|
"""
|
136
163
|
Initialize the event handler.
|
137
164
|
|
@@ -143,6 +170,7 @@ class SpecificFileEventHandler(FileSystemEventHandler):
|
|
143
170
|
self.callback = callback
|
144
171
|
self.loop = loop
|
145
172
|
self.watched_files_ref = watched_files_ref
|
173
|
+
self.file_to_patterns = file_to_patterns
|
146
174
|
|
147
175
|
def on_created(self, event: FileSystemEvent):
|
148
176
|
"""Handle file creation event."""
|
@@ -233,6 +261,7 @@ class SpecificFileEventHandler(FileSystemEventHandler):
|
|
233
261
|
"relPath": rel_path,
|
234
262
|
"eventType": event_type,
|
235
263
|
"fileContent": file_content,
|
264
|
+
"matchingGlobPatterns": list(self.file_to_patterns[abs_path]),
|
236
265
|
}
|
237
266
|
|
238
267
|
# Add destination paths for moved events
|
@@ -178,7 +178,7 @@ def router_set_as_default_project(x: SetAsDefaultProjectRequest, dbq=Depends(get
|
|
178
178
|
|
179
179
|
@router.post(C.ROUTE_FILTER_DATA_FOR_JSON_EXPORT)
|
180
180
|
def router_filter_data_for_json_export(x: FilterDataForJSONExportRequest):
|
181
|
-
filter_data_for_json_export(x.project
|
181
|
+
filter_data_for_json_export(x.project)
|
182
182
|
return x.project
|
183
183
|
|
184
184
|
|