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
scitex/schema/__init__.py CHANGED
@@ -5,10 +5,10 @@
5
5
  SciTeX Schema Module - DEPRECATED
6
6
 
7
7
  This module is scheduled for removal. All schemas are being consolidated
8
- in scitex.fts as the single source of truth.
8
+ in scitex.io.bundle as the single source of truth.
9
9
 
10
- For new code, import from scitex.fts:
11
- from scitex.fts import FTS, Node, Encoding, Theme, Stats
10
+ For new code, import from scitex.io.bundle:
11
+ from scitex.io.bundle import FTS, Node, Encoding, Theme, Stats
12
12
 
13
13
  This module exists temporarily for backward compatibility.
14
14
  """
@@ -16,31 +16,28 @@ This module exists temporarily for backward compatibility.
16
16
  import warnings
17
17
 
18
18
  warnings.warn(
19
- "scitex.schema is deprecated. Import from scitex.fts instead. "
19
+ "scitex.schema is deprecated. Import from scitex.io.bundle instead. "
20
20
  "This module will be removed in a future version.",
21
21
  DeprecationWarning,
22
- stacklevel=2
22
+ stacklevel=2,
23
23
  )
24
24
 
25
25
  # Schema version
26
26
  SCHEMA_VERSION = "0.2.0"
27
27
 
28
28
  # =============================================================================
29
- # Re-export from scitex.fts (new single source of truth)
29
+ # Re-export from scitex.io.bundle (new single source of truth)
30
30
  # =============================================================================
31
31
  try:
32
- from scitex.fts import (
33
- # Core bundle classes
32
+ from scitex.io.bundle import ( # Core bundle classes; Encoding and Theme; Stats
34
33
  FTS,
35
- Node,
36
34
  BBox,
37
- SizeMM,
38
35
  DataInfo,
39
- # Encoding and Theme
40
36
  Encoding,
41
- Theme,
42
- # Stats
37
+ Node,
38
+ SizeMM,
43
39
  Stats,
40
+ Theme,
44
41
  )
45
42
  except ImportError:
46
43
  # FTS not fully configured yet
@@ -52,21 +49,10 @@ except ImportError:
52
49
 
53
50
  # =============================================================================
54
51
  # Independent schemas (still defined here temporarily)
55
- # These will be migrated to scitex.fts in subsequent phases
52
+ # These will be migrated to scitex.io.bundle in subsequent phases
56
53
  # =============================================================================
57
54
 
58
55
  # Stats schema (GUI-focused version - to be merged with FTS Stats)
59
- from scitex.schema._stats import (
60
- Position,
61
- PositionMode,
62
- StatPositioning,
63
- StatResult,
64
- StatStyling,
65
- SymbolStyle,
66
- UnitType,
67
- create_stat_result,
68
- )
69
-
70
56
  # Encoding schema
71
57
  from scitex.schema._encoding import (
72
58
  ENCODING_VERSION,
@@ -87,48 +73,58 @@ from scitex.schema._figure_elements import (
87
73
  generate_caption_markdown,
88
74
  )
89
75
 
90
- # Theme schema
91
- from scitex.schema._theme import (
92
- THEME_VERSION,
93
- ColorScheme,
94
- LegendStyle,
95
- LineDefaults,
96
- MarkerDefaults,
97
- PlotTheme,
98
- Typography,
99
- )
100
- from scitex.schema._theme import TraceStyle as ThemeTraceStyle
101
-
102
76
  # Plot schema
103
77
  from scitex.schema._plot import (
104
78
  DPI_FALLBACK,
105
79
  PLOT_GEOMETRY_VERSION,
106
80
  PLOT_SPEC_VERSION,
107
81
  PLOT_STYLE_VERSION,
82
+ AxesLabels,
83
+ AxesLimits,
84
+ AxesSpecItem,
108
85
  BboxPx,
109
86
  BboxRatio,
110
87
  CoordinateSpace,
88
+ DataSourceSpec,
89
+ FontSpec,
90
+ HitRegionEntry,
111
91
  LegendLocation,
92
+ LegendSpec,
93
+ PlotGeometry,
94
+ PlotSpec,
95
+ PlotStyle,
96
+ RenderedArtist,
97
+ RenderedAxes,
98
+ RenderManifest,
99
+ SelectableRegion,
100
+ SizeSpec,
101
+ ThemeSpec,
102
+ TraceSpec,
103
+ TraceStyleSpec,
112
104
  TraceType,
113
105
  )
114
- from scitex.schema._plot import AxesLabels as PltzAxesLabels
115
- from scitex.schema._plot import AxesLimits as PltzAxesLimits
116
- from scitex.schema._plot import AxesSpecItem as PltzAxesItem
117
- from scitex.schema._plot import DataSourceSpec as PltzDataSource
118
- from scitex.schema._plot import FontSpec as PltzFont
119
- from scitex.schema._plot import HitRegionEntry as PltzHitRegion
120
- from scitex.schema._plot import LegendSpec as PltzLegendSpec
121
- from scitex.schema._plot import PlotGeometry as PltzGeometry
122
- from scitex.schema._plot import PlotSpec as PltzSpec
123
- from scitex.schema._plot import PlotStyle as PltzStyle
124
- from scitex.schema._plot import RenderedArtist as PltzRenderedArtist
125
- from scitex.schema._plot import RenderedAxes as PltzRenderedAxes
126
- from scitex.schema._plot import RenderManifest as PltzRenderManifest
127
- from scitex.schema._plot import SelectableRegion as PltzSelectableRegion
128
- from scitex.schema._plot import SizeSpec as PltzSize
129
- from scitex.schema._plot import ThemeSpec as PltzTheme
130
- from scitex.schema._plot import TraceSpec as PltzTraceSpec
131
- from scitex.schema._plot import TraceStyleSpec as PltzTraceStyle
106
+ from scitex.schema._stats import (
107
+ Position,
108
+ PositionMode,
109
+ StatPositioning,
110
+ StatResult,
111
+ StatStyling,
112
+ SymbolStyle,
113
+ UnitType,
114
+ create_stat_result,
115
+ )
116
+
117
+ # Theme schema
118
+ from scitex.schema._theme import (
119
+ THEME_VERSION,
120
+ ColorScheme,
121
+ LegendStyle,
122
+ LineDefaults,
123
+ MarkerDefaults,
124
+ PlotTheme,
125
+ )
126
+ from scitex.schema._theme import TraceStyle as ThemeTraceStyle
127
+ from scitex.schema._theme import Typography
132
128
 
133
129
  # Validation (temporarily keep here)
134
130
  from scitex.schema._validation import (
@@ -164,24 +160,24 @@ __all__ = [
164
160
  "LegendLocation",
165
161
  "BboxRatio",
166
162
  "BboxPx",
167
- "PltzTraceSpec",
168
- "PltzAxesLimits",
169
- "PltzAxesLabels",
170
- "PltzAxesItem",
171
- "PltzDataSource",
172
- "PltzSpec",
173
- "PltzTraceStyle",
174
- "PltzTheme",
175
- "PltzFont",
176
- "PltzSize",
177
- "PltzLegendSpec",
178
- "PltzStyle",
179
- "PltzRenderedArtist",
180
- "PltzRenderedAxes",
181
- "PltzHitRegion",
182
- "PltzSelectableRegion",
183
- "PltzGeometry",
184
- "PltzRenderManifest",
163
+ "TraceSpec",
164
+ "AxesLimits",
165
+ "AxesLabels",
166
+ "AxesSpecItem",
167
+ "DataSourceSpec",
168
+ "PlotSpec",
169
+ "TraceStyleSpec",
170
+ "ThemeSpec",
171
+ "FontSpec",
172
+ "SizeSpec",
173
+ "LegendSpec",
174
+ "PlotStyle",
175
+ "RenderedArtist",
176
+ "RenderedAxes",
177
+ "HitRegionEntry",
178
+ "SelectableRegion",
179
+ "PlotGeometry",
180
+ "RenderManifest",
185
181
  # Encoding
186
182
  "ENCODING_VERSION",
187
183
  "ChannelBinding",
scitex/schema/_canvas.py CHANGED
@@ -327,7 +327,7 @@ class CanvasSpec:
327
327
  Complete specification for a SciTeX canvas.
328
328
 
329
329
  This is the wire format for canvas.json files.
330
- The Canvas class in scitex.fig provides the OO interface.
330
+ The Canvas class in scitex.canvas provides the OO interface.
331
331
 
332
332
  Examples
333
333
  --------
scitex/schema/_stats.py CHANGED
@@ -10,7 +10,7 @@ Statistical Result Schema - Central Source of Truth.
10
10
  This module defines the canonical schema for statistical test results
11
11
  that integrates with:
12
12
  - scitex.plt (TrackingMixin, metadata embedding)
13
- - scitex.fig (JSON serialization, FigureModel)
13
+ - scitex.canvas (JSON serialization, FigureModel)
14
14
  - scitex-cloud GUI (Fabric.js canvas, properties panel, positioning)
15
15
  - scitex.bridge (cross-module adapters)
16
16
 
@@ -272,7 +272,7 @@ class StatResult:
272
272
 
273
273
  This is the central schema for statistical results that integrates with:
274
274
  - scitex.plt: Automatic annotation via TrackingMixin
275
- - scitex.fig: JSON serialization for FigureModel
275
+ - scitex.canvas: JSON serialization for FigureModel
276
276
  - scitex-cloud GUI: Fabric.js canvas positioning and properties panel
277
277
  - scitex.bridge: Cross-module adapters
278
278
 
scitex/stats/__init__.py CHANGED
@@ -57,21 +57,21 @@ from .auto import (
57
57
  )
58
58
 
59
59
  # =============================================================================
60
- # Stats Schema - Use scitex.fts.Stats as single source of truth
60
+ # Stats Schema - Use scitex.io.bundle.Stats as single source of truth
61
61
  # =============================================================================
62
62
 
63
- # For backward compatibility, re-export from fts
63
+ # Re-export Stats from bundle module
64
64
  try:
65
- from scitex.fts import Stats
65
+ from scitex.io.bundle import Stats
66
66
 
67
- FTS_AVAILABLE = True
67
+ BUNDLE_AVAILABLE = True
68
68
  except ImportError:
69
69
  Stats = None
70
- FTS_AVAILABLE = False
70
+ BUNDLE_AVAILABLE = False
71
71
 
72
72
 
73
73
  def test_result_to_stats(result: dict) -> "Stats":
74
- """Convert test result dict to FTS Stats schema.
74
+ """Convert test result dict to Stats schema.
75
75
 
76
76
  Parameters
77
77
  ----------
@@ -92,26 +92,24 @@ def test_result_to_stats(result: dict) -> "Stats":
92
92
  Returns
93
93
  -------
94
94
  Stats
95
- FTS Stats object suitable for bundle storage
95
+ Stats object suitable for bundle storage
96
96
 
97
97
  Example
98
98
  -------
99
99
  >>> result = stats.t_test(x, y)
100
- >>> fts_stats = stats.test_result_to_stats(result)
101
- >>> bundle.stats = fts_stats
100
+ >>> stat_obj = stats.test_result_to_stats(result)
101
+ >>> bundle.stats = stat_obj
102
102
  """
