scitex 2.10.2__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.
- scitex/__init__.py +1 -4
- scitex/__version__.py +1 -1
- scitex/_install_guide.py +14 -2
- scitex/bridge/_figrecipe.py +1 -1
- scitex/bridge/_helpers.py +1 -1
- scitex/bridge/_plt_vis.py +1 -1
- scitex/bridge/_stats_plt.py +1 -1
- scitex/bridge/_stats_vis.py +2 -2
- scitex/{fig → canvas}/__init__.py +84 -96
- scitex/{fig → canvas}/backend/_parser.py +1 -1
- scitex/{fig → canvas}/canvas.py +13 -14
- scitex/{fts/_fig/_editor → canvas/editor}/_defaults.py +2 -2
- scitex/{fig → canvas}/editor/edit/__init__.py +11 -14
- scitex/{fig → canvas}/editor/edit/bundle_resolver.py +56 -48
- scitex/{fig → canvas}/editor/edit/editor_launcher.py +79 -26
- scitex/{fts/_fig/_editor/_cui/_panel_loader.py → canvas/editor/edit/panel_loader.py} +8 -8
- scitex/{fts/_fig/_editor/_gui/_flask_editor → canvas/editor/flask_editor}/_bbox.py +2 -1
- scitex/{fts/_fig/_editor/_gui/_flask_editor → canvas/editor/flask_editor}/_core.py +84 -84
- scitex/{fts/_fig/_editor/_gui/_flask_editor → canvas/editor/flask_editor}/_renderer.py +7 -6
- scitex/{fts/_fig/_editor/_gui/_flask_editor → canvas/editor/flask_editor}/static/css/features/canvas.css +2 -2
- scitex/{fig → canvas}/editor/flask_editor/static/css/features/panel-grid.css +1 -1
- scitex/{fig → canvas}/editor/flask_editor/static/js/core/api.js +3 -4
- scitex/{fig → canvas}/editor/flask_editor/static/js/editor/preview.js +5 -5
- scitex/{fig → canvas}/editor/flask_editor/templates/_html.py +3 -3
- scitex/{fig → canvas}/editor/flask_editor/templates/_scripts.py +10 -10
- scitex/{fig → canvas}/editor/flask_editor/templates/_styles.py +3 -3
- scitex/{fig → canvas}/io/__init__.py +32 -38
- scitex/{fig → canvas}/io/_bundle.py +217 -154
- scitex/{fig → canvas}/io/_canvas.py +1 -1
- scitex/{fig → canvas}/io/_data.py +1 -1
- scitex/{fig → canvas}/io/_export.py +1 -1
- scitex/{fig → canvas}/io/_load.py +1 -1
- scitex/{fig → canvas}/io/_panel.py +1 -1
- scitex/{fig → canvas}/io/_save.py +1 -1
- scitex/{fig → canvas}/model/__init__.py +1 -1
- scitex/{fig → canvas}/model/_annotations.py +1 -1
- scitex/{fig → canvas}/model/_axes.py +1 -1
- scitex/{fig → canvas}/model/_figure.py +1 -1
- scitex/{fig → canvas}/model/_guides.py +1 -1
- scitex/{fig → canvas}/model/_plot.py +1 -1
- scitex/{fig → canvas}/model/_styles.py +1 -1
- scitex/{fig → canvas}/utils/__init__.py +1 -1
- scitex/cli/convert.py +10 -6
- scitex/diagram/README.md +7 -7
- scitex/io/__init__.py +7 -19
- scitex/io/_load.py +15 -19
- scitex/io/_load_modules/_canvas.py +2 -2
- scitex/io/_load_modules/_con.py +5 -5
- scitex/io/_load_modules/_eeg.py +16 -12
- scitex/io/_save.py +11 -16
- scitex/io/_save_modules/__init__.py +6 -10
- scitex/io/_save_modules/_canvas.py +3 -3
- scitex/io/_save_modules/_plot_bundle.py +112 -0
- scitex/io/_save_modules/{_pltz_stx.py → _plot_scitex.py} +7 -7
- scitex/io/_save_modules/_stx_bundle.py +16 -16
- scitex/io/bundle/README.md +89 -80
- scitex/{fts/_bundle/_FTS.py → io/bundle/_Bundle.py} +197 -95
- scitex/io/bundle/__init__.py +67 -35
- scitex/{fts/_bundle → io/bundle}/_children.py +32 -40
- scitex/io/bundle/_core.py +184 -97
- scitex/{fts/_bundle/_dataclasses/_Node.py → io/bundle/_dataclasses/_Spec.py} +29 -23
- scitex/{fts/_bundle/_dataclasses/_NodeRefs.py → io/bundle/_dataclasses/_SpecRefs.py} +6 -6
- scitex/{fts/_bundle → io/bundle}/_dataclasses/__init__.py +4 -4
- scitex/{fts/_bundle → io/bundle}/_loader.py +19 -19
- scitex/io/bundle/_manifest.py +99 -0
- scitex/{fts/_bundle → io/bundle}/_mpl_helpers.py +119 -28
- scitex/io/bundle/_nested.py +113 -100
- scitex/{fts/_bundle → io/bundle}/_saver.py +13 -14
- scitex/{fts/_bundle → io/bundle}/_storage.py +3 -3
- scitex/io/bundle/_types.py +41 -16
- scitex/{fts/_bundle → io/bundle}/_validation.py +20 -18
- scitex/io/bundle/_zip.py +21 -31
- scitex/{fts/_kinds → io/bundle/kinds}/_plot/_backend/_parser.py +1 -1
- scitex/{fts/_kinds → io/bundle/kinds}/_plot/_models/_Annotations.py +1 -1
- scitex/{fts/_kinds → io/bundle/kinds}/_plot/_models/_Axes.py +1 -1
- scitex/{fts/_kinds → io/bundle/kinds}/_plot/_models/_Figure.py +1 -1
- scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_Guides.py +1 -1
- scitex/{fts/_kinds → io/bundle/kinds}/_plot/_models/_Plot.py +1 -1
- scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_Styles.py +1 -1
- scitex/{fts/_kinds → io/bundle/kinds}/_plot/_utils/_plot_layout.py +1 -1
- scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/__init__.py +1 -1
- scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_editor/_app.py +1 -1
- scitex/{fts/_tables → io/bundle/kinds/_table}/_latex/_export.py +1 -1
- scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_figure_exporter.py +1 -1
- scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_table_exporter.py +1 -1
- scitex/io/bundle/schemas/__init__.py +30 -0
- scitex/parallel/_run.py +5 -4
- scitex/path/_find.py +60 -83
- scitex/path/_get_module_path.py +23 -21
- scitex/path/_get_spath.py +6 -27
- scitex/path/_getsize.py +23 -9
- scitex/path/_increment_version.py +31 -38
- scitex/path/_mk_spath.py +26 -29
- scitex/path/_path.py +5 -12
- scitex/path/_split.py +27 -15
- scitex/path/_this_path.py +23 -9
- scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/__init__.py +2 -1
- scitex/plt/_subplots/_AxisWrapperMixins/__init__.py +2 -2
- scitex/plt/gallery/_generate.py +76 -50
- scitex/plt/io/__init__.py +17 -19
- scitex/plt/io/_bundle.py +99 -52
- scitex/plt/io/_layered_bundle.py +303 -168
- scitex/plt/utils/_csv_column_naming.py +250 -118
- scitex/schema/__init__.py +69 -73
- scitex/schema/_canvas.py +1 -1
- scitex/schema/_stats.py +2 -2
- scitex/stats/__init__.py +30 -33
- scitex/stats/_schema.py +1 -1
- scitex/stats/io/__init__.py +10 -11
- scitex/stats/io/_bundle.py +16 -16
- {scitex-2.10.2.dist-info → scitex-2.11.0.dist-info}/METADATA +191 -72
- {scitex-2.10.2.dist-info → scitex-2.11.0.dist-info}/RECORD +237 -360
- scitex/fig/editor/_defaults.py +0 -300
- scitex/fig/editor/edit/panel_loader.py +0 -232
- scitex/fig/editor/flask_editor/_bbox.py +0 -1299
- scitex/fig/editor/flask_editor/_core.py +0 -1429
- scitex/fig/editor/flask_editor/_renderer.py +0 -813
- scitex/fig/editor/flask_editor/static/css/features/canvas.css +0 -176
- scitex/fts/README.md +0 -262
- scitex/fts/TODO.md +0 -66
- scitex/fts/__init__.py +0 -90
- scitex/fts/_bundle/README_IN_BUNDLE.md +0 -102
- scitex/fts/_bundle/__init__.py +0 -38
- scitex/fts/_bundle/_utils/__init__.py +0 -55
- scitex/fts/_bundle/_utils/_const.py +0 -26
- scitex/fts/_bundle/_utils/_errors.py +0 -73
- scitex/fts/_bundle/_utils/_generate.py +0 -21
- scitex/fts/_bundle/_utils/_types.py +0 -76
- scitex/fts/_bundle/_zipbundle.py +0 -165
- scitex/fts/_fig/__init__.py +0 -22
- scitex/fts/_fig/_backend/_parser.py +0 -188
- scitex/fts/_fig/_editor/__init__.py +0 -14
- scitex/fts/_fig/_editor/_cui/__init__.py +0 -33
- scitex/fts/_fig/_editor/_cui/_backend_detector.py +0 -39
- scitex/fts/_fig/_editor/_cui/_bundle_resolver.py +0 -366
- scitex/fts/_fig/_editor/_cui/_editor_launcher.py +0 -175
- scitex/fts/_fig/_editor/_cui/_manual_handler.py +0 -52
- scitex/fts/_fig/_editor/_cui/_path_resolver.py +0 -66
- scitex/fts/_fig/_editor/_gui/__init__.py +0 -11
- scitex/fts/_fig/_editor/_gui/_flask_editor/__init__.py +0 -20
- scitex/fts/_fig/_editor/_gui/_flask_editor/_plotter.py +0 -664
- scitex/fts/_fig/_editor/_gui/_flask_editor/_utils.py +0 -79
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/base/reset.css +0 -41
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/base/typography.css +0 -16
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/base/variables.css +0 -85
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/buttons.css +0 -217
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/context-menu.css +0 -93
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/dropdown.css +0 -57
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/forms.css +0 -112
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/modal.css +0 -59
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/components/sections.css +0 -212
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/element-inspector.css +0 -190
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/loading.css +0 -59
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/overlay.css +0 -45
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/panel-grid.css +0 -95
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/selection.css +0 -101
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/features/statistics.css +0 -138
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/index.css +0 -31
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/layout/container.css +0 -7
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/layout/controls.css +0 -56
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/css/layout/preview.css +0 -78
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/alignment/axis.js +0 -314
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/alignment/basic.js +0 -107
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/alignment/distribute.js +0 -54
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/canvas/canvas.js +0 -172
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/canvas/dragging.js +0 -258
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/canvas/resize.js +0 -48
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/canvas/selection.js +0 -71
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/core/api.js +0 -288
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/core/state.js +0 -143
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/core/utils.js +0 -245
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/dev/element-inspector.js +0 -992
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/editor/bbox.js +0 -339
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/editor/element-drag.js +0 -286
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/editor/overlay.js +0 -371
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/editor/preview.js +0 -293
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/main.js +0 -426
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/shortcuts/context-menu.js +0 -152
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/shortcuts/keyboard.js +0 -265
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/ui/controls.js +0 -184
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/ui/download.js +0 -57
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/ui/help.js +0 -100
- scitex/fts/_fig/_editor/_gui/_flask_editor/static/js/ui/theme.js +0 -34
- scitex/fts/_fig/_editor/_gui/_flask_editor/templates/__init__.py +0 -124
- scitex/fts/_fig/_editor/_gui/_flask_editor/templates/_html.py +0 -851
- scitex/fts/_fig/_editor/_gui/_flask_editor/templates/_scripts.py +0 -4932
- scitex/fts/_fig/_editor/_gui/_flask_editor/templates/_styles.py +0 -1657
- scitex/fts/_fig/_editor/_gui/_flask_editor.py +0 -36
- scitex/fts/_fig/_models/_Annotations.py +0 -115
- scitex/fts/_fig/_models/_Axes.py +0 -152
- scitex/fts/_fig/_models/_Figure.py +0 -138
- scitex/fts/_fig/_models/_Plot.py +0 -123
- scitex/fts/_fig/_utils/_plot_layout.py +0 -397
- scitex/fts/_kinds/_figure/_composite.py +0 -345
- scitex/fts/_kinds/_plot/_backend/__init__.py +0 -53
- scitex/fts/_kinds/_plot/_backend/_export.py +0 -165
- scitex/fts/_kinds/_plot/_backend/_render.py +0 -538
- scitex/fts/_kinds/_plot/_dataclasses/_ChannelEncoding.py +0 -46
- scitex/fts/_kinds/_plot/_dataclasses/_Encoding.py +0 -82
- scitex/fts/_kinds/_plot/_dataclasses/_Theme.py +0 -441
- scitex/fts/_kinds/_plot/_dataclasses/_TraceEncoding.py +0 -52
- scitex/fts/_kinds/_plot/_dataclasses/__init__.py +0 -47
- scitex/fts/_kinds/_plot/_models/_Guides.py +0 -104
- scitex/fts/_kinds/_plot/_models/_Styles.py +0 -245
- scitex/fts/_kinds/_plot/_models/__init__.py +0 -80
- scitex/fts/_kinds/_plot/_models/_plot_types/__init__.py +0 -156
- scitex/fts/_kinds/_plot/_models/_plot_types/_bar.py +0 -43
- scitex/fts/_kinds/_plot/_models/_plot_types/_box.py +0 -38
- scitex/fts/_kinds/_plot/_models/_plot_types/_distribution.py +0 -36
- scitex/fts/_kinds/_plot/_models/_plot_types/_errorbar.py +0 -60
- scitex/fts/_kinds/_plot/_models/_plot_types/_histogram.py +0 -30
- scitex/fts/_kinds/_plot/_models/_plot_types/_image.py +0 -61
- scitex/fts/_kinds/_plot/_models/_plot_types/_line.py +0 -57
- scitex/fts/_kinds/_plot/_models/_plot_types/_scatter.py +0 -30
- scitex/fts/_kinds/_plot/_models/_plot_types/_seaborn.py +0 -121
- scitex/fts/_kinds/_plot/_models/_plot_types/_violin.py +0 -36
- scitex/fts/_kinds/_plot/_utils/__init__.py +0 -129
- scitex/fts/_kinds/_plot/_utils/_auto_layout.py +0 -127
- scitex/fts/_kinds/_plot/_utils/_calc_bounds.py +0 -111
- scitex/fts/_kinds/_plot/_utils/_const_sizes.py +0 -48
- scitex/fts/_kinds/_plot/_utils/_convert_coords.py +0 -77
- scitex/fts/_kinds/_plot/_utils/_get_template.py +0 -178
- scitex/fts/_kinds/_plot/_utils/_normalize.py +0 -73
- scitex/fts/_kinds/_plot/_utils/_validate.py +0 -197
- scitex/fts/_kinds/_table/_latex/_export.py +0 -279
- scitex/fts/_stats/__init__.py +0 -48
- scitex/fts/_stats/_dataclasses/_Stats.py +0 -423
- scitex/fts/_stats/_dataclasses/__init__.py +0 -48
- scitex/fts/_tables/__init__.py +0 -65
- scitex/fts/_tables/_latex/__init__.py +0 -93
- scitex/fts/_tables/_latex/_editor/__init__.py +0 -11
- scitex/fts/_tables/_latex/_editor/_app.py +0 -725
- scitex/fts/_tables/_latex/_figure_exporter.py +0 -153
- scitex/fts/_tables/_latex/_stats_formatter.py +0 -274
- scitex/fts/_tables/_latex/_table_exporter.py +0 -362
- scitex/fts/_tables/_latex/_utils.py +0 -369
- scitex/fts/_tables/_latex/_validator.py +0 -445
- scitex/io/_save_modules/_pltz_bundle.py +0 -356
- /scitex/{fig → canvas}/README.md +0 -0
- /scitex/{fig → canvas}/backend/__init__.py +0 -0
- /scitex/{fig → canvas}/backend/_export.py +0 -0
- /scitex/{fig → canvas}/backend/_render.py +0 -0
- /scitex/{fig → canvas}/docs/CANVAS_ARCHITECTURE.md +0 -0
- /scitex/{fig → canvas}/editor/__init__.py +0 -0
- /scitex/{fig → canvas}/editor/_dearpygui_editor.py +0 -0
- /scitex/{fig → canvas}/editor/_flask_editor.py +0 -0
- /scitex/{fig → canvas}/editor/_mpl_editor.py +0 -0
- /scitex/{fig → canvas}/editor/_qt_editor.py +0 -0
- /scitex/{fig → canvas}/editor/_tkinter_editor.py +0 -0
- /scitex/{fig → canvas}/editor/edit/backend_detector.py +0 -0
- /scitex/{fig → canvas}/editor/edit/manual_handler.py +0 -0
- /scitex/{fig → canvas}/editor/edit/path_resolver.py +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/__init__.py +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/_plotter.py +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/_utils.py +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/base/reset.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/base/typography.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/base/variables.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/components/buttons.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/components/context-menu.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/components/dropdown.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/components/forms.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/components/modal.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/components/sections.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/features/element-inspector.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/features/loading.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/features/overlay.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/features/selection.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/features/statistics.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/index.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/layout/container.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/layout/controls.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/css/layout/preview.css +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/alignment/axis.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/alignment/basic.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/alignment/distribute.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/canvas/canvas.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/canvas/dragging.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/canvas/resize.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/canvas/selection.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/core/state.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/core/utils.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/dev/element-inspector.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/editor/bbox.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/editor/element-drag.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/editor/overlay.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/main.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/shortcuts/context-menu.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/shortcuts/keyboard.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/ui/controls.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/ui/download.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/ui/help.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/static/js/ui/theme.js +0 -0
- /scitex/{fig → canvas}/editor/flask_editor/templates/__init__.py +0 -0
- /scitex/{fig → canvas}/io/_directory.py +0 -0
- /scitex/{fig → canvas}/model/_plot_types.py +0 -0
- /scitex/{fig → canvas}/utils/_defaults.py +0 -0
- /scitex/{fig → canvas}/utils/_validate.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_conversion/__init__.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_conversion/_bundle2dict.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_conversion/_dict2bundle.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_dataclasses/_Axes.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_dataclasses/_BBox.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_dataclasses/_ColumnDef.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_dataclasses/_DataFormat.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_dataclasses/_DataInfo.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_dataclasses/_DataSource.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_dataclasses/_SizeMM.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_extractors/__init__.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_extractors/_extract_bar.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_extractors/_extract_line.py +0 -0
- /scitex/{fts/_bundle → io/bundle}/_extractors/_extract_scatter.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/__init__.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_figure/__init__.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_figure}/_composite.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_plot/__init__.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_backend/__init__.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_backend/_export.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_backend/_render.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_dataclasses/_ChannelEncoding.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_dataclasses/_Encoding.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_dataclasses/_Theme.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_dataclasses/_TraceEncoding.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_dataclasses/__init__.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/__init__.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/__init__.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_bar.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_box.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_distribution.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_errorbar.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_histogram.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_image.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_line.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_scatter.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_seaborn.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_models/_plot_types/_violin.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/__init__.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_auto_layout.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_calc_bounds.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_const_sizes.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_convert_coords.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_get_template.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_normalize.py +0 -0
- /scitex/{fts/_fig → io/bundle/kinds/_plot}/_utils/_validate.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_shape/__init__.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_stats/__init__.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_stats/_dataclasses/_Stats.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_stats/_dataclasses/__init__.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_table/__init__.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_editor/__init__.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_stats_formatter.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_utils.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_table/_latex/_validator.py +0 -0
- /scitex/{fts/_kinds → io/bundle/kinds}/_text/__init__.py +0 -0
- /scitex/{fts/_schemas → io/bundle/schemas}/data_info.schema.json +0 -0
- /scitex/{fts/_schemas → io/bundle/schemas}/encoding.schema.json +0 -0
- /scitex/{fts/_schemas → io/bundle/schemas}/node.schema.json +0 -0
- /scitex/{fts/_schemas → io/bundle/schemas}/render_manifest.schema.json +0 -0
- /scitex/{fts/_schemas → io/bundle/schemas}/stats.schema.json +0 -0
- /scitex/{fts/_schemas → io/bundle/schemas}/theme.schema.json +0 -0
- {scitex-2.10.2.dist-info → scitex-2.11.0.dist-info}/WHEEL +0 -0
- {scitex-2.10.2.dist-info → scitex-2.11.0.dist-info}/entry_points.txt +0 -0
- {scitex-2.10.2.dist-info → scitex-2.11.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# Timestamp: 2025-12-20
|
|
3
|
-
# File: /home/ywatanabe/proj/scitex-code/src/scitex/fsb/_tables/_latex/_export.py
|
|
4
|
-
|
|
5
|
-
"""Main LaTeX export orchestration for FTS bundles."""
|
|
6
|
-
|
|
7
|
-
from dataclasses import dataclass, field
|
|
8
|
-
from pathlib import Path
|
|
9
|
-
from typing import TYPE_CHECKING, List, Optional, Union
|
|
10
|
-
|
|
11
|
-
from ._figure_exporter import FigureExportOptions, export_figure_to_latex, generate_figure_preamble
|
|
12
|
-
from ._stats_formatter import FormattedStat, format_stat_note, format_stats_for_latex
|
|
13
|
-
from ._table_exporter import TableExportOptions, export_table_to_latex, generate_table_preamble
|
|
14
|
-
from ._validator import LaTeXError, ValidationResult, validate_latex
|
|
15
|
-
|
|
16
|
-
if TYPE_CHECKING:
|
|
17
|
-
from scitex.fts import FTS
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@dataclass
|
|
21
|
-
class LaTeXExportOptions:
|
|
22
|
-
"""Options for LaTeX export.
|
|
23
|
-
|
|
24
|
-
Attributes:
|
|
25
|
-
validate: Whether to validate output
|
|
26
|
-
validation_level: Validation level ("syntax", "semantic", "compile")
|
|
27
|
-
include_preamble: Include required packages in output
|
|
28
|
-
figure_options: Options for figure export
|
|
29
|
-
table_options: Options for table export
|
|
30
|
-
output_path: Where to save the .tex file
|
|
31
|
-
"""
|
|
32
|
-
|
|
33
|
-
validate: bool = True
|
|
34
|
-
validation_level: str = "syntax"
|
|
35
|
-
include_preamble: bool = False
|
|
36
|
-
figure_options: Optional[FigureExportOptions] = None
|
|
37
|
-
table_options: Optional[TableExportOptions] = None
|
|
38
|
-
output_path: Optional[Path] = None
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@dataclass
|
|
42
|
-
class LaTeXResult:
|
|
43
|
-
"""Result of LaTeX export.
|
|
44
|
-
|
|
45
|
-
Attributes:
|
|
46
|
-
latex_code: Generated LaTeX code
|
|
47
|
-
preamble: Required preamble packages
|
|
48
|
-
validation: Validation result
|
|
49
|
-
output_path: Path where file was saved (if applicable)
|
|
50
|
-
stats: Formatted statistics (if applicable)
|
|
51
|
-
"""
|
|
52
|
-
|
|
53
|
-
latex_code: str
|
|
54
|
-
preamble: str = ""
|
|
55
|
-
validation: Optional[ValidationResult] = None
|
|
56
|
-
output_path: Optional[Path] = None
|
|
57
|
-
stats: List[FormattedStat] = field(default_factory=list)
|
|
58
|
-
|
|
59
|
-
@property
|
|
60
|
-
def is_valid(self) -> bool:
|
|
61
|
-
"""Check if export is valid."""
|
|
62
|
-
return self.validation is None or self.validation.is_valid
|
|
63
|
-
|
|
64
|
-
@property
|
|
65
|
-
def errors(self) -> List[LaTeXError]:
|
|
66
|
-
"""Get validation errors."""
|
|
67
|
-
if self.validation:
|
|
68
|
-
return self.validation.errors
|
|
69
|
-
return []
|
|
70
|
-
|
|
71
|
-
@property
|
|
72
|
-
def warnings(self) -> List[LaTeXError]:
|
|
73
|
-
"""Get validation warnings."""
|
|
74
|
-
if self.validation:
|
|
75
|
-
return self.validation.warnings
|
|
76
|
-
return []
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
def export_to_latex(
|
|
80
|
-
bundle: "FTS",
|
|
81
|
-
options: Optional[LaTeXExportOptions] = None,
|
|
82
|
-
) -> LaTeXResult:
|
|
83
|
-
"""Export an FTS bundle to LaTeX.
|
|
84
|
-
|
|
85
|
-
Automatically detects bundle type and uses appropriate exporter.
|
|
86
|
-
|
|
87
|
-
Args:
|
|
88
|
-
bundle: FTS bundle
|
|
89
|
-
options: Export options
|
|
90
|
-
|
|
91
|
-
Returns:
|
|
92
|
-
LaTeXResult with code, validation, and metadata
|
|
93
|
-
"""
|
|
94
|
-
if options is None:
|
|
95
|
-
options = LaTeXExportOptions()
|
|
96
|
-
|
|
97
|
-
node_type = bundle.node.type
|
|
98
|
-
latex_code = ""
|
|
99
|
-
preamble_parts = []
|
|
100
|
-
stats = []
|
|
101
|
-
|
|
102
|
-
# Export based on type
|
|
103
|
-
if node_type in ("figure", "plot", "image"):
|
|
104
|
-
latex_code = export_figure_to_latex(
|
|
105
|
-
bundle,
|
|
106
|
-
options=options.figure_options,
|
|
107
|
-
)
|
|
108
|
-
preamble_parts.append(generate_figure_preamble())
|
|
109
|
-
|
|
110
|
-
elif node_type == "table":
|
|
111
|
-
table_opts = options.table_options or TableExportOptions()
|
|
112
|
-
latex_code = export_table_to_latex(
|
|
113
|
-
bundle,
|
|
114
|
-
options=table_opts,
|
|
115
|
-
)
|
|
116
|
-
preamble_parts.append(
|
|
117
|
-
generate_table_preamble(
|
|
118
|
-
use_booktabs=table_opts.use_booktabs,
|
|
119
|
-
use_siunitx=table_opts.use_siunitx,
|
|
120
|
-
)
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
elif node_type == "stats":
|
|
124
|
-
# Stats-only bundle - format as paragraph or inline
|
|
125
|
-
if bundle.stats:
|
|
126
|
-
stats = format_stats_for_latex(bundle.stats.to_dict())
|
|
127
|
-
latex_code = _format_stats_only(stats)
|
|
128
|
-
|
|
129
|
-
else:
|
|
130
|
-
raise ValueError(f"Unsupported node type for LaTeX export: {node_type}")
|
|
131
|
-
|
|
132
|
-
# Format statistics if available (for figures/tables with stats)
|
|
133
|
-
if bundle.stats and node_type != "stats":
|
|
134
|
-
stats = format_stats_for_latex(bundle.stats.to_dict())
|
|
135
|
-
if stats:
|
|
136
|
-
note = format_stat_note(stats)
|
|
137
|
-
if note:
|
|
138
|
-
latex_code += "\n\n" + note
|
|
139
|
-
|
|
140
|
-
# Combine preamble
|
|
141
|
-
preamble = "\n\n".join(preamble_parts)
|
|
142
|
-
|
|
143
|
-
# Validate if requested
|
|
144
|
-
validation = None
|
|
145
|
-
if options.validate:
|
|
146
|
-
validation = validate_latex(latex_code, level=options.validation_level)
|
|
147
|
-
|
|
148
|
-
# Create result
|
|
149
|
-
result = LaTeXResult(
|
|
150
|
-
latex_code=latex_code,
|
|
151
|
-
preamble=preamble,
|
|
152
|
-
validation=validation,
|
|
153
|
-
stats=stats,
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
# Save to file if path specified
|
|
157
|
-
output_path = options.output_path
|
|
158
|
-
if output_path is None:
|
|
159
|
-
# Default to exports directory
|
|
160
|
-
exports_dir = bundle.path / "exports"
|
|
161
|
-
exports_dir.mkdir(exist_ok=True)
|
|
162
|
-
output_path = exports_dir / f"{bundle.node.id}.tex"
|
|
163
|
-
|
|
164
|
-
if output_path:
|
|
165
|
-
_save_latex(latex_code, output_path, preamble if options.include_preamble else None)
|
|
166
|
-
result.output_path = output_path
|
|
167
|
-
|
|
168
|
-
return result
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
def _format_stats_only(stats: List[FormattedStat]) -> str:
|
|
172
|
-
"""Format stats-only bundle as LaTeX.
|
|
173
|
-
|
|
174
|
-
Args:
|
|
175
|
-
stats: Formatted statistics
|
|
176
|
-
|
|
177
|
-
Returns:
|
|
178
|
-
LaTeX code
|
|
179
|
-
"""
|
|
180
|
-
if not stats:
|
|
181
|
-
return "% No statistics to report"
|
|
182
|
-
|
|
183
|
-
lines = ["% Statistical Results", ""]
|
|
184
|
-
for stat in stats:
|
|
185
|
-
lines.append(f"% {stat.test_type}")
|
|
186
|
-
lines.append(stat.full_report)
|
|
187
|
-
lines.append("")
|
|
188
|
-
|
|
189
|
-
return "\n".join(lines)
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
def _save_latex(
|
|
193
|
-
latex_code: str,
|
|
194
|
-
output_path: Path,
|
|
195
|
-
preamble: Optional[str] = None,
|
|
196
|
-
) -> None:
|
|
197
|
-
"""Save LaTeX code to file.
|
|
198
|
-
|
|
199
|
-
Args:
|
|
200
|
-
latex_code: LaTeX code
|
|
201
|
-
output_path: Output path
|
|
202
|
-
preamble: Optional preamble to prepend
|
|
203
|
-
"""
|
|
204
|
-
output_path = Path(output_path)
|
|
205
|
-
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
206
|
-
|
|
207
|
-
content = []
|
|
208
|
-
if preamble:
|
|
209
|
-
content.append(preamble)
|
|
210
|
-
content.append("")
|
|
211
|
-
|
|
212
|
-
content.append(latex_code)
|
|
213
|
-
|
|
214
|
-
output_path.write_text("\n".join(content), encoding="utf-8")
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
def export_multiple(
|
|
218
|
-
bundles: List["FTS"],
|
|
219
|
-
output_path: Path,
|
|
220
|
-
options: Optional[LaTeXExportOptions] = None,
|
|
221
|
-
) -> LaTeXResult:
|
|
222
|
-
"""Export multiple bundles to a single LaTeX file.
|
|
223
|
-
|
|
224
|
-
Args:
|
|
225
|
-
bundles: List of FTS bundles
|
|
226
|
-
output_path: Output path
|
|
227
|
-
options: Export options
|
|
228
|
-
|
|
229
|
-
Returns:
|
|
230
|
-
Combined LaTeXResult
|
|
231
|
-
"""
|
|
232
|
-
if options is None:
|
|
233
|
-
options = LaTeXExportOptions()
|
|
234
|
-
|
|
235
|
-
all_code = []
|
|
236
|
-
all_preamble = set()
|
|
237
|
-
all_stats = []
|
|
238
|
-
all_errors = []
|
|
239
|
-
all_warnings = []
|
|
240
|
-
|
|
241
|
-
for bundle in bundles:
|
|
242
|
-
result = export_to_latex(bundle, options)
|
|
243
|
-
all_code.append(result.latex_code)
|
|
244
|
-
if result.preamble:
|
|
245
|
-
all_preamble.add(result.preamble)
|
|
246
|
-
all_stats.extend(result.stats)
|
|
247
|
-
all_errors.extend(result.errors)
|
|
248
|
-
all_warnings.extend(result.warnings)
|
|
249
|
-
|
|
250
|
-
combined_code = "\n\n".join(all_code)
|
|
251
|
-
combined_preamble = "\n\n".join(sorted(all_preamble))
|
|
252
|
-
|
|
253
|
-
# Save combined file
|
|
254
|
-
_save_latex(combined_code, output_path, combined_preamble if options.include_preamble else None)
|
|
255
|
-
|
|
256
|
-
# Create combined validation result
|
|
257
|
-
combined_validation = ValidationResult()
|
|
258
|
-
for error in all_errors:
|
|
259
|
-
combined_validation.add_error(error)
|
|
260
|
-
for warning in all_warnings:
|
|
261
|
-
combined_validation.add_error(warning)
|
|
262
|
-
|
|
263
|
-
return LaTeXResult(
|
|
264
|
-
latex_code=combined_code,
|
|
265
|
-
preamble=combined_preamble,
|
|
266
|
-
validation=combined_validation,
|
|
267
|
-
output_path=output_path,
|
|
268
|
-
stats=all_stats,
|
|
269
|
-
)
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
__all__ = [
|
|
273
|
-
"LaTeXExportOptions",
|
|
274
|
-
"LaTeXResult",
|
|
275
|
-
"export_to_latex",
|
|
276
|
-
"export_multiple",
|
|
277
|
-
]
|
|
278
|
-
|
|
279
|
-
# EOF
|
scitex/fts/_stats/__init__.py
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
# Timestamp: 2025-12-20
|
|
3
|
-
# File: /home/ywatanabe/proj/scitex-code/src/scitex/fts/_stats/__init__.py
|
|
4
|
-
|
|
5
|
-
"""FTS Stats - Statistics dataclasses with GUI support."""
|
|
6
|
-
|
|
7
|
-
# Public dataclasses
|
|
8
|
-
from ._dataclasses import (
|
|
9
|
-
STATS_VERSION,
|
|
10
|
-
Stats,
|
|
11
|
-
# Type aliases
|
|
12
|
-
PositionMode,
|
|
13
|
-
UnitType,
|
|
14
|
-
SymbolStyle,
|
|
15
|
-
# GUI classes
|
|
16
|
-
Position,
|
|
17
|
-
StatStyling,
|
|
18
|
-
StatPositioning,
|
|
19
|
-
# Core classes
|
|
20
|
-
DataRef,
|
|
21
|
-
EffectSize,
|
|
22
|
-
StatMethod,
|
|
23
|
-
StatResult,
|
|
24
|
-
StatDisplay,
|
|
25
|
-
Analysis,
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
__all__ = [
|
|
29
|
-
"STATS_VERSION",
|
|
30
|
-
"Stats",
|
|
31
|
-
# Type aliases
|
|
32
|
-
"PositionMode",
|
|
33
|
-
"UnitType",
|
|
34
|
-
"SymbolStyle",
|
|
35
|
-
# GUI classes
|
|
36
|
-
"Position",
|
|
37
|
-
"StatStyling",
|
|
38
|
-
"StatPositioning",
|
|
39
|
-
# Core classes
|
|
40
|
-
"DataRef",
|
|
41
|
-
"EffectSize",
|
|
42
|
-
"StatMethod",
|
|
43
|
-
"StatResult",
|
|
44
|
-
"StatDisplay",
|
|
45
|
-
"Analysis",
|
|
46
|
-
]
|
|
47
|
-
|
|
48
|
-
# EOF
|