setta 0.0.14.dev8__py3-none-any.whl → 0.0.15__py3-none-any.whl

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/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.14.dev8"
1
+ __version__ = "0.0.15"
@@ -232,11 +232,11 @@ def get_exporter_fn(config, section_id):
232
232
  return export_param_sweep_section
233
233
  elif stype == C.GLOBAL_PARAM_SWEEP:
234
234
  return export_global_param_sweep_section
235
- elif stype == C.DRAW:
236
- return export_canvas_rendered_value
237
- elif stype == C.IMAGE:
238
- return export_image_section
235
+ # elif stype == C.DRAW:
236
+ # return export_canvas_rendered_value
237
+ # elif stype == C.IMAGE:
238
+ # return export_image_section
239
239
  elif stype == C.SOCIAL:
240
240
  return export_social_section
241
- elif stype == C.CHART:
242
- return export_canvas_rendered_value
241
+ # elif stype == C.CHART:
242
+ # return export_canvas_rendered_value
@@ -68,9 +68,20 @@ async def route_update_interactive_code(
68
68
 
69
69
  async def process_returned_content_from_multiple_tasks(tasks, to_run):
70
70
  all_content = await asyncio.gather(*to_run)
71
- content = [item for sublist in all_content for item in sublist]
71
+ content = []
72
+ exception_occurred = False
73
+ for sublist in all_content:
74
+ for item in sublist:
75
+ if isinstance(item, Exception):
76
+ exception_occurred = True
77
+ else:
78
+ content.append(item)
72
79
  inMemorySubprocessInfo = tasks.getInMemorySubprocessInfo()
73
- return {"inMemorySubprocessInfo": inMemorySubprocessInfo, "content": content}
80
+ return {
81
+ "inMemorySubprocessInfo": inMemorySubprocessInfo,
82
+ "content": content,
83
+ "exceptionOccurred": exception_occurred,
84
+ }
74
85
 
75
86
 
76
87
  async def update_interactive_code(p, tasks, lsp_writers, idx):
@@ -139,6 +150,11 @@ async def update_interactive_code(p, tasks, lsp_writers, idx):
139
150
  return initialContent
140
151
 
141
152
 
153
+ @router.post(C.ROUTE_KILL_IN_MEMORY_SUBPROCESSES)
154
+ async def route_kill_in_memory_subprocesses(tasks=Depends(get_tasks)):
155
+ tasks.kill_in_memory_subprocesses()
156
+
157
+
142
158
  @router.post(C.ROUTE_FORMAT_CODE)
143
159
  async def route_format_code(x: FormatCodeRequest):
144
160
  p = x.project
@@ -17,7 +17,7 @@
17
17
  "copyShortcut": "Mod + C",
18
18
  "pasteShortcut": "Mod + V",
19
19
  "pasteAsRefShortcut": "Mod + Shift + V",
20
- "sortingShortcut": "Shift",
20
+ "sortingShortcut": "Mod + Alt",
21
21
  "movingFreeShortcut": "Alt",
22
22
  "showTooltipShortcut": "Q",
23
23
  "tooltipToPlaintextShortcut": "Q + S",
@@ -71,6 +71,7 @@
71
71
  "ROUTE_COPY_SECTIONS": "/copySections",
72
72
  "ROUTE_UPDATE_INTERACTIVE_CODE": "/updateInteractiveCode",
73
73
  "ROUTE_SEND_PROJECT_TO_INTERACTIVE_CODE": "/sendProjectTointeractiveCode",
74
+ "ROUTE_KILL_IN_MEMORY_SUBPROCESSES": "/killInMemorySubprocesses",
74
75
  "ROUTE_FORMAT_CODE": "/formatCode",
75
76
  "ROUTE_SEND_ARTIFACT": "/sendArtfiact",
76
77
  "ROUTE_LOAD_ARTIFACTS": "/loadArtifacts",