103
- if not FTS_AVAILABLE:
104
- raise ImportError("scitex.fts is required for Stats conversion")
103
+ if not BUNDLE_AVAILABLE:
104
+ raise ImportError("scitex.io.bundle is required for Stats conversion")
105
105
 
106
106
  import uuid
107
107
 
108
- from scitex.fts._stats._dataclasses._Stats import (
108
+ from scitex.io.bundle._stats._dataclasses._Stats import (
109
109
  Analysis,
110
110
  EffectSize,
111
111
  StatMethod,
112
- )
113
- from scitex.fts._stats._dataclasses._Stats import (
114
- StatResult as FTSStatResult,
112
+ StatResult,
115
113
  )
116
114
 
117
115
  # Handle legacy flat format vs new nested format
@@ -134,7 +132,7 @@ def test_result_to_stats(result: dict) -> "Stats":
134
132
  ci_lower=ci[0] if len(ci) > 0 else None,
135
133
  ci_upper=ci[1] if len(ci) > 1 else None,
136
134
  )
137
- stat_result = FTSStatResult(
135
+ stat_result = StatResult(
138
136
  statistic=result.get("statistic", 0.0),
139
137
  statistic_name=result.get("statistic_name", ""),
140
138
  p_value=result.get("p_value", 1.0),
@@ -164,7 +162,7 @@ def test_result_to_stats(result: dict) -> "Stats":
164
162
  ci_upper=es.get("ci_upper"),
165
163
  )
166
164
 
167
- stat_result = FTSStatResult(
165
+ stat_result = StatResult(
168
166
  statistic=results_data.get("statistic", 0.0),
169
167
  statistic_name=results_data.get("statistic_name", ""),
170
168
  p_value=results_data.get("p_value", 1.0),
@@ -189,25 +187,25 @@ def test_result_to_stats(result: dict) -> "Stats":
189
187
 
190
188
 
191
189
  # =============================================================================
192
- # .statsz Bundle Support - Using FTS
190
+ # .stats Bundle Support
193
191
  # =============================================================================
194
192
 
195
193
 
196
- def save_statsz(
194
+ def save_stats(
197
195
  comparisons,
198
196
  path,
199
197
  metadata=None,
200
198
  as_zip=False,
201
199
  ):
202
200
  """
203
- Save statistical results as an FTS bundle.
201
+ Save statistical results as a SciTeX bundle.
204
202
 
205
203
  Parameters
206
204
  ----------
207
205
  comparisons : list of dict
208
206
  List of comparison results.
209
207
  path : str or Path
210
- Output path (e.g., "results.zip").
208
+ Output path (e.g., "results.stats" or "results.stats.zip").
211
209
  metadata : dict, optional
212
210
  Additional metadata.
213
211
  as_zip : bool, optional
@@ -220,14 +218,14 @@ def save_statsz(
220
218
  """
221
219
  from pathlib import Path
222
220
 
223
- from scitex.fts import FTS
221
+ from scitex.io.bundle import Bundle
224
222
 
225
223
  p = Path(path)
226
224
  if as_zip and not p.suffix == ".zip":
227
225
  p = p.with_suffix(".zip")
228
226
 
229
- # Create FTS bundle
230
- bundle = FTS(p, create=True, node_type="stats")
227
+ # Create bundle
228
+ bundle = Bundle(p, create=True, bundle_type="stats")
231
229
 
232
230
  # Convert comparisons to Stats
233
231
  if comparisons:
@@ -246,14 +244,14 @@ def save_statsz(
246
244
  return p
247
245
 
248
246
 
249
- def load_statsz(path):
247
+ def load_stats(path):
250
248
  """
251
- Load a stats bundle using FTS.
249
+ Load a stats bundle.
252
250
 
253
251
  Parameters
254
252
  ----------
255
253
  path : str or Path
256
- Path to bundle.
254
+ Path to bundle (.stats or .stats.zip).
257
255
 
258
256
  Returns
259
257
  -------
@@ -262,9 +260,9 @@ def load_statsz(path):
262
260
  Each comparison is a flat dict with:
263
261
  - name, method, p_value, effect_size, ci95, formatted
264
262
  """
265
- from scitex.fts import FTS
263
+ from scitex.io.bundle import Bundle
266
264
 
267
- bundle = FTS(path)
265
+ bundle = Bundle(path)
268
266
 
269
267
  comparisons = []
270
268
  if bundle.stats and bundle.stats.analyses:
@@ -317,9 +315,8 @@ __all__ = [
317
315
  "describe",
318
316
  # Torch availability flag (for GPU acceleration)
319
317
  "TORCH_AVAILABLE",
320
- # Stats schema (from FTS)
318
+ # Stats schema
321
319
  "Stats",
322
- "FTS_AVAILABLE",
323
320
  # Auto module convenience exports
324
321
  "StatContext",
325
322
  "TestRule",
@@ -334,8 +331,8 @@ __all__ = [
334
331
  # Conversion utilities
335
332
  "test_result_to_stats",
336
333
  # Bundle functions
337
- "save_statsz",
338
- "load_statsz",
334
+ "save_stats",
335
+ "load_stats",
339
336
  ]
340
337
 
341
338
  __version__ = "2.2.0"
scitex/stats/_schema.py CHANGED
@@ -7,7 +7,7 @@ Statistical Result Schema - DEPRECATED
7
7
  This module is deprecated. Import from scitex.schema._stats instead:
8
8
  from scitex.schema._stats import Position, StatStyling, StatPositioning, StatResult
9
9
 
10
- For the new simplified API, use scitex.fts._stats.
10
+ For the new simplified API, use scitex.io.bundle._stats.
11
11
  """
12
12
 
13
13
  import warnings
@@ -1,29 +1,28 @@
1
1
  #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
2
  # Timestamp: "2025-12-13 (ywatanabe)"
4
3
  # File: /home/ywatanabe/proj/scitex-code/src/scitex/stats/io/__init__.py
5
4
 
6
5
  """
7
- I/O operations for scitex.stats - Statistical results bundles (.statsz).
6
+ I/O operations for scitex.stats - Statistical results bundles (.stats).
8
7
 
9
8
  This module handles:
10
- - .statsz bundle load/save operations
9
+ - .stats bundle load/save operations
11
10
  - Statistical comparison metadata
12
11
  - P-value and effect size validation
13
12
  """
14
13
 
15
14
  from ._bundle import (
16
- validate_statsz_spec,
17
- load_statsz_bundle,
18
- save_statsz_bundle,
19
- STATSZ_SCHEMA_SPEC,
15
+ STATS_SCHEMA_SPEC,
16
+ load_stats_bundle,
17
+ save_stats_bundle,
18
+ validate_stats_spec,
20
19
  )
21
20
 
22
21
  __all__ = [
23
- "validate_statsz_spec",
24
- "load_statsz_bundle",
25
- "save_statsz_bundle",
26
- "STATSZ_SCHEMA_SPEC",
22
+ "validate_stats_spec",
23
+ "load_stats_bundle",
24
+ "save_stats_bundle",
25
+ "STATS_SCHEMA_SPEC",
27
26
  ]
28
27
 
29
28
  # EOF
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
2
  # Timestamp: "2025-12-13 (ywatanabe)"
4
3
  # File: /home/ywatanabe/proj/scitex-code/src/scitex/stats/io/_bundle.py
5
4
 
6
5
  """
7
- SciTeX .statsz Bundle I/O - Statistics-specific bundle operations.
6
+ SciTeX .stats Bundle I/O - Statistics-specific bundle operations.
8
7
 
9
8
  Handles:
10
9
  - Statistical results specification validation
@@ -17,14 +16,14 @@ from pathlib import Path
17
16
  from typing import Any, Dict, List
18
17
 
19
18
  __all__ = [
20
- "validate_statsz_spec",
21
- "load_statsz_bundle",
22
- "save_statsz_bundle",
23
- "STATSZ_SCHEMA_SPEC",
19
+ "validate_stats_spec",
20
+ "load_stats_bundle",
21
+ "save_stats_bundle",
22
+ "STATS_SCHEMA_SPEC",
24
23
  ]
25
24
 
26
- # Schema specification for .statsz bundles
27
- STATSZ_SCHEMA_SPEC = {
25
+ # Schema specification for .stats bundles
26
+ STATS_SCHEMA_SPEC = {
28
27
  "name": "scitex.stats.stats",
29
28
  "version": "1.0.0",
30
29
  "required_fields": ["schema"],
@@ -32,8 +31,8 @@ STATSZ_SCHEMA_SPEC = {
32
31
  }
33
32
 
34
33
 
35
- def validate_statsz_spec(spec: Dict[str, Any]) -> List[str]:
36
- """Validate .statsz-specific fields.
34
+ def validate_stats_spec(spec: Dict[str, Any]) -> List[str]:
35
+ """Validate .stats-specific fields.
37
36
 
38
37
  Args:
39
38
  spec: The specification dictionary to validate.
@@ -91,8 +90,8 @@ def validate_statsz_spec(spec: Dict[str, Any]) -> List[str]:
91
90
  return errors
92
91
 
93
92
 
94
- def load_statsz_bundle(bundle_dir: Path) -> Dict[str, Any]:
95
- """Load .statsz bundle contents from directory.
93
+ def load_stats_bundle(bundle_dir: Path) -> Dict[str, Any]:
94
+ """Load .stats bundle contents from directory.
96
95
 
97
96
  Args:
98
97
  bundle_dir: Path to the bundle directory.
@@ -105,7 +104,7 @@ def load_statsz_bundle(bundle_dir: Path) -> Dict[str, Any]:
105
104
  # Load specification
106
105
  spec_file = bundle_dir / "stats.json"
107
106
  if spec_file.exists():
108
- with open(spec_file, "r") as f:
107
+ with open(spec_file) as f:
109
108
  result["spec"] = json.load(f)
110
109
  else:
111
110
  result["spec"] = None
@@ -115,16 +114,17 @@ def load_statsz_bundle(bundle_dir: Path) -> Dict[str, Any]:
115
114
  if data_file.exists():
116
115
  try:
117
116
  import pandas as pd
117
+
118
118
  result["data"] = pd.read_csv(data_file)
119
119
  except ImportError:
120
- with open(data_file, "r") as f:
120
+ with open(data_file) as f:
121
121
  result["data"] = f.read()
122
122
 
123
123
  return result
124
124
 
125
125
 
126
- def save_statsz_bundle(data: Dict[str, Any], dir_path: Path) -> None:
127
- """Save .statsz bundle contents to directory.
126
+ def save_stats_bundle(data: Dict[str, Any], dir_path: Path) -> None:
127
+ """Save .stats bundle contents to directory.
128
128
 
129
129
  Args:
130
130
  data: Bundle data dictionary.