scitex 2.10.3__py3-none-any.whl → 2.11.0__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.
Files changed (363) hide show
  1. scitex/__init__.py +1 -4
  2. scitex/__version__.py +1 -1
  3. scitex/_install_guide.py +14 -2
  4. scitex/bridge/_figrecipe.py +1 -1
  5. scitex/bridge/_helpers.py +1 -1
  6. scitex/bridge/_plt_vis.py +1 -1
  7. scitex/bridge/_stats_plt.py +1 -1
  8. scitex/bridge/_stats_vis.py +2 -2
  9. scitex/{fig → canvas}/__init__.py +84 -96
  10. scitex/{fig → canvas}/backend/_parser.py +1 -1
  11. scitex/{fig → canvas}/canvas.py +13 -14
  12. scitex/{fts/_fig/_editor → canvas/editor}/_defaults.py +2 -2
  13. scitex/{fig → canvas}/editor/edit/__init__.py +11 -14
  14. scitex/{fig → canvas}/editor/edit/bundle_resolver.py +56 -48
  15. scitex/{fig → canvas}/editor/edit/editor_launcher.py +79 -26
  16. scitex/{fts/_fig/_editor/_cui/_panel_loader.py → canvas/editor/edit/panel_loader.py} +8 -8
  17. scitex/{fts/_fig/_editor/_gui/_flask_editor → canvas/editor/flask_editor}/_bbox.py +2 -1
  18. scitex/{fts/_fig/_editor/_gui/_flask_editor → canvas/editor/flask_editor}/_core.py +84 -84
  19. scitex/{fts/_fig/_editor/_gui/_flask_editor → canvas/editor/flask_editor}/_renderer.py +7 -6
  20. scitex/{fts/_fig/_editor/_gui/_flask_editor → canvas/editor/flask_editor}/static/css/features/canvas.css +2 -2
  21. scitex/{fig → canvas}/editor/flask_editor/static/css/features/panel-grid.css +1 -1
  22. scitex/{fig → canvas}/editor/flask_editor/static/js/core/api.js +3 -4
  23. scitex/{fig → canvas}/editor/flask_editor/static/js/editor/preview.js +5 -5
  24. scitex/{fig → canvas}/editor/flask_editor/templates/_html.py +3 -3
  25. scitex/{fig → canvas}/editor/flask_editor/templates/_scripts.py +10 -10
  26. scitex/{fig → canvas}/editor/flask_editor/templates/_styles.py +3 -3
  27. scitex/{fig → canvas}/io/__init__.py +32 -38
  28. scitex/{fig → canvas}/io/_bundle.py +217 -154
  29. scitex/{fig → canvas}/io/_canvas.py +1 -1
  30. scitex/{fig → canvas}/io/_data.py +1 -1
  31. scitex/{fig → canvas}/io/_export.py +1 -1
  32. scitex/{fig → canvas}/io/_load.py +1 -1
  33. scitex/{fig → canvas}/io/_panel.py +1 -1
  34. scitex/{fig → canvas}/io/_save.py +1 -1
  35. scitex/{fig → canvas}/model/__init__.py +1 -1
  36. scitex/{fig → canvas}/model/_annotations.py +1 -1
  37. scitex/{fig → canvas}/model/_axes.py +1 -1
  38. scitex/{fig → canvas}/model/_figure.py +1 -1
  39. scitex/{fig → canvas}/model/_guides.py +1 -1
  40. scitex/{fig → canvas}/model/_plot.py +1 -1
  41. scitex/{fig → canvas}/model/_styles.py +1 -1
  42. scitex/{fig → canvas}/utils/__init__.py +1 -1
  43. scitex/cli/convert.py +10 -6
  44. scitex/diagram/README.md +7 -7
  45. scitex/io/__init__.py +7 -19
  46. scitex/io/_load.py +15 -19
  47. scitex/io/_load_modules/_canvas.py +2 -2
  48. scitex/io/_load_modules/_con.py +5 -5
  49. scitex/io/_load_modules/_eeg.py +16 -12
  50. scitex/io/_save.py +11 -16
  51. scitex/io/_save_modules/__init__.py +6 -10
  52. scitex/io/_save_modules/_canvas.py +3 -3
  53. scitex/io/_save_modules/_plot_bundle.py +112 -0
  54. scitex/io/_save_modules/{_pltz_stx.py → _plot_scitex.py} +7 -7
  55. scitex/io/_save_modules/_stx_bundle.py +16 -16
  56. scitex/io/bundle/README.md +89 -80
  57. scitex/{fts/_bundle/_FTS.py → io/bundle/_Bundle.py} +197 -95
  58. scitex/io/bundle/__init__.py +67 -35
  59. scitex/{fts/_bundle → io/bundle}/_children.py +32 -40
  60. scitex/io/bundle/_core.py +184 -97
  61. scitex/{fts/_bundle/_dataclasses/_Node.py → io/bundle/_dataclasses/_Spec.py} +29 -23
  62. scitex/{fts/_bundle/_dataclasses/_NodeRefs.py → io/bundle/_dataclasses/_SpecRefs.py} +6 -6
  63. scitex/{fts/_bundle → io/bundle}/_dataclasses/__init__.py +4 -4
  64. scitex/{fts/_bundle → io/bundle}/_loader.py +19 -19
  65. scitex/io/bundle/_manifest.py +99 -0
  66. scitex/{fts/_bundle → io/bundle}/_mpl_helpers.py +119 -28
  67. scitex/io/bundle/_nested.py +113 -100
  68. scitex/{fts/_bundle → io/bundle}/_saver.py +13 -14
  69. scitex/{fts/_bundle → io/bundle}/_storage.py +3 -3
  70. scitex/io/bundle/_types.py +41 -16
  71. scitex/{fts/_bundle → io/bundle}/_validation.py +20 -18
  72. scitex/io/bundle/_zip.py +21 -31
  73. scitex/{fts/_kinds → io/bundle/kinds}/_plot/_backend/_parser.py +1 -1
  74. scitex/{fts/_kinds → io/bundle/kinds}/_plot/_models/_Annotations.py +1 -1
  75. scitex/{fts/_kinds → io/bundle/kinds}/_plot/_models/_Axes.py +1 -1
  76. scitex/{fts/_kinds → io/bundle/kinds}/_plot/_models/_Figure.py +1 -1
  77. scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_Guides.py +1 -1
  78. scitex/{fts/_kinds → io/bundle/kinds}/_plot/_models/_Plot.py +1 -1
  79. scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_Styles.py +1 -1
  80. scitex/{fts/_kinds → io/bundle/kinds}/_plot/_utils/_plot_layout.py +1 -1
  81. scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/__init__.py +1 -1
  82. scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_editor/_app.py +1 -1
  83. scitex/{fts/_tables → io/bundle/kinds/_table}/_latex/_export.py +1 -1
  84. scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_figure_exporter.py +1 -1
  85. scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_table_exporter.py +1 -1
  86. scitex/io/bundle/schemas/__init__.py +30 -0
  87. scitex/parallel/_run.py +5 -4
  88. scitex/path/_find.py +60 -83
  89. scitex/path/_get_module_path.py +23 -21
  90. scitex/path/_get_spath.py +6 -27
  91. scitex/path/_getsize.py +23 -9
  92. scitex/path/_increment_version.py +31 -38
  93. scitex/path/_mk_spath.py +26 -29
  94. scitex/path/_path.py +5 -12
  95. scitex/path/_split.py +27 -15
  96. scitex/path/_this_path.py +23 -9
  97. scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/__init__.py +2 -1
  98. scitex/plt/_subplots/_AxisWrapperMixins/__init__.py +2 -2
  99. scitex/plt/gallery/_generate.py +76 -50
  100. scitex/plt/io/__init__.py +17 -19
  101. scitex/plt/io/_bundle.py +99 -52
  102. scitex/plt/io/_layered_bundle.py +303 -168
  103. scitex/plt/utils/_csv_column_naming.py +250 -118
  104. scitex/schema/__init__.py +69 -73
  105. scitex/schema/_canvas.py +1 -1
  106. scitex/schema/_stats.py +2 -2
  107. scitex/stats/__init__.py +30 -33
  108. scitex/stats/_schema.py +1 -1
  109. scitex/stats/io/__init__.py +10 -11
  110. scitex/stats/io/_bundle.py +16 -16
  111. {scitex-2.10.3.dist-info → scitex-2.11.0.dist-info}/METADATA +190 -73
  112. {scitex-2.10.3.dist-info → scitex-2.11.0.dist-info}/RECORD +237 -360
  113. scitex/fig/editor/_defaults.py +0 -300
  114. scitex/fig/editor/edit/panel_loader.py +0 -232
  115. scitex/fig/editor/flask_editor/_bbox.py +0 -1299
  116. scitex/fig/editor/flask_editor/_core.py +0 -1429
  117. scitex/fig/editor/flask_editor/_renderer.py +0 -813
  118. scitex/fig/editor/flask_editor/static/css/features/canvas.css +0 -176
  119. scitex/fts/README.md +0 -262
  120. scitex/fts/TODO.md +0 -66
  121. scitex/fts/__init__.py +0 -90
  122. scitex/fts/_bundle/README_IN_BUNDLE.md +0 -102
  123. scitex/fts/_bundle/__init__.py +0 -38
  124. scitex/fts/_bundle/_utils/__init__.py +0 -55
  125. scitex/fts/_bundle/_utils/_const.py +0 -26
  126. scitex/fts/_bundle/_utils/_errors.py +0 -73
  127. scitex/fts/_bundle/_utils/_generate.py +0 -21
  128. scitex/fts/_bundle/_utils/_types.py +0 -76
  129. scitex/fts/_bundle/_zipbundle.py +0 -165
  130. scitex/fts/_fig/__init__.py +0 -22
  131. scitex/fts/_fig/_backend/_parser.py +0 -188
  132. scitex/fts/_fig/_editor/__init__.py +0 -14
  133. scitex/fts/_fig/_editor/_cui/__init__.py +0 -33
  134. scitex/fts/_fig/_editor/_cui/_backend_detector.py +0 -39
  135. scitex/fts/_fig/_editor/_cui/_bundle_resolver.py +0 -366
  136. scitex/fts/_fig/_editor/_cui/_editor_launcher.py +0 -175
  137. scitex/fts/_fig/_editor/_cui/_manual_handler.py +0 -52
  138. scitex/fts/_fig/_editor/_cui/_path_resolver.py +0 -66
  139. scitex/fts/_fig/_editor/_gui/__init__.py +0 -11
  140. scitex/fts/_fig/_editor/_gui/_flask_editor/__init__.py +0 -20
  141. scitex/fts/_fig/_editor/_gui/_flask_editor/_plotter.py +0 -664
  142. scitex/fts/_fig/_editor/_gui/_flask_editor/_utils.py +0 -79
  143. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/base/reset.css +0 -41
  144. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/base/typography.css +0 -16
  145. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/base/variables.css +0 -85
  146. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/buttons.css +0 -217
  147. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/context-menu.css +0 -93
  148. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/dropdown.css +0 -57
  149. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/forms.css +0 -112
  150. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/modal.css +0 -59
  151. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/sections.css +0 -212
  152. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/element-inspector.css +0 -190
  153. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/loading.css +0 -59
  154. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/overlay.css +0 -45
  155. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/panel-grid.css +0 -95
  156. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/selection.css +0 -101
  157. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/statistics.css +0 -138
  158. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/index.css +0 -31
  159. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/layout/container.css +0 -7
  160. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/layout/controls.css +0 -56
  161. scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/layout/preview.css +0 -78
  162. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/alignment/axis.js +0 -314
  163. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/alignment/basic.js +0 -107
  164. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/alignment/distribute.js +0 -54
  165. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/canvas/canvas.js +0 -172
  166. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/canvas/dragging.js +0 -258
  167. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/canvas/resize.js +0 -48
  168. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/canvas/selection.js +0 -71
  169. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/core/api.js +0 -288
  170. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/core/state.js +0 -143
  171. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/core/utils.js +0 -245
  172. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/dev/element-inspector.js +0 -992
  173. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/editor/bbox.js +0 -339
  174. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/editor/element-drag.js +0 -286
  175. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/editor/overlay.js +0 -371
  176. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/editor/preview.js +0 -293
  177. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/main.js +0 -426
  178. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/shortcuts/context-menu.js +0 -152
  179. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/shortcuts/keyboard.js +0 -265
  180. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/ui/controls.js +0 -184
  181. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/ui/download.js +0 -57
  182. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/ui/help.js +0 -100
  183. scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/ui/theme.js +0 -34
  184. scitex/fts/_fig/_editor/_gui/_flask_editor/templates/__init__.py +0 -124
  185. scitex/fts/_fig/_editor/_gui/_flask_editor/templates/_html.py +0 -851
  186. scitex/fts/_fig/_editor/_gui/_flask_editor/templates/_scripts.py +0 -4932
  187. scitex/fts/_fig/_editor/_gui/_flask_editor/templates/_styles.py +0 -1657
  188. scitex/fts/_fig/_editor/_gui/_flask_editor.py +0 -36
  189. scitex/fts/_fig/_models/_Annotations.py +0 -115
  190. scitex/fts/_fig/_models/_Axes.py +0 -152
  191. scitex/fts/_fig/_models/_Figure.py +0 -138
  192. scitex/fts/_fig/_models/_Plot.py +0 -123
  193. scitex/fts/_fig/_utils/_plot_layout.py +0 -397
  194. scitex/fts/_kinds/_figure/_composite.py +0 -345
  195. scitex/fts/_kinds/_plot/_backend/__init__.py +0 -53
  196. scitex/fts/_kinds/_plot/_backend/_export.py +0 -165
  197. scitex/fts/_kinds/_plot/_backend/_render.py +0 -538
  198. scitex/fts/_kinds/_plot/_dataclasses/_ChannelEncoding.py +0 -46
  199. scitex/fts/_kinds/_plot/_dataclasses/_Encoding.py +0 -82
  200. scitex/fts/_kinds/_plot/_dataclasses/_Theme.py +0 -441
  201. scitex/fts/_kinds/_plot/_dataclasses/_TraceEncoding.py +0 -52
  202. scitex/fts/_kinds/_plot/_dataclasses/__init__.py +0 -47
  203. scitex/fts/_kinds/_plot/_models/_Guides.py +0 -104
  204. scitex/fts/_kinds/_plot/_models/_Styles.py +0 -245
  205. scitex/fts/_kinds/_plot/_models/__init__.py +0 -80
  206. scitex/fts/_kinds/_plot/_models/_plot_types/__init__.py +0 -156
  207. scitex/fts/_kinds/_plot/_models/_plot_types/_bar.py +0 -43
  208. scitex/fts/_kinds/_plot/_models/_plot_types/_box.py +0 -38
  209. scitex/fts/_kinds/_plot/_models/_plot_types/_distribution.py +0 -36
  210. scitex/fts/_kinds/_plot/_models/_plot_types/_errorbar.py +0 -60
  211. scitex/fts/_kinds/_plot/_models/_plot_types/_histogram.py +0 -30
  212. scitex/fts/_kinds/_plot/_models/_plot_types/_image.py +0 -61
  213. scitex/fts/_kinds/_plot/_models/_plot_types/_line.py +0 -57
  214. scitex/fts/_kinds/_plot/_models/_plot_types/_scatter.py +0 -30
  215. scitex/fts/_kinds/_plot/_models/_plot_types/_seaborn.py +0 -121
  216. scitex/fts/_kinds/_plot/_models/_plot_types/_violin.py +0 -36
  217. scitex/fts/_kinds/_plot/_utils/__init__.py +0 -129
  218. scitex/fts/_kinds/_plot/_utils/_auto_layout.py +0 -127
  219. scitex/fts/_kinds/_plot/_utils/_calc_bounds.py +0 -111
  220. scitex/fts/_kinds/_plot/_utils/_const_sizes.py +0 -48
  221. scitex/fts/_kinds/_plot/_utils/_convert_coords.py +0 -77
  222. scitex/fts/_kinds/_plot/_utils/_get_template.py +0 -178
  223. scitex/fts/_kinds/_plot/_utils/_normalize.py +0 -73
  224. scitex/fts/_kinds/_plot/_utils/_validate.py +0 -197
  225. scitex/fts/_kinds/_table/_latex/_export.py +0 -279
  226. scitex/fts/_stats/__init__.py +0 -48
  227. scitex/fts/_stats/_dataclasses/_Stats.py +0 -423
  228. scitex/fts/_stats/_dataclasses/__init__.py +0 -48
  229. scitex/fts/_tables/__init__.py +0 -65
  230. scitex/fts/_tables/_latex/__init__.py +0 -93
  231. scitex/fts/_tables/_latex/_editor/__init__.py +0 -11
  232. scitex/fts/_tables/_latex/_editor/_app.py +0 -725
  233. scitex/fts/_tables/_latex/_figure_exporter.py +0 -153
  234. scitex/fts/_tables/_latex/_stats_formatter.py +0 -274
  235. scitex/fts/_tables/_latex/_table_exporter.py +0 -362
  236. scitex/fts/_tables/_latex/_utils.py +0 -369
  237. scitex/fts/_tables/_latex/_validator.py +0 -445
  238. scitex/io/_save_modules/_pltz_bundle.py +0 -356
  239. /scitex/{fig → canvas}/README.md +0 -0
  240. /scitex/{fig → canvas}/backend/__init__.py +0 -0
  241. /scitex/{fig → canvas}/backend/_export.py +0 -0
  242. /scitex/{fig → canvas}/backend/_render.py +0 -0
  243. /scitex/{fig → canvas}/docs/CANVAS_ARCHITECTURE.md +0 -0
  244. /scitex/{fig → canvas}/editor/__init__.py +0 -0
  245. /scitex/{fig → canvas}/editor/_dearpygui_editor.py +0 -0
  246. /scitex/{fig → canvas}/editor/_flask_editor.py +0 -0
  247. /scitex/{fig → canvas}/editor/_mpl_editor.py +0 -0
  248. /scitex/{fig → canvas}/editor/_qt_editor.py +0 -0
  249. /scitex/{fig → canvas}/editor/_tkinter_editor.py +0 -0
  250. /scitex/{fig → canvas}/editor/edit/backend_detector.py +0 -0
  251. /scitex/{fig → canvas}/editor/edit/manual_handler.py +0 -0
  252. /scitex/{fig → canvas}/editor/edit/path_resolver.py +0 -0
  253. /scitex/{fig → canvas}/editor/flask_editor/__init__.py +0 -0
  254. /scitex/{fig → canvas}/editor/flask_editor/_plotter.py +0 -0
  255. /scitex/{fig → canvas}/editor/flask_editor/_utils.py +0 -0
  256. /scitex/{fig → canvas}/editor/flask_editor/static/css/base/reset.css +0 -0
  257. /scitex/{fig → canvas}/editor/flask_editor/static/css/base/typography.css +0 -0
  258. /scitex/{fig → canvas}/editor/flask_editor/static/css/base/variables.css +0 -0
  259. /scitex/{fig → canvas}/editor/flask_editor/static/css/components/buttons.css +0 -0
  260. /scitex/{fig → canvas}/editor/flask_editor/static/css/components/context-menu.css +0 -0
  261. /scitex/{fig → canvas}/editor/flask_editor/static/css/components/dropdown.css +0 -0
  262. /scitex/{fig → canvas}/editor/flask_editor/static/css/components/forms.css +0 -0
  263. /scitex/{fig → canvas}/editor/flask_editor/static/css/components/modal.css +0 -0
  264. /scitex/{fig → canvas}/editor/flask_editor/static/css/components/sections.css +0 -0
  265. /scitex/{fig → canvas}/editor/flask_editor/static/css/features/element-inspector.css +0 -0
  266. /scitex/{fig → canvas}/editor/flask_editor/static/css/features/loading.css +0 -0
  267. /scitex/{fig → canvas}/editor/flask_editor/static/css/features/overlay.css +0 -0
  268. /scitex/{fig → canvas}/editor/flask_editor/static/css/features/selection.css +0 -0
  269. /scitex/{fig → canvas}/editor/flask_editor/static/css/features/statistics.css +0 -0
  270. /scitex/{fig → canvas}/editor/flask_editor/static/css/index.css +0 -0
  271. /scitex/{fig → canvas}/editor/flask_editor/static/css/layout/container.css +0 -0
  272. /scitex/{fig → canvas}/editor/flask_editor/static/css/layout/controls.css +0 -0
  273. /scitex/{fig → canvas}/editor/flask_editor/static/css/layout/preview.css +0 -0
  274. /scitex/{fig → canvas}/editor/flask_editor/static/js/alignment/axis.js +0 -0
  275. /scitex/{fig → canvas}/editor/flask_editor/static/js/alignment/basic.js +0 -0
  276. /scitex/{fig → canvas}/editor/flask_editor/static/js/alignment/distribute.js +0 -0
  277. /scitex/{fig → canvas}/editor/flask_editor/static/js/canvas/canvas.js +0 -0
  278. /scitex/{fig → canvas}/editor/flask_editor/static/js/canvas/dragging.js +0 -0
  279. /scitex/{fig → canvas}/editor/flask_editor/static/js/canvas/resize.js +0 -0
  280. /scitex/{fig → canvas}/editor/flask_editor/static/js/canvas/selection.js +0 -0
  281. /scitex/{fig → canvas}/editor/flask_editor/static/js/core/state.js +0 -0
  282. /scitex/{fig → canvas}/editor/flask_editor/static/js/core/utils.js +0 -0
  283. /scitex/{fig → canvas}/editor/flask_editor/static/js/dev/element-inspector.js +0 -0
  284. /scitex/{fig → canvas}/editor/flask_editor/static/js/editor/bbox.js +0 -0
  285. /scitex/{fig → canvas}/editor/flask_editor/static/js/editor/element-drag.js +0 -0
  286. /scitex/{fig → canvas}/editor/flask_editor/static/js/editor/overlay.js +0 -0
  287. /scitex/{fig → canvas}/editor/flask_editor/static/js/main.js +0 -0
  288. /scitex/{fig → canvas}/editor/flask_editor/static/js/shortcuts/context-menu.js +0 -0
  289. /scitex/{fig → canvas}/editor/flask_editor/static/js/shortcuts/keyboard.js +0 -0
  290. /scitex/{fig → canvas}/editor/flask_editor/static/js/ui/controls.js +0 -0
  291. /scitex/{fig → canvas}/editor/flask_editor/static/js/ui/download.js +0 -0
  292. /scitex/{fig → canvas}/editor/flask_editor/static/js/ui/help.js +0 -0
  293. /scitex/{fig → canvas}/editor/flask_editor/static/js/ui/theme.js +0 -0
  294. /scitex/{fig → canvas}/editor/flask_editor/templates/__init__.py +0 -0
  295. /scitex/{fig → canvas}/io/_directory.py +0 -0
  296. /scitex/{fig → canvas}/model/_plot_types.py +0 -0
  297. /scitex/{fig → canvas}/utils/_defaults.py +0 -0
  298. /scitex/{fig → canvas}/utils/_validate.py +0 -0
  299. /scitex/{fts/_bundle → io/bundle}/_conversion/__init__.py +0 -0
  300. /scitex/{fts/_bundle → io/bundle}/_conversion/_bundle2dict.py +0 -0
  301. /scitex/{fts/_bundle → io/bundle}/_conversion/_dict2bundle.py +0 -0
  302. /scitex/{fts/_bundle → io/bundle}/_dataclasses/_Axes.py +0 -0
  303. /scitex/{fts/_bundle → io/bundle}/_dataclasses/_BBox.py +0 -0
  304. /scitex/{fts/_bundle → io/bundle}/_dataclasses/_ColumnDef.py +0 -0
  305. /scitex/{fts/_bundle → io/bundle}/_dataclasses/_DataFormat.py +0 -0
  306. /scitex/{fts/_bundle → io/bundle}/_dataclasses/_DataInfo.py +0 -0
  307. /scitex/{fts/_bundle → io/bundle}/_dataclasses/_DataSource.py +0 -0
  308. /scitex/{fts/_bundle → io/bundle}/_dataclasses/_SizeMM.py +0 -0
  309. /scitex/{fts/_bundle → io/bundle}/_extractors/__init__.py +0 -0
  310. /scitex/{fts/_bundle → io/bundle}/_extractors/_extract_bar.py +0 -0
  311. /scitex/{fts/_bundle → io/bundle}/_extractors/_extract_line.py +0 -0
  312. /scitex/{fts/_bundle → io/bundle}/_extractors/_extract_scatter.py +0 -0
  313. /scitex/{fts/_kinds → io/bundle/kinds}/__init__.py +0 -0
  314. /scitex/{fts/_kinds → io/bundle/kinds}/_figure/__init__.py +0 -0
  315. /scitex/{fts/_fig → io/bundle/kinds/_figure}/_composite.py +0 -0
  316. /scitex/{fts/_kinds → io/bundle/kinds}/_plot/__init__.py +0 -0
  317. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_backend/__init__.py +0 -0
  318. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_backend/_export.py +0 -0
  319. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_backend/_render.py +0 -0
  320. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_dataclasses/_ChannelEncoding.py +0 -0
  321. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_dataclasses/_Encoding.py +0 -0
  322. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_dataclasses/_Theme.py +0 -0
  323. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_dataclasses/_TraceEncoding.py +0 -0
  324. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_dataclasses/__init__.py +0 -0
  325. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/__init__.py +0 -0
  326. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/__init__.py +0 -0
  327. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_bar.py +0 -0
  328. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_box.py +0 -0
  329. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_distribution.py +0 -0
  330. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_errorbar.py +0 -0
  331. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_histogram.py +0 -0
  332. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_image.py +0 -0
  333. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_line.py +0 -0
  334. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_scatter.py +0 -0
  335. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_seaborn.py +0 -0
  336. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_violin.py +0 -0
  337. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/__init__.py +0 -0
  338. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_auto_layout.py +0 -0
  339. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_calc_bounds.py +0 -0
  340. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_const_sizes.py +0 -0
  341. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_convert_coords.py +0 -0
  342. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_get_template.py +0 -0
  343. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_normalize.py +0 -0
  344. /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_validate.py +0 -0
  345. /scitex/{fts/_kinds → io/bundle/kinds}/_shape/__init__.py +0 -0
  346. /scitex/{fts/_kinds → io/bundle/kinds}/_stats/__init__.py +0 -0
  347. /scitex/{fts/_kinds → io/bundle/kinds}/_stats/_dataclasses/_Stats.py +0 -0
  348. /scitex/{fts/_kinds → io/bundle/kinds}/_stats/_dataclasses/__init__.py +0 -0
  349. /scitex/{fts/_kinds → io/bundle/kinds}/_table/__init__.py +0 -0
  350. /scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_editor/__init__.py +0 -0
  351. /scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_stats_formatter.py +0 -0
  352. /scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_utils.py +0 -0
  353. /scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_validator.py +0 -0
  354. /scitex/{fts/_kinds → io/bundle/kinds}/_text/__init__.py +0 -0
  355. /scitex/{fts/_schemas → io/bundle/schemas}/data_info.schema.json +0 -0
  356. /scitex/{fts/_schemas → io/bundle/schemas}/encoding.schema.json +0 -0
  357. /scitex/{fts/_schemas → io/bundle/schemas}/node.schema.json +0 -0
  358. /scitex/{fts/_schemas → io/bundle/schemas}/render_manifest.schema.json +0 -0
  359. /scitex/{fts/_schemas → io/bundle/schemas}/stats.schema.json +0 -0
  360. /scitex/{fts/_schemas → io/bundle/schemas}/theme.schema.json +0 -0
  361. {scitex-2.10.3.dist-info → scitex-2.11.0.dist-info}/WHEEL +0 -0
  362. {scitex-2.10.3.dist-info → scitex-2.11.0.dist-info}/entry_points.txt +0 -0
  363. {scitex-2.10.3.dist-info → scitex-2.11.0.dist-info}/licenses/LICENSE +0 -0
@@ -3,7 +3,7 @@
3
3
  # Timestamp: 2025-12-08
4
4
  # File: ./src/scitex/vis/io/canvas.py
5
5
  """
6
- Canvas JSON operations for scitex.fig.
6
+ Canvas JSON operations for scitex.canvas.
7
7
 
8
8
  Handles saving, loading, and updating canvas.json files.
9
9
  """
@@ -3,7 +3,7 @@
3
3
  # Timestamp: 2025-12-08
4
4
  # File: ./src/scitex/vis/io/data.py
5
5
  """
6
- Data operations for scitex.fig.
6
+ Data operations for scitex.canvas.
7
7
 
8
8
  Handles SHA256 hash computation and verification for data integrity.
9
9
  """
@@ -3,7 +3,7 @@
3
3
  # Timestamp: 2025-12-08
4
4
  # File: ./src/scitex/vis/io/export.py
5
5
  """
6
- Export operations for scitex.fig.
6
+ Export operations for scitex.canvas.
7
7
 
8
8
  Handles composing and exporting canvas to various formats (PNG, PDF, SVG).
9
9
  """
@@ -115,7 +115,7 @@ def load_figure_model(
115
115
 
116
116
  Examples
117
117
  --------
118
- >>> from scitex.fig.io import load_figure_model
118
+ >>> from scitex.canvas.io import load_figure_model
119
119
  >>> fig_model = load_figure_model("figure.json")
120
120
  >>> fig_model.width_mm
121
121
  180
@@ -3,7 +3,7 @@
3
3
  # Timestamp: 2025-12-08
4
4
  # File: ./src/scitex/vis/io/panel.py
5
5
  """
6
- Panel operations for scitex.fig.
6
+ Panel operations for scitex.canvas.
7
7
 
8
8
  Handles adding, removing, updating, and listing panels within a canvas.
9
9
  Panels can be either 'scitex' type (full stx.plt output) or 'image' type (static image).
@@ -119,7 +119,7 @@ def save_figure_model(
119
119
 
120
120
  Examples
121
121
  --------
122
- >>> from scitex.fig.model import FigureModel
122
+ >>> from scitex.canvas.model import FigureModel
123
123
  >>> fig_model = FigureModel(width_mm=180, height_mm=120)
124
124
  >>> save_figure_model(fig_model, "figure.json")
125
125
  PosixPath('figure.json')
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
  # File: ./src/scitex/vis/model/__init__.py
4
4
  """
5
- JSON models for scitex.fig figure specifications.
5
+ JSON models for scitex.canvas figure specifications.
6
6
 
7
7
  This module provides dataclass-based models for representing
8
8
  publication-quality figures as JSON structures.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
3
  # File: ./src/scitex/vis/model/annotations.py
4
- """Annotation JSON model for scitex.fig."""
4
+ """Annotation JSON model for scitex.canvas."""
5
5
 
6
6
  from typing import Optional, Dict, Any, Tuple
7
7
  from dataclasses import dataclass, field, asdict
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
3
  # File: ./src/scitex/vis/model/axes.py
4
- """Axes JSON model for scitex.fig."""
4
+ """Axes JSON model for scitex.canvas."""
5
5
 
6
6
  from typing import Optional, List, Dict, Any
7
7
  from dataclasses import dataclass, field, asdict
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
3
  # File: ./src/scitex/vis/model/figure.py
4
- """Figure JSON model for scitex.fig."""
4
+ """Figure JSON model for scitex.canvas."""
5
5
 
6
6
  from typing import Optional, List, Dict, Any
7
7
  from dataclasses import dataclass, field, asdict
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
3
  # File: ./src/scitex/vis/model/guides.py
4
- """Guide elements (lines, spans) JSON model for scitex.fig."""
4
+ """Guide elements (lines, spans) JSON model for scitex.canvas."""
5
5
 
6
6
  from typing import Optional, List, Dict, Any
7
7
  from dataclasses import dataclass, field, asdict
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python3
2
2
  # -*- coding: utf-8 -*-
3
3
  # File: ./src/scitex/vis/model/plot.py
4
- """Plot JSON model for scitex.fig."""
4
+ """Plot JSON model for scitex.canvas."""
5
5
 
6
6
  from typing import Optional, List, Dict, Any
7
7
  from dataclasses import dataclass, field, asdict
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
  # File: ./src/scitex/vis/model/styles.py
4
4
  """
5
- Style dataclasses for scitex.fig objects.
5
+ Style dataclasses for scitex.canvas objects.
6
6
 
7
7
  Separating style properties from data makes:
8
8
  - UI property panels easy to auto-generate
@@ -2,7 +2,7 @@
2
2
  # -*- coding: utf-8 -*-
3
3
  # File: ./src/scitex/vis/utils/__init__.py
4
4
  """
5
- Utilities for scitex.fig.
5
+ Utilities for scitex.canvas.
6
6
 
7
7
  Includes validation functions and default templates for
8
8
  common publication formats.
scitex/cli/convert.py CHANGED
@@ -227,17 +227,19 @@ def validate_bundles(paths: tuple, verbose: bool):
227
227
  scitex convert validate output.stx
228
228
  scitex convert validate ./figures/*.stx --verbose
229
229
  """
230
- # Use FTS instead of deprecated io.bundle
230
+ # Use Bundle for validation
231
231
  try:
232
- from scitex.fts import FTS as ZipBundle
232
+ from scitex.io.bundle import Bundle as ZipBundle
233
+
233
234
  def validate_stx_bundle(path):
234
235
  try:
235
236
  bundle = ZipBundle(path)
236
237
  return bundle.validate(level="strict")
237
238
  except Exception as e:
238
239
  return {"valid": False, "errors": [str(e)]}
240
+
239
241
  except ImportError:
240
- click.echo("Error: scitex.fts not available", err=True)
242
+ click.echo("Error: scitex.io.bundle not available", err=True)
241
243
  return
242
244
 
243
245
  valid = 0
@@ -303,9 +305,9 @@ def bundle_info(path: str):
303
305
  scitex convert info figure.stx
304
306
  """
305
307
  try:
306
- from scitex.fts import FTS as ZipBundle
308
+ from scitex.io.bundle import Bundle as ZipBundle
307
309
  except ImportError:
308
- click.echo("Error: scitex.fts not available", err=True)
310
+ click.echo("Error: scitex.io.bundle not available", err=True)
309
311
  return
310
312
 
311
313
  bundle_path = Path(path)
@@ -368,12 +370,14 @@ def _convert_bundle(input_path: Path, output_path: Path) -> None:
368
370
  """
369
371
  import json
370
372
  import tempfile
371
- import zipfile
372
373
 
373
374
  # Generate bundle ID and normalize spec - inline functions since io.bundle is deprecated
374
375
  import uuid
376
+ import zipfile
377
+
375
378
  def generate_bundle_id():
376
379
  return str(uuid.uuid4())[:8]
380
+
377
381
  def normalize_spec(spec):
378
382
  return spec # FTS handles normalization internally
379
383
 
scitex/diagram/README.md CHANGED
@@ -50,23 +50,23 @@ title: SciTeX Figure Lifecycle
50
50
  paper:
51
51
  column: single
52
52
  mode: publication # draft | publication
53
- emphasize: [figz_bundle, editor]
53
+ emphasize: [figure_bundle, editor]
54
54
  return_edges: # Hide in publication mode
55
- - [editor, figz_bundle]
55
+ - [editor, figure_bundle]
56
56
 
57
57
  layout:
58
58
  layer_gap: tight
59
59
  layers: # rank=same constraints
60
60
  - [python, savefig]
61
- - [figz_bundle]
61
+ - [figure_bundle]
62
62
  - [editor, ai_review]
63
63
 
64
64
  nodes:
65
65
  - id: python
66
66
  label: Python
67
67
  shape: rounded
68
- - id: figz_bundle
69
- label: .figz Bundle
68
+ - id: figure_bundle
69
+ label: .figure Bundle
70
70
  shape: stadium
71
71
  emphasis: primary
72
72
 
@@ -74,7 +74,7 @@ edges:
74
74
  - from: python
75
75
  to: savefig
76
76
  - from: savefig
77
- to: figz_bundle
77
+ to: figure_bundle
78
78
  ```
79
79
 
80
80
  ```python
@@ -98,7 +98,7 @@ d.to_mermaid("workflow.mmd")
98
98
  paper:
99
99
  mode: publication
100
100
  return_edges:
101
- - [editor, figz_bundle] # Will be invisible
101
+ - [editor, figure_bundle] # Will be invisible
102
102
  ```
103
103
 
104
104
  ## Auto-Split Large Diagrams
scitex/io/__init__.py CHANGED
@@ -9,21 +9,19 @@ __DIR__ = os.path.dirname(__FILE__)
9
9
  # ----------------------------------------
10
10
  """Scitex IO module with lazy imports to avoid circular dependencies.
11
11
 
12
- Bundle I/O is handled via scitex.fts:
13
- from scitex.fts import FTS
14
- bundle = FTS("Figure1.stx")
12
+ Bundle I/O is handled via scitex.io.bundle:
13
+ from scitex.io.bundle import Bundle
14
+ bundle = Bundle("Figure1.figure")
15
15
  bundle.save()
16
16
  """
17
17
 
18
18
  # Import commonly used functions directly
19
+ # Bundle I/O - import the bundle submodule
20
+ from . import bundle
19
21
  from ._cache import cache
20
22
  from ._flush import flush
21
23
  from ._glob import glob, parse_glob
22
24
  from ._load import load
23
-
24
- # Bundle I/O - import the bundle submodule
25
- from . import bundle
26
-
27
25
  from ._load_configs import load_configs
28
26
  from ._reload import reload
29
27
  from ._save import save
@@ -45,20 +43,10 @@ except ImportError:
45
43
  has_zarr_key = None
46
44
 
47
45
  # Import load cache control functions
48
- from ._load_cache import (
49
- clear_cache as clear_load_cache,
50
- )
51
- from ._load_cache import (
52
- configure_cache,
53
- get_cache_info,
54
- )
46
+ from ._load_cache import clear_cache as clear_load_cache
47
+ from ._load_cache import configure_cache, get_cache_info
55
48
 
56
49
  # Import load cache control functions
57
- from ._load_cache import (
58
- get_cache_info,
59
- configure_cache,
60
- clear_cache as clear_load_cache,
61
- )
62
50
 
63
51
  # Import save module functions
64
52
  try:
scitex/io/_load.py CHANGED
@@ -16,11 +16,7 @@ from typing import Any, Union
16
16
 
17
17
  from scitex.decorators import preserve_doc
18
18
 
19
- from ._load_cache import (
20
- cache_data,
21
- get_cached_data,
22
- load_npy_cached,
23
- )
19
+ from ._load_cache import cache_data, get_cached_data, load_npy_cached
24
20
 
25
21
  # Core loaders (no special dependencies)
26
22
  from ._load_modules._bibtex import _load_bibtex
@@ -101,7 +97,7 @@ except ImportError:
101
97
 
102
98
 
103
99
  def _load_bundle(lpath, verbose=False, **kwargs):
104
- """Load a .pltz, .figz, or .statsz bundle.
100
+ """Load a .plot, .figure, or .stats bundle.
105
101
 
106
102
  Parameters
107
103
  ----------
@@ -114,12 +110,12 @@ def _load_bundle(lpath, verbose=False, **kwargs):
114
110
 
115
111
  Returns
116
112
  -------
117
- For .pltz bundles:
113
+ For .plot bundles:
118
114
  tuple: (fig, ax, data) where fig is reconstructed figure,
119
115
  ax is the axes, data is DataFrame or None.
120
- For .figz bundles:
116
+ For .figure bundles:
121
117
  dict: Figure data with 'spec' and 'panels'.
122
- For .statsz bundles:
118
+ For .stats bundles:
123
119
  dict: Stats data with 'spec' and 'comparisons'.
124
120
  """
125
121
  from .bundle import BundleType
@@ -128,8 +124,8 @@ def _load_bundle(lpath, verbose=False, **kwargs):
128
124
  bundle = load_bundle(lpath)
129
125
  bundle_type = bundle.get("type")
130
126
 
131
- if bundle_type == BundleType.PLTZ:
132
- # Return (fig, ax, data) tuple for .pltz bundles
127
+ if bundle_type == BundleType.PLOT:
128
+ # Return (fig, ax, data) tuple for .plot bundles
133
129
  # Note: We return the spec and data, not a reconstructed figure
134
130
  # as matplotlib figures cannot be perfectly serialized/deserialized
135
131
  from pathlib import Path
@@ -177,19 +173,19 @@ def _load_bundle(lpath, verbose=False, **kwargs):
177
173
  if theme:
178
174
  fig._scitex_theme = theme.get("mode")
179
175
 
180
- # Data from bundle (merged in load_layered_pltz_bundle)
176
+ # Data from bundle (merged in load_layered_plot_bundle)
181
177
  data = bundle.get("data")
182
178
  return fig, ax, data
183
179
  else:
184
180
  # No PNG, return spec and data
185
181
  return bundle.get("spec"), None, bundle.get("data")
186
182
 
187
- elif bundle_type == BundleType.FIGZ:
188
- # Return figure dict for .figz bundles
183
+ elif bundle_type == BundleType.FIGURE:
184
+ # Return figure dict for .figure bundles
189
185
  return bundle
190
186
 
191
- elif bundle_type == BundleType.STATSZ:
192
- # Return stats dict for .statsz bundles
187
+ elif bundle_type == BundleType.STATS:
188
+ # Return stats dict for .stats bundles
193
189
  return bundle
194
190
 
195
191
  return bundle
@@ -300,10 +296,10 @@ def load(
300
296
  if verbose:
301
297
  print(f"[DEBUG] After Path conversion: {lpath}")
302
298
 
303
- # Handle bundle formats (.pltz, .figz, .statsz and their .d variants)
304
- bundle_extensions = (".figz", ".pltz", ".statsz")
299
+ # Handle bundle formats (.plot, .figure, .stats and their ZIP variants)
300
+ bundle_extensions = (".figure", ".plot", ".stats")
305
301
  for bext in bundle_extensions:
306
- if lpath.endswith(bext) or lpath.endswith(f"{bext}.d"):
302
+ if lpath.endswith(bext) or lpath.endswith(f"{bext}.zip"):
307
303
  return _load_bundle(lpath, verbose=verbose, **kwargs)
308
304
 
309
305
  # Check if it's a glob pattern
@@ -3,7 +3,7 @@
3
3
  # Timestamp: 2025-12-08
4
4
  # File: /home/ywatanabe/proj/scitex-code/src/scitex/io/_load_modules/_canvas.py
5
5
  """
6
- Load canvas directory (.canvas) for scitex.fig.
6
+ Load canvas directory (.canvas) for scitex.canvas.
7
7
 
8
8
  Canvas directories are portable figure bundles containing:
9
9
  - canvas.json: Layout, panels, composition settings
@@ -100,7 +100,7 @@ def _load_canvas(
100
100
  # Return Canvas object by default
101
101
  if not as_dict:
102
102
  try:
103
- from scitex.fig.canvas import Canvas
103
+ from scitex.canvas.canvas import Canvas
104
104
 
105
105
  canvas_obj = Canvas.from_dict(canvas_dict)
106
106
  # Store reference to original directory for copying
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
2
  # Time-stamp: "2024-11-14 07:51:45 (ywatanabe)"
4
3
  # File: ./scitex_repo/src/scitex/io/_load_modules/_con.py
5
4
 
@@ -11,10 +10,11 @@ import mne
11
10
  def _load_con(lpath: str, **kwargs) -> Any:
12
11
  if not lpath.endswith(".con"):
13
12
  raise ValueError("File must have .con extension")
14
- obj = mne.io.read_raw_fif(lpath, preload=True, **kwargs)
15
- obj = obj.to_data_frame()
16
- obj["samp_rate"] = obj.info["sfreq"]
17
- return obj
13
+ raw = mne.io.read_raw_fif(lpath, preload=True, **kwargs)
14
+ sfreq = raw.info["sfreq"]
15
+ df = raw.to_data_frame()
16
+ df["samp_rate"] = sfreq
17
+ return df
18
18
 
19
19
 
20
20
  # EOF
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
2
  # Time-stamp: "2024-11-14 07:56:27 (ywatanabe)"
4
3
  # File: ./scitex_repo/src/scitex/io/_load_modules/_eeg.py
5
4
 
@@ -10,7 +9,7 @@ from typing import Any
10
9
  import mne
11
10
 
12
11
 
13
- def _load_eeg_data(path: str, **kwargs) -> Any:
12
+ def _load_eeg_data(lpath: str, **kwargs) -> Any:
14
13
  """
15
14
  Load EEG data based on file extension and associated files using MNE-Python.
16
15
 
@@ -43,15 +42,15 @@ def _load_eeg_data(path: str, **kwargs) -> Any:
43
42
  extension = lpath.split(".")[-1]
44
43
 
45
44
  allowed_extensions = [
46
- ".vhdr",
47
- ".vmrk",
48
- ".edf",
49
- ".bdf",
50
- ".gdf",
51
- ".cnt",
52
- ".egi",
53
- ".eeg",
54
- ".set",
45
+ "vhdr",
46
+ "vmrk",
47
+ "edf",
48
+ "bdf",
49
+ "gdf",
50
+ "cnt",
51
+ "egi",
52
+ "eeg",
53
+ "set",
55
54
  ]
56
55
 
57
56
  if extension not in allowed_extensions:
@@ -59,6 +58,9 @@ def _load_eeg_data(path: str, **kwargs) -> Any:
59
58
  f"File must have one of these extensions: {', '.join(allowed_extensions)}"
60
59
  )
61
60
 
61
+ # Remove preload from kwargs if present - we always use preload=True
62
+ kwargs.pop("preload", None)
63
+
62
64
  with warnings.catch_warnings():
63
65
  warnings.simplefilter("ignore", RuntimeWarning)
64
66
 
@@ -98,9 +100,11 @@ def _load_eeg_data(path: str, **kwargs) -> Any:
98
100
  lpath_v = lpath.replace(".eeg", ".vhdr")
99
101
  raw = mne.io.read_raw_brainvision(lpath_v, preload=True, **kwargs)
100
102
  # Nihon Koden
101
- if is_NihonKoden:
103
+ elif is_NihonKoden:
102
104
  # raw = mne.io.read_raw_nihon(lpath, preload=True, **kwargs)
103
105
  raw = mne.io.read_raw(lpath, preload=True, **kwargs)
106
+ else:
107
+ raise ValueError("No associated files found for .eeg file")
104
108
  else:
105
109
  raise ValueError(f"Unsupported file extension: {extension}")
106
110
 
scitex/io/_save.py CHANGED
@@ -6,7 +6,7 @@
6
6
  Save utilities for various data types to different file formats.
7
7
 
8
8
  Supported formats include CSV, NPY, PKL, JOBLIB, PNG, HTML, TIFF, MP4, YAML,
9
- JSON, HDF5, PTH, MAT, CBM, and FTS bundles (.zip or directory).
9
+ JSON, HDF5, PTH, MAT, CBM, and SciTeX bundles (.zip or directory).
10
10
  """
11
11
 
12
12
  import inspect
@@ -40,8 +40,6 @@ from ._save_modules import (
40
40
  save_npz,
41
41
  save_pickle,
42
42
  save_pickle_compressed,
43
- save_pltz_bundle,
44
- save_stx_bundle,
45
43
  save_tex,
46
44
  save_text,
47
45
  save_torch,
@@ -53,12 +51,9 @@ from ._save_modules import (
53
51
 
54
52
  logger = logging.getLogger()
55
53
 
56
- # Re-export for backward compatibility
57
54
  _get_figure_with_data = get_figure_with_data
58
55
  _symlink = symlink
59
56
  _symlink_to = symlink_to
60
- _save_stx_bundle = save_stx_bundle
61
- _save_pltz_bundle = save_pltz_bundle
62
57
  _handle_image_with_csv = handle_image_with_csv
63
58
 
64
59
 
@@ -278,17 +273,17 @@ def _save(
278
273
  """Core dispatcher for saving objects to various formats."""
279
274
  ext = _os.path.splitext(spath)[1].lower()
280
275
 
281
- # Check if this is a matplotlib figure being saved to FTS bundle format
282
- # FTS bundles use .zip (archive) or no extension (directory)
276
+ # Check if this is a matplotlib figure being saved to SciTeX bundle format
277
+ # SciTeX bundles use .zip (archive) or no extension (directory)
283
278
  if _is_matplotlib_figure(obj):
284
- # Save as FTS bundle if:
279
+ # Save as SciTeX bundle if:
285
280
  # 1. Path ends with .zip (create ZIP bundle)
286
281
  # 2. Path has no extension and doesn't match other formats (create directory bundle)
287
282
  if ext == ".zip" or (ext == "" and not spath.endswith("/")):
288
- # Check if explicitly requesting FTS bundle or just .zip
283
+ # Check if explicitly requesting SciTeX bundle or just .zip
289
284
  # Pop as_zip from kwargs to avoid duplicate parameter error
290
285
  as_zip = kwargs.pop("as_zip", ext == ".zip")
291
- _save_fts_bundle(
286
+ _save_scitex_bundle(
292
287
  obj, spath, as_zip, verbose, symlink_from_cwd, symlink_to, **kwargs
293
288
  )
294
289
  return
@@ -348,12 +343,12 @@ def _is_matplotlib_figure(obj):
348
343
  return False
349
344
 
350
345
 
351
- def _save_fts_bundle(
346
+ def _save_scitex_bundle(
352
347
  obj, spath, as_zip, verbose, symlink_from_cwd, symlink_to_path, **kwargs
353
348
  ):
354
- """Save matplotlib figure as FTS bundle (.zip or directory).
349
+ """Save matplotlib figure as SciTeX bundle (.zip or directory).
355
350
 
356
- Delegates to scitex.fts.from_matplotlib as the single source of truth
351
+ Delegates to scitex.io.bundle.from_matplotlib as the single source of truth
357
352
  for bundle structure (canonical/artifacts/payload/children).
358
353
 
359
354
  When figrecipe is available and enabled on the figure, also saves
@@ -362,7 +357,7 @@ def _save_fts_bundle(
362
357
  # Get the actual matplotlib figure
363
358
  import matplotlib.figure
364
359
 
365
- from scitex.fts import from_matplotlib
360
+ from scitex.io.bundle import from_matplotlib
366
361
 
367
362
  from ._save_modules._figure_utils import get_figure_with_data
368
363
 
@@ -390,7 +385,7 @@ def _save_fts_bundle(
390
385
  except Exception:
391
386
  pass
392
387
 
393
- # Delegate to FTS (single source of truth)
388
+ # Delegate to Bundle (single source of truth)
394
389
  # Encoding is built from CSV columns directly for consistency
395
390
  from_matplotlib(fig, spath, name=name, csv_df=csv_df, dpi=dpi)
396
391
 
@@ -55,14 +55,10 @@ from ._mp4 import _mk_mp4 as save_mp4
55
55
  from ._numpy import _save_npy as save_npy
56
56
  from ._numpy import _save_npz as save_npz
57
57
  from ._optuna_study_as_csv_and_pngs import save_optuna_study_as_csv_and_pngs
58
- from ._pickle import (
59
- _save_pickle as save_pickle,
60
- )
61
- from ._pickle import (
62
- _save_pickle_gz as save_pickle_compressed,
63
- )
64
- from ._pltz_bundle import save_pltz_bundle
65
- from ._pltz_stx import save_pltz_as_stx
58
+ from ._pickle import _save_pickle as save_pickle
59
+ from ._pickle import _save_pickle_gz as save_pickle_compressed
60
+ from ._plot_bundle import save_plot_bundle
61
+ from ._plot_scitex import save_plot_as_scitex
66
62
  from ._stx_bundle import save_stx_bundle
67
63
  from ._symlink import symlink, symlink_to
68
64
  from ._tex import _save_tex as save_tex
@@ -121,8 +117,8 @@ __all__ = [
121
117
  "save_optuna_study_as_csv_and_pngs",
122
118
  # Bundle save functions
123
119
  "save_stx_bundle",
124
- "save_pltz_bundle",
125
- "save_pltz_as_stx",
120
+ "save_plot_bundle",
121
+ "save_plot_as_scitex",
126
122
  "save_separate_legends",
127
123
  "handle_image_with_csv",
128
124
  # Utilities
@@ -3,7 +3,7 @@
3
3
  # Timestamp: 2025-12-08
4
4
  # File: /home/ywatanabe/proj/scitex-code/src/scitex/io/_save_modules/_canvas.py
5
5
  """
6
- Save canvas directory (.canvas) for scitex.fig.
6
+ Save canvas directory (.canvas) for scitex.canvas.
7
7
 
8
8
  Canvas directories are portable figure bundles containing:
9
9
  - canvas.json: Layout, panels, composition settings
@@ -113,7 +113,7 @@ def _export_canvas_figures(
113
113
  formats = ["png", "pdf", "svg"]
114
114
 
115
115
  try:
116
- from scitex.fig.io.export import _compose_and_export
116
+ from scitex.canvas.io.export import _compose_and_export
117
117
  import json
118
118
 
119
119
  # Load canvas.json
@@ -136,7 +136,7 @@ def _export_canvas_figures(
136
136
  transparent=False,
137
137
  )
138
138
  except ImportError:
139
- # scitex.fig not available
139
+ # scitex.canvas not available
140
140
  pass
141
141
  except Exception as e:
142
142
  # Log but don't fail save if export fails