pyfigures 0.2.3__tar.gz → 0.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyfigures-0.2.3/pyfigures.egg-info → pyfigures-0.2.5}/PKG-INFO +5 -5
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/advanced_annotations.py +3 -1
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/categorized_mcp.py +2 -1
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/figure_state.py +13 -1
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/live_mcp.py +2 -2
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/partner_gui.py +68 -7
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/session.py +19 -6
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/autolettering_widget.py +42 -1
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/drag_sketch.py +23 -4
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/editable_export.py +2 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/ezfig.py +137 -4
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/pfgui.py +67 -3
- pyfigures-0.2.5/pyfigures/gui/row_letters.py +134 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/zoom_links.py +25 -4
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/annotations.py +144 -5
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/export.py +34 -3
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/overlays.py +14 -1
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/qc.py +16 -5
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/structure.py +9 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/workflow.py +3 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/recipe.py +20 -1
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/version.py +1 -1
- {pyfigures-0.2.3 → pyfigures-0.2.5/pyfigures.egg-info}/PKG-INFO +5 -5
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures.egg-info/SOURCES.txt +6 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures.egg-info/requires.txt +4 -4
- {pyfigures-0.2.3 → pyfigures-0.2.5}/setup.py +4 -4
- pyfigures-0.2.5/tests/test_empty_inset_roi_20261106.py +62 -0
- pyfigures-0.2.5/tests/test_inset_crop_margins_20261106.py +51 -0
- pyfigures-0.2.5/tests/test_lazy_loading_placeholder_20261106.py +79 -0
- pyfigures-0.2.5/tests/test_row_letters_chat_style_20261106.py +80 -0
- pyfigures-0.2.5/tests/test_row_letters_gui.py +414 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_user_findings_20261022.py +1 -1
- {pyfigures-0.2.3 → pyfigures-0.2.5}/LICENSE +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/README.md +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/images/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/__main__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/album/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/album/__main__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/arrowheads.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/assistant_actions.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/existing_tools.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/gui_selection.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/launch.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/letter_sequence.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/live_structure.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/manual_help.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/manual_help_verified.json +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/native_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/original_registry.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/plot_lifecycle.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/pointer_context.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/readability.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/recovery.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/result_evidence.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/assistant/submission_review.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/atomic_io.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/burned_text.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/colorbar_script.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/constant_panels.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/cvd.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/equations.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/extras.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/flip.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/about_dialog_pzf.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/annotation_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/asingleoraspanel.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/bg_color_selection.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/bug_recorder.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/caption_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/colorassistant.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/ctrl_key.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/deckcraft_blank.json +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/dimchooser.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/drop_sketch.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/editor_interaction.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/emptyimagedialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/equation_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/fonts/README.md +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/fontselectorgui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/group_builder_GUI.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/headless_ops.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/integrity_ops.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/journal_style_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/keep_tst_images_for_pzf.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/label_rows.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/latex_code_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/latex_support.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/lutmultiselector.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/mcp_server_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/pagelimitswidget.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/panelcreationwidget.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/pdf_support.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/portable_fonts.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/qc_reports.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/region_picker.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/render_headless.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/review/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/review/_template.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/review/dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/review/html_export.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/review/send.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/scalebareditor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/scrollableEZFIG.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/show_me_how.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/show_me_where.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/simple_text_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/spaceselector.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/style_text_headless.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/svg_painter.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/textEditWatcher.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/theme.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/tipdialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/tutorial.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/user_extra_translation.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/user_prefs.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/video_support.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/gui/widget_for_inset.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/guides.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/history.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/icons/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/icons/pyfigures.png +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/icons/pyfigures_album.png +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/icons/pyfigures_poster.png +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/image_search.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/journal_styles.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/latex_document.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/layout_formula.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/layout_picture.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_control.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_server.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/app.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/content.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/core.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/guidance.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/image_search.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/journal.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/poster.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/stacks.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/mcp_tools/upkeep.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/office_math.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/offscreen.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/panel_source_preview.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/path_resolution.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/__init__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/__main__.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/page_presets.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_align.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_canvas.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_headless.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_layout_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_layouts.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_recipe.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_shapes.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_source_data.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_templates.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_text_dialog.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_web_export.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/poster_window.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/poster/serialization.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/qt_exit.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/script_helpers.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/self_test.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/source_snapshot.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/stack_info.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures/zoom_geometry.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures.egg-info/dependency_links.txt +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/pyfigures.egg-info/top_level.txt +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/setup.cfg +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_advanced_edit_tools.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_arrow_tip.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_arrowheads.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_assistant_live.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_atomic_io.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_audit_fixes.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_audit_fixes_20261008.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_backgrounds.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_bug_recorder.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_bugs_found_by_gui_e2e.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_canvas_context_menu.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_canvas_keyboard_and_clicks.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_channels_property_20261105.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_codex_trial_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_colour_bar_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_consolidate_download.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_constant_panels.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_data_plots_and_stats.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_deserialization.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_dnd_canvas_more.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_dnd_combine_with_target.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_dnd_main_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_draft_figure.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_drop_sketches.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_editable_export.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_editable_plot_text.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_editor_interaction.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_editor_rotate_and_tool_20261105.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_equations.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_exception_handler.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_export_waits_for_images.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_fig_rect_cache.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_figure_colors.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_figure_diff.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_fiji_formats.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_file_io_encoding.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_file_state_tracking.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_flip.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_folder_drag_and_drop.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_fonts_available.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_forbidden_files.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_e2e_context_menu.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_e2e_coverage.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_e2e_dnd.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_e2e_image_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_e2e_menus.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_e2e_monkey.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_e2e_tutorials.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_e2e_visual.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_menus_and_toolbar.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_more_actions.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_gui_workflow_actions.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_guide_routing.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_image_opacity_reload.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_image_search.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_integrity_and_stats.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_interactive_tools.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_internal_dnd_group_placement.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_inverted_luts.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_journal_styles.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_latex_code.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_latex_documents.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_latex_extras.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_latex_full.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_latex_stress_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_launchers.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_layout_canvas_geometry.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_layout_formula.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_layout_stability_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_lazy_reflow.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_lettering_restore.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_licensing.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_lif_series_reading.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_llm_feedback_20261020.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_lut_remove_20261105.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_max_height.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_mcp_audit_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_mcp_control.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_mcp_history.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_mcp_server.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_mcp_stdio_protocol.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_mcp_text_arguments.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_missing_images_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_normalization.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_offscreen_env.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_ome_zarr.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_omero.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_open_perf.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_panel_editor.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_panel_editor_more.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_panel_preview.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_parity_mcp.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_path_resolution.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_pdf_panels.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_placeholder_grid.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_portability.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_poster_files_and_recipe.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_poster_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_poster_mcp.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_poster_stress_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_poster_vector_figures.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_property_setters_validate.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_pyf_loader_thread_deadlock.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_pyf_loading.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_pymupdf_offer.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_qc_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_qc_mcp_tools.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_qc_reports.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_qt_exit.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_recipe.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_recipe_checks_bundles.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_recipe_extra_keys.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_recipe_for_llms.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_recipe_more_keys.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_recordings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_render_export.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_restyle_texts.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_review_and_library.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_ruler_labels.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_save_reminder.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_scale_bar_calibration.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_scale_consistency.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_schema_sweep_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_self_test.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_send_to_poster.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_shapes.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_show_me_how.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_show_me_where_20261105.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_source_data.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_stack_tools.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_stack_tools_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_stack_with_image.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_stress_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_stress_findings_20261028.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_stress_findings_20261029.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_style_audit_calbar.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_svg_clipping_and_pdf_pages.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_svg_empty_glyph.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_tex_install.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_text_editor_and_widgets.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_tutorial_controller.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_tutorials.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_typography_tidy.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_uneven_rows_20261105.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_user_chat_findings_20261104.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_user_gui_findings_20261021.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_user_guide_menus.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_video_support.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_zarr_stress_findings.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_zoom_callout_gui.py +0 -0
- {pyfigures-0.2.3 → pyfigures-0.2.5}/tests/test_zoom_callout_lut.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyfigures
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: PyFigures will assist you assemble publication ready scientific figures in no time.
|
|
5
5
|
Home-page: https://github.com/baigouy/PyFigures
|
|
6
6
|
Author: Benoit Aigouy
|
|
@@ -36,7 +36,7 @@ Requires-Dist: QtPy>=2.1.0
|
|
|
36
36
|
Requires-Dist: Deprecated
|
|
37
37
|
Requires-Dist: Requests
|
|
38
38
|
Requires-Dist: batoolset>=0.2.0
|
|
39
|
-
Requires-Dist: batoolset-gui>=0.2.
|
|
39
|
+
Requires-Dist: batoolset-gui>=0.2.4
|
|
40
40
|
Requires-Dist: staplot>=0.1.0
|
|
41
41
|
Requires-Dist: pyautogui
|
|
42
42
|
Requires-Dist: imagecodecs
|
|
@@ -46,7 +46,7 @@ Requires-Dist: latex2mathml
|
|
|
46
46
|
Requires-Dist: mathml2omml
|
|
47
47
|
Requires-Dist: pylatexenc
|
|
48
48
|
Requires-Dist: pypdfium2
|
|
49
|
-
Requires-Dist: qtpy-ai-sidecar>=0.1.
|
|
49
|
+
Requires-Dist: qtpy-ai-sidecar>=0.1.4
|
|
50
50
|
Requires-Dist: mcp<2,>=1.12
|
|
51
51
|
Provides-Extra: ai
|
|
52
52
|
Requires-Dist: mcp<2,>=1.12; extra == "ai"
|
|
@@ -63,10 +63,10 @@ Provides-Extra: omero
|
|
|
63
63
|
Requires-Dist: omero-py; extra == "omero"
|
|
64
64
|
Provides-Extra: chat
|
|
65
65
|
Requires-Dist: mcp<2,>=1.12; extra == "chat"
|
|
66
|
-
Requires-Dist: qtpy-ai-sidecar>=0.1.
|
|
66
|
+
Requires-Dist: qtpy-ai-sidecar>=0.1.4; extra == "chat"
|
|
67
67
|
Provides-Extra: all
|
|
68
68
|
Requires-Dist: mcp<2,>=1.12; extra == "all"
|
|
69
|
-
Requires-Dist: qtpy-ai-sidecar>=0.1.
|
|
69
|
+
Requires-Dist: qtpy-ai-sidecar>=0.1.4; extra == "all"
|
|
70
70
|
Requires-Dist: av; extra == "all"
|
|
71
71
|
Requires-Dist: opencv-python-headless; extra == "all"
|
|
72
72
|
Requires-Dist: pyimagej; extra == "all"
|
|
@@ -219,7 +219,9 @@ def prepare_inset(obj, changes):
|
|
|
219
219
|
allowed={'size_fraction',INSET_SIZE,'border_size','border_color'}
|
|
220
220
|
if not changes or set(changes)-allowed:
|
|
221
221
|
raise ValueError('Inset changes: size_fraction (width as a share of the panel width, 0-1; '
|
|
222
|
-
'"larger" = a bigger fraction than the current one), border_size, border_color'
|
|
222
|
+
'"larger" = a bigger fraction than the current one), border_size, border_color. '
|
|
223
|
+
'The region an inset shows comes from its ROI: edit the ROI geometry, then '
|
|
224
|
+
'remove_inset and roi_to_inset again (crops are margins per edge, not coordinates).')
|
|
223
225
|
plan={}
|
|
224
226
|
for key,v in changes.items():
|
|
225
227
|
if key in ('size_fraction',INSET_SIZE):
|
|
@@ -16,7 +16,8 @@ COMMON_CONTRACTS = ('edit_panel_letters', 'swap_live_panels', 'remove_annotation
|
|
|
16
16
|
CONTRACT_SCOPE = {
|
|
17
17
|
'swap_rows': 'exchanges WHOLE rows; to reorder panels inside one row use reorder_children',
|
|
18
18
|
'reorder_children': 'reorders the panels WITHIN one row/group, e.g. reversing a row',
|
|
19
|
-
'set_panel_letter_position': 'GLOBAL default letter placement for every panel, not one
|
|
19
|
+
'set_panel_letter_position': 'GLOBAL default letter placement for every panel (a corner INSIDE it), not one '
|
|
20
|
+
'selected panel letter; letters OUTSIDE the panels = set_panel_letter_layout row',
|
|
20
21
|
'delete_last_rows': 'removes WHOLE rows from the end; only on an explicit removal request',
|
|
21
22
|
'swap_live_panels': 'exchanges two panels, keeping their letters in place',
|
|
22
23
|
}
|
|
@@ -11,10 +11,22 @@ def specification(state):
|
|
|
11
11
|
for field in FIELDS[1:]:
|
|
12
12
|
values = [a.get(field) for a in letters]
|
|
13
13
|
uniform[field] = values[0] if values and all(v == values[0] for v in values) else 'mixed' if values else None
|
|
14
|
-
|
|
14
|
+
spec = {'image_panels': len(state['panels']), 'visible_letters': len(letters),
|
|
15
15
|
'duplicate_letter_references':state.get('duplicate_letter_references',{}),
|
|
16
16
|
'uniform_letter_style': uniform, 'unlettered_panel_ids': state['unlettered_panel_ids'],
|
|
17
|
+
'letter_layout': state.get('letter_layout', 'panel'),
|
|
17
18
|
'source': 'Actual GUI readback; preserve unspecified properties on follow-up edits.'}
|
|
19
|
+
if spec['letter_layout'] == 'row':
|
|
20
|
+
# one letter per ROW, outside the rows on the left (drawn by the canvas):
|
|
21
|
+
# the panels carry none on purpose
|
|
22
|
+
row_letters = state.get('row_letters') or []
|
|
23
|
+
spec.update(visible_letters=len(row_letters),
|
|
24
|
+
row_letters=[r['text'] for r in row_letters],
|
|
25
|
+
row_letter_align=state.get('row_letter_align', 'top'),
|
|
26
|
+
letter_layout_note='One letter per row, outside the rows on the left; change it '
|
|
27
|
+
'with set_panel_letter_layout (letter_layout="panel" puts a '
|
|
28
|
+
'letter back in each panel).')
|
|
29
|
+
return spec
|
|
18
30
|
|
|
19
31
|
|
|
20
32
|
def changes(before, after):
|
|
@@ -126,7 +126,7 @@ def run_live_pyfigures_tools(session_id: str, expected_revision: int, request_id
|
|
|
126
126
|
|
|
127
127
|
@mcp.tool()
|
|
128
128
|
def set_panel_letter_position(placement: str = 'top left') -> dict:
|
|
129
|
-
"""Move the existing automatic PANEL LETTERS (A, B, C...) to a corner of every image. Updates the figure's global lettering position so GUI auto-lettering preserves it on refresh. Use top left, top right, bottom left or bottom right. Preserve letters, font, size, colors and other annotations. One GUI undo step; no source save. For moving panel letters use this instead of deleting them or adding ordinary corner labels, which auto-lettering can replace."""
|
|
129
|
+
"""Move the existing automatic PANEL LETTERS (A, B, C...) to a corner of every image. Updates the figure's global lettering position so GUI auto-lettering preserves it on refresh. Use top left, top right, bottom left or bottom right. Preserve letters, font, size, colors and other annotations. One GUI undo step; no source save. For moving panel letters use this instead of deleting them or adding ordinary corner labels, which auto-lettering can replace. Letters OUTSIDE the panels (one per row, in a left margin) are set_panel_letter_layout(letter_layout="row"), not a placement."""
|
|
130
130
|
return call_live('bulk_letters', {'action': 'style', 'placement': placement})
|
|
131
131
|
|
|
132
132
|
|
|
@@ -143,7 +143,7 @@ def edit_panel_letters(action: Literal['style','remove','restore','renumber'] =
|
|
|
143
143
|
color: str | int | None = None, background: str | int | None = None,
|
|
144
144
|
start_letter: str | None = None, replace_overrides: bool = False,
|
|
145
145
|
removal_request: str | None = None) -> dict:
|
|
146
|
-
"""Scope rules: use scope=all for all panel letters and omit panel_ids/group_path. scope=panels requires a nonempty panel_ids list; scope=selection uses the current selection. Pass ONLY changed fields, never the full letter_styles readback: opacity/bold/italic/underline are not accepted. For italic/bold/underline, call restyle_texts(target=letters) directly; do not call this operation first. Preferred ONE-CALL bulk operation for panel-letter placement, font family/size, color/background, removal and restoration. For bold/italic/underline use restyle_texts(target=letters); those are not fields of this function. placement accepts center/centre/middle or a corner. action=style preserves existing text; renumber scope=all creates a complete unique sequence for a newly constructed figure when asked to letter the panels; partial restore preserves existing IDs and is not a whole-figure renumber; remove requires removal_request quoting an explicit user request to remove/hide letters (never a swap), and hides panel letters persistently without deleting captions/scale bars; restore without start_letter preserves an existing or hidden panel text and otherwise uses its automatic position; explicit start_letter sets a new sequence; renumber changes sequence. scope=auto infers panels from panel_ids, group from group_path, otherwise all; explicit panels/group/selection/all are supported. Supplying panel_ids can never broaden to all panels. For WHITE Arial 12 with NO background use color="white", font_family="Arial", font_size=12, background="none". Black is a color, NOT transparent. Unspecified appearance is preserved. Per-panel overrides survive whole-figure style changes unless replace_overrides=true. One undo step. Returns actual styles, changed/skipped counts, and recovery status. Do not loop over individual annotations for figure/group requests."""
|
|
146
|
+
"""Scope rules: use scope=all for all panel letters and omit panel_ids/group_path. scope=panels requires a nonempty panel_ids list; scope=selection uses the current selection. Pass ONLY changed fields, never the full letter_styles readback: opacity/bold/italic/underline are not accepted. For italic/bold/underline, call restyle_texts(target=letters) directly; do not call this operation first. Preferred ONE-CALL bulk operation for panel-letter placement, font family/size, color/background, removal and restoration. For bold/italic/underline use restyle_texts(target=letters); those are not fields of this function. placement accepts center/centre/middle or a corner (inside the panel); letters OUTSIDE the panels = set_panel_letter_layout(letter_layout="row"). action=style preserves existing text; renumber scope=all creates a complete unique sequence for a newly constructed figure when asked to letter the panels; partial restore preserves existing IDs and is not a whole-figure renumber; remove requires removal_request quoting an explicit user request to remove/hide letters (never a swap), and hides panel letters persistently without deleting captions/scale bars; restore without start_letter preserves an existing or hidden panel text and otherwise uses its automatic position; explicit start_letter sets a new sequence; renumber changes sequence. scope=auto infers panels from panel_ids, group from group_path, otherwise all; explicit panels/group/selection/all are supported. Supplying panel_ids can never broaden to all panels. For WHITE Arial 12 with NO background use color="white", font_family="Arial", font_size=12, background="none". Black is a color, NOT transparent. Unspecified appearance is preserved. Per-panel overrides survive whole-figure style changes unless replace_overrides=true. One undo step. Returns actual styles, changed/skipped counts, and recovery status. Do not loop over individual annotations for figure/group requests. With one letter per row (letter_layout row) the row letters share the figure letter style: action=style scope=all restyles them (font, size, color, background; row_letters_restyled lists them, outcome VERIFIED_CHANGE)."""
|
|
147
147
|
if scope == 'panels' and not panel_ids:
|
|
148
148
|
raise ValueError('scope=panels requires a nonempty panel_ids list. For an explicit all-panel lettering request use scope=all and omit panel_ids; otherwise inspect and provide the intended panel IDs. No edit was submitted.')
|
|
149
149
|
if panel_ids and scope in ('auto', 'all'):
|
|
@@ -164,10 +164,20 @@ def state(window):
|
|
|
164
164
|
for annotation in entry['letters']:
|
|
165
165
|
references.setdefault(annotation['text'].casefold(),[]).append(entry['panel_id'])
|
|
166
166
|
duplicates={text:ids for text,ids in references.items() if len(ids)>1}
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
canvas = window.paint.EZFIG_panel
|
|
168
|
+
from pyfigures.gui.row_letters import normalise_layout, normalise_align
|
|
169
|
+
layout = normalise_layout(getattr(canvas, 'letter_layout', None))
|
|
170
|
+
# one letter per row, outside the rows (drawn by the canvas, not on a panel)
|
|
171
|
+
row_letters = [{'row': k, 'text': t.getPlainText()}
|
|
172
|
+
for k, t in enumerate(canvas.row_letter_items())] if layout == 'row' else []
|
|
173
|
+
return {'duplicate_letter_references':duplicates,
|
|
174
|
+
'visible_letter_count': sum(len(p['letters']) for p in entries) + len(row_letters),
|
|
175
|
+
'unlettered_panel_ids': [p['panel_id'] for p in entries if not p['letters']] if layout != 'row' else [],
|
|
169
176
|
'auto_lettering': window.auto_lettering_checkbox.isChecked(),
|
|
170
177
|
'first_letter': window.letter_line_edit.text(),
|
|
178
|
+
'letter_layout': layout,
|
|
179
|
+
'row_letter_align': normalise_align(getattr(canvas, 'row_letter_align', None)),
|
|
180
|
+
'row_letters': row_letters,
|
|
171
181
|
'default_position': str(window.serializable_font.placement), 'panels': entries}
|
|
172
182
|
|
|
173
183
|
|
|
@@ -413,6 +423,24 @@ class PartnerGUI(BaseGUI):
|
|
|
413
423
|
raise ValueError('CLARIFICATION_REQUIRED: This canvas is not a flat list of horizontal rows')
|
|
414
424
|
if validate_only:
|
|
415
425
|
return
|
|
426
|
+
from pyfigures.gui.row_letters import normalise_layout
|
|
427
|
+
if normalise_layout(getattr(canvas, 'letter_layout', None)) == 'row':
|
|
428
|
+
# one letter per row, outside the rows: the letters follow the row
|
|
429
|
+
# order by themselves and the panels carry none (recording "no
|
|
430
|
+
# letter" policies on them hid their letters for good once the
|
|
431
|
+
# figure went back to a letter in each panel)
|
|
432
|
+
a, b = first_row - 1, second_row - 1
|
|
433
|
+
roots[a], roots[b] = roots[b], roots[a]
|
|
434
|
+
canvas.update()
|
|
435
|
+
canvas.repack_all()
|
|
436
|
+
canvas.update_letters_required.emit()
|
|
437
|
+
canvas.update_text_rows.emit()
|
|
438
|
+
canvas.update_size()
|
|
439
|
+
canvas.repaint()
|
|
440
|
+
return dict(action='swap_rows', changed=int(a != b), matched_panel_ids=[], changed_panel_ids=[],
|
|
441
|
+
first_row=first_row, second_row=second_row, completion_verified=True,
|
|
442
|
+
lettering_mode='row_letters',
|
|
443
|
+
row_letters=[t.getPlainText() for t in canvas.row_letter_items()])
|
|
416
444
|
automatic = self.auto_lettering_checkbox.isChecked() and bool(self.letter_line_edit.text())
|
|
417
445
|
before = state(self)
|
|
418
446
|
original = [p for _, _, p in panels(roots)]
|
|
@@ -667,6 +695,21 @@ class PartnerGUI(BaseGUI):
|
|
|
667
695
|
raise ValueError('group_path is required for group scope')
|
|
668
696
|
if scope == 'panels' and not panel_ids:
|
|
669
697
|
raise ValueError('panel_ids from inspect_panel_letters are required')
|
|
698
|
+
from pyfigures.gui.row_letters import normalise_layout
|
|
699
|
+
row_mode = normalise_layout(getattr(self.paint.EZFIG_panel, 'letter_layout', None)) == 'row'
|
|
700
|
+
if row_mode and action == 'style' and scope != 'all':
|
|
701
|
+
raise ValueError('The figure has one letter per row (outside the rows): those letters share one '
|
|
702
|
+
'style, so style them with scope="all".')
|
|
703
|
+
if placement is not None and re.search(r'\b(outside|outer|margin|per row|beside)\b', str(placement).lower()):
|
|
704
|
+
# "put letters outside": a model passed placement="outside", got
|
|
705
|
+
# "Use a corner", undid the row letters it had just set and searched
|
|
706
|
+
# until stopped (2026-11-06)
|
|
707
|
+
if row_mode:
|
|
708
|
+
raise ValueError('ALREADY_DONE: the letters are already outside the panels (one per row, in a '
|
|
709
|
+
'margin on the left). Nothing to change; report that to the user.')
|
|
710
|
+
raise ValueError('Letters outside the panels: call set_panel_letter_layout(letter_layout="row") '
|
|
711
|
+
'(one letter per row, in a margin left of the row). Letters of single panels '
|
|
712
|
+
'always sit in a corner inside the panel; placement takes a corner.')
|
|
670
713
|
if placement is not None:
|
|
671
714
|
placement = ' '.join(placement.lower().replace('-', ' ').split())
|
|
672
715
|
placement = placement.replace('upper', 'top').replace('lower', 'bottom')
|
|
@@ -716,13 +759,15 @@ class PartnerGUI(BaseGUI):
|
|
|
716
759
|
return {'matched': len(candidates)}
|
|
717
760
|
changed, skipped = [], []
|
|
718
761
|
before_states = {pid: [letter_info(a) for a in letters(panel)] for pid, panel in candidates}
|
|
762
|
+
row_style_before = self._row_letter_style() if row_mode else None
|
|
719
763
|
for pid, panel in candidates:
|
|
720
764
|
existing = letters(panel)
|
|
721
765
|
policy = json.loads(getattr(panel, POLICY, '{}'))
|
|
722
766
|
if not policy.get('base') and existing:
|
|
723
767
|
policy['base'] = letter_info(existing[0])
|
|
724
768
|
if action == 'style' and not existing:
|
|
725
|
-
|
|
769
|
+
if not row_mode: # lettered per row: no letter in a panel is expected
|
|
770
|
+
skipped.append({'panel_id': pid, 'reason': 'No panel letter; use restore to add it'})
|
|
726
771
|
continue
|
|
727
772
|
local = set(policy.get('local_fields', []))
|
|
728
773
|
if replace_overrides and scope == 'all':
|
|
@@ -783,10 +828,26 @@ class PartnerGUI(BaseGUI):
|
|
|
783
828
|
self.serializable_font.background = None if fill is None else int(fill[1:], 16)
|
|
784
829
|
self.update_letters()
|
|
785
830
|
changed = [pid for pid, panel in candidates if before_states[pid] != [letter_info(a) for a in letters(panel)]]
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
831
|
+
report = {'matched': len(candidates), 'matched_panel_ids': [pid for pid, _ in candidates],
|
|
832
|
+
'changed': len(changed), 'changed_panel_ids': changed,
|
|
833
|
+
'skipped': skipped, 'scope': scope, 'action': action,
|
|
834
|
+
'warnings': ['Explicit colors are honored; white on bright image content may be hard to see.'] if foreground == '#ffffff' and fill is None else []}
|
|
835
|
+
if row_mode:
|
|
836
|
+
# the row letters are drawn from the figure letter font set above:
|
|
837
|
+
# report them, or "0 changed" sent the chat looking for another
|
|
838
|
+
# tool for a minute although the edit was done (2026-11-06)
|
|
839
|
+
restyled = self._row_letter_style() != row_style_before
|
|
840
|
+
report['letter_layout'] = 'row'
|
|
841
|
+
report['row_letters_restyled'] = (
|
|
842
|
+
[t.getPlainText() for _, t in self.paint.EZFIG_panel._row_letter_texts()] if restyled else [])
|
|
843
|
+
if placement is not None:
|
|
844
|
+
report['warnings'].append('Row letters always sit outside the rows on the left; placement '
|
|
845
|
+
'only applies to letters inside panels.')
|
|
846
|
+
return report
|
|
847
|
+
|
|
848
|
+
def _row_letter_style(self):
|
|
849
|
+
f = self.serializable_font
|
|
850
|
+
return (f.toString(), getattr(f, 'foreground', None), getattr(f, 'background', None))
|
|
790
851
|
|
|
791
852
|
def swap_panels(self, first, second, target='images', validate_only=False):
|
|
792
853
|
if target not in ('images', 'letters'):
|
|
@@ -104,12 +104,14 @@ class Session:
|
|
|
104
104
|
for index,a in enumerate(p.annotations or [])
|
|
105
105
|
if type(a).__name__ in ('Rectangle2D','Rect2D','Ellipse2D','Circle2D','Square2D','Line2D','Polygon2D','PolyLine2D','Freehand2D')]
|
|
106
106
|
objects = self.window.paint.EZFIG_panel.shapes_to_draw
|
|
107
|
-
|
|
107
|
+
letter_state = lettering_state(self.window)
|
|
108
|
+
return {'figure_summary': figure_summary(objects, references, missing | unreadable,
|
|
109
|
+
row_letters=[r['text'] for r in letter_state.get('row_letters') or []]),
|
|
108
110
|
'session_id': self.id, 'revision': self.revision,
|
|
109
111
|
'text_annotations': annotations,
|
|
110
112
|
'roi_annotations': rois,
|
|
111
113
|
'selection': selection_state(self.window),
|
|
112
|
-
'verified_letter_specification': specification(
|
|
114
|
+
'verified_letter_specification': specification(letter_state),
|
|
113
115
|
'panel_references': references,
|
|
114
116
|
**({'missing_source_files': {
|
|
115
117
|
'not_found': sorted(missing), 'could_not_be_read': sorted(unreadable),
|
|
@@ -131,6 +133,10 @@ class Session:
|
|
|
131
133
|
'recovery_error': self.recovery.error},
|
|
132
134
|
'lettering': {'automatic': self.window.auto_lettering_checkbox.isChecked(),
|
|
133
135
|
'default_position': str(self.window.serializable_font.placement),
|
|
136
|
+
# 'row': one letter per row, outside the rows on the left
|
|
137
|
+
'layout': getattr(self.window.paint.EZFIG_panel, 'letter_layout', 'panel'),
|
|
138
|
+
'row_letter_align': getattr(self.window.paint.EZFIG_panel, 'row_letter_align', 'top'),
|
|
139
|
+
'layout_operation': 'set_panel_letter_layout',
|
|
134
140
|
'bulk_operation': 'edit_panel_letters'},
|
|
135
141
|
'objects': [{'id': str(i), 'type': type(obj).__name__,
|
|
136
142
|
'image_count': count_images(obj),
|
|
@@ -444,7 +450,8 @@ class Session:
|
|
|
444
450
|
report['visible_letter_count_after'] = verified['visible_letter_count']
|
|
445
451
|
report['unlettered_panel_ids'] = verified['unlettered_panel_ids']
|
|
446
452
|
report['outcome'] = ('LETTERS_REMOVED' if report['action'] == 'remove' else
|
|
447
|
-
'NO_VISIBLE_CHANGE' if not report['changed']
|
|
453
|
+
'NO_VISIBLE_CHANGE' if not report['changed'] and not report.get('row_letters_restyled')
|
|
454
|
+
else 'VERIFIED_CHANGE')
|
|
448
455
|
if ungroup:
|
|
449
456
|
report['outcome'] = ('LAYOUT_REFRESHED' if report.get('layout_changed') else 'ALREADY_UNGROUPED') if report['already_ungrouped'] else 'VERIFIED_STRUCTURE_CHANGE'
|
|
450
457
|
affected = set(report['changed_panel_ids'])
|
|
@@ -587,7 +594,10 @@ class Session:
|
|
|
587
594
|
if annotation.findtext('is_letter') == 'True':
|
|
588
595
|
annotation.find('is_letter').text = 'False'
|
|
589
596
|
settings = root.find('SerializableGUIparameters')
|
|
590
|
-
|
|
597
|
+
# row letters (one per row, outside) are drawn from the figure
|
|
598
|
+
# settings, never from panel annotations: lettering stays on
|
|
599
|
+
per_row = settings is not None and (settings.findtext('letter_layout') or '').strip().strip('"') == 'row'
|
|
600
|
+
if settings is not None and not per_row:
|
|
591
601
|
field = settings.find('auto_lettering')
|
|
592
602
|
if field is None:
|
|
593
603
|
field = ET.SubElement(settings, 'auto_lettering')
|
|
@@ -835,14 +845,17 @@ ADD_CONTENT = ('Ask for images to be added (tool add_image with each file\'s ful
|
|
|
835
845
|
'or File > Open a saved .pyf figure.')
|
|
836
846
|
|
|
837
847
|
|
|
838
|
-
def figure_summary(objects, references, missing=()):
|
|
848
|
+
def figure_summary(objects, references, missing=(), row_letters=()):
|
|
839
849
|
if not objects:
|
|
840
850
|
return {'empty': True,
|
|
841
851
|
'answer': 'The figure is empty: no images, plots or text yet. Nothing to preview or describe.',
|
|
842
852
|
'how_to_add_content': ADD_CONTENT}
|
|
843
853
|
letters = [l for r in references for l in r['letters'] if l]
|
|
844
854
|
text = f"{len(references)} image panel(s) in {len(objects)} top-level object(s)"
|
|
845
|
-
if
|
|
855
|
+
if row_letters:
|
|
856
|
+
# one letter per row, drawn outside the rows: the panels carry none
|
|
857
|
+
text += ', one letter per row (outside, on the left): ' + ', '.join(row_letters)
|
|
858
|
+
elif letters:
|
|
846
859
|
text += ', letters ' + ', '.join(letters)
|
|
847
860
|
if missing:
|
|
848
861
|
text += f'; {len(missing)} image file(s) missing (see missing_source_files)'
|
|
@@ -10,7 +10,7 @@ from qtpy.QtGui import QColor, QFont
|
|
|
10
10
|
from qtpy.QtCore import Qt
|
|
11
11
|
|
|
12
12
|
class AutoLetteringOptions(QWidget):
|
|
13
|
-
def __init__(self, font=None,parent=None):
|
|
13
|
+
def __init__(self, font=None,parent=None, letter_layout='panel', row_letter_align='top'):
|
|
14
14
|
super().__init__(parent)
|
|
15
15
|
|
|
16
16
|
# Create a vertical box layout to hold the widgets
|
|
@@ -93,6 +93,28 @@ class AutoLetteringOptions(QWidget):
|
|
|
93
93
|
|
|
94
94
|
vbox.addLayout(hbox2)
|
|
95
95
|
|
|
96
|
+
# one letter in each panel (at the position above), or one letter per
|
|
97
|
+
# row drawn outside the row, in a margin on its left (row_letters.py)
|
|
98
|
+
layout_label = QLabel("Letters:")
|
|
99
|
+
self.layout_combo = QComboBox()
|
|
100
|
+
self.layout_combo.addItem("One in each panel", 'panel')
|
|
101
|
+
self.layout_combo.addItem("One per row, outside on the left", 'row')
|
|
102
|
+
self.layout_combo.setToolTip('"One per row": a single letter for each row of the figure, '
|
|
103
|
+
'in a margin left of the row (the rows are narrowed so the '
|
|
104
|
+
'figure keeps its width). The panels then carry no letter.')
|
|
105
|
+
self.row_align_combo = QComboBox()
|
|
106
|
+
self.row_align_combo.addItem("Top of the row", 'top')
|
|
107
|
+
self.row_align_combo.addItem("Middle of the row", 'center')
|
|
108
|
+
self.row_align_combo.setToolTip('Where the row letter sits next to its row: level with the '
|
|
109
|
+
'top of the row (and of its column titles), or its middle.')
|
|
110
|
+
hbox3 = QHBoxLayout()
|
|
111
|
+
hbox3.addWidget(layout_label)
|
|
112
|
+
hbox3.addWidget(self.layout_combo)
|
|
113
|
+
hbox3.addWidget(self.row_align_combo)
|
|
114
|
+
vbox.addLayout(hbox3)
|
|
115
|
+
self.set_letter_layout(letter_layout, row_letter_align)
|
|
116
|
+
self.layout_combo.currentIndexChanged.connect(self._layout_changed)
|
|
117
|
+
|
|
96
118
|
# Set initial values for the options
|
|
97
119
|
|
|
98
120
|
# self.font_family = 'Arial'
|
|
@@ -149,6 +171,25 @@ class AutoLetteringOptions(QWidget):
|
|
|
149
171
|
# self.font.setWeight(QFont.Normal)
|
|
150
172
|
|
|
151
173
|
|
|
174
|
+
def set_letter_layout(self, letter_layout='panel', row_letter_align='top'):
|
|
175
|
+
from pyfigures.gui.row_letters import normalise_layout, normalise_align
|
|
176
|
+
self.layout_combo.setCurrentIndex(max(0, self.layout_combo.findData(normalise_layout(letter_layout))))
|
|
177
|
+
self.row_align_combo.setCurrentIndex(max(0, self.row_align_combo.findData(normalise_align(row_letter_align))))
|
|
178
|
+
self._layout_changed()
|
|
179
|
+
|
|
180
|
+
def _layout_changed(self, *args):
|
|
181
|
+
# the corner is for letters in the panels, the alignment for row letters
|
|
182
|
+
per_row = self.get_letter_layout() == 'row'
|
|
183
|
+
self.row_align_combo.setEnabled(per_row)
|
|
184
|
+
self.vertical_combo.setEnabled(not per_row)
|
|
185
|
+
self.horizontal_combo.setEnabled(not per_row)
|
|
186
|
+
|
|
187
|
+
def get_letter_layout(self):
|
|
188
|
+
return self.layout_combo.currentData() or 'panel'
|
|
189
|
+
|
|
190
|
+
def get_row_letter_align(self):
|
|
191
|
+
return self.row_align_combo.currentData() or 'top'
|
|
192
|
+
|
|
152
193
|
def choose_bg_color(self):
|
|
153
194
|
"""
|
|
154
195
|
Opens a QColorDialog to choose the background color.
|
|
@@ -266,9 +266,27 @@ def _place(shapes, gap):
|
|
|
266
266
|
y += r.height() + gap
|
|
267
267
|
|
|
268
268
|
|
|
269
|
-
def
|
|
269
|
+
def row_letter_names(canvas):
|
|
270
|
+
"""{id(panel): its row letter} when the figure has one letter per row
|
|
271
|
+
(outside the rows: the panels carry none), {} otherwise. The sketch then
|
|
272
|
+
names each panel by its row's letter, as it names lettered panels."""
|
|
273
|
+
if getattr(canvas, "letter_layout", "panel") != "row":
|
|
274
|
+
return {}
|
|
275
|
+
try:
|
|
276
|
+
names = {}
|
|
277
|
+
for row, text in canvas._row_letter_texts():
|
|
278
|
+
letter = text.getPlainText().strip()
|
|
279
|
+
for leaf in _leaves(row):
|
|
280
|
+
names[id(leaf)] = letter
|
|
281
|
+
return names
|
|
282
|
+
except Exception:
|
|
283
|
+
return {}
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def sketch(shapes, moved, target, dpr=1.0, letters=None):
|
|
270
287
|
"""QIcon of *shapes* (sandbox result): grey boxes, *moved* panels blue,
|
|
271
|
-
*target* panels orange, letters inside
|
|
288
|
+
*target* panels orange, letters inside (*letters* {id(panel): letter}
|
|
289
|
+
for panels whose letter is not on them: one letter per row)."""
|
|
272
290
|
# getRect(all=True): the size drawn on the canvas (getRect() ignores the fit to width)
|
|
273
291
|
_place(shapes, gap=max(s.getRect(all=True).height() for s in shapes) * 0.08 if shapes else 0)
|
|
274
292
|
leaves = [x for s in shapes for x in _leaves(s)]
|
|
@@ -296,7 +314,7 @@ def sketch(shapes, moved, target, dpr=1.0):
|
|
|
296
314
|
p.setPen(QPen(colour.darker(140), 1))
|
|
297
315
|
p.setBrush(colour)
|
|
298
316
|
p.drawRect(box)
|
|
299
|
-
letter = letter_of(src)
|
|
317
|
+
letter = letter_of(src) or (letters or {}).get(id(src), "")
|
|
300
318
|
if letter and box.width() >= 7 and box.height() >= 9:
|
|
301
319
|
p.setPen(Qt.GlobalColor.white)
|
|
302
320
|
p.drawText(box, Qt.AlignmentFlag.AlignCenter, letter[:2])
|
|
@@ -383,6 +401,7 @@ def finish_drag_menu(canvas, menu, entries):
|
|
|
383
401
|
except Exception:
|
|
384
402
|
pass
|
|
385
403
|
seen = {}
|
|
404
|
+
row_names = row_letter_names(canvas)
|
|
386
405
|
# an entry that would leave the layout as it is does nothing: not offered
|
|
387
406
|
first = entries[0]
|
|
388
407
|
now = simulate(canvas, None, (), [x for x in (first[4], first[5]) if x is not None])
|
|
@@ -406,7 +425,7 @@ def finish_drag_menu(canvas, menu, entries):
|
|
|
406
425
|
seen[k] = act
|
|
407
426
|
moved_ids = {id(x) for x in _leaves(moved)} if moved is not None else set()
|
|
408
427
|
target_ids = {id(x) for x in _leaves(target)} if target is not None else set()
|
|
409
|
-
icon = sketch(result, moved_ids, target_ids, dpr)
|
|
428
|
+
icon = sketch(result, moved_ids, target_ids, dpr, letters=row_names)
|
|
410
429
|
if icon is not None:
|
|
411
430
|
act.setIcon(icon)
|
|
412
431
|
_drop_empty_separators(menu)
|
|
@@ -67,6 +67,8 @@ def capture_scene(panel, movies=False) -> dict:
|
|
|
67
67
|
|
|
68
68
|
if hasattr(panel, "wait_for_pending_images"):
|
|
69
69
|
panel.wait_for_pending_images()
|
|
70
|
+
if hasattr(panel, "prepare_export"):
|
|
71
|
+
panel.prepare_export() # row letters laid out (headless)
|
|
70
72
|
bounds = panel.updateBounds()
|
|
71
73
|
width = float(bounds.width())
|
|
72
74
|
height = float(bounds.height())
|