pyfigures 0.2.1__tar.gz → 0.2.3__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.1/pyfigures.egg-info → pyfigures-0.2.3}/PKG-INFO +6 -6
- {pyfigures-0.2.1 → pyfigures-0.2.3}/README.md +2 -2
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/categorized_mcp.py +16 -9
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/existing_tools.py +44 -5
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/figure_state.py +3 -2
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/gui_selection.py +1 -1
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/launch.py +2 -1
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/live_mcp.py +19 -4
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/session.py +94 -2
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/annotation_editor.py +38 -12
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/ezfig.py +6 -2
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/pfgui.py +88 -1
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/qc_reports.py +7 -0
- pyfigures-0.2.3/pyfigures/gui/show_me_where.py +353 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_control.py +5 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/content.py +1536 -1514
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/core.py +18 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/export.py +39 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/self_test.py +15 -2
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/version.py +1 -1
- {pyfigures-0.2.1 → pyfigures-0.2.3/pyfigures.egg-info}/PKG-INFO +6 -6
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures.egg-info/SOURCES.txt +6 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures.egg-info/requires.txt +3 -3
- {pyfigures-0.2.1 → pyfigures-0.2.3}/setup.py +127 -127
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_assistant_live.py +19 -2
- pyfigures-0.2.3/tests/test_channels_property_20261105.py +54 -0
- pyfigures-0.2.3/tests/test_editor_rotate_and_tool_20261105.py +84 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_e2e_menus.py +8 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_licensing.py +49 -0
- pyfigures-0.2.3/tests/test_lut_remove_20261105.py +111 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_missing_images_gui.py +29 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_self_test.py +68 -2
- pyfigures-0.2.3/tests/test_show_me_where_20261105.py +213 -0
- pyfigures-0.2.3/tests/test_uneven_rows_20261105.py +156 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/LICENSE +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/images/__init__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/__init__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/__main__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/album/__init__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/album/__main__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/arrowheads.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/__init__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/advanced_annotations.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/assistant_actions.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/letter_sequence.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/live_structure.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/manual_help.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/manual_help_verified.json +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/native_gui.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/original_registry.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/partner_gui.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/plot_lifecycle.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/pointer_context.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/readability.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/recovery.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/result_evidence.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/assistant/submission_review.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/atomic_io.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/burned_text.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/colorbar_script.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/constant_panels.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/cvd.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/equations.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/extras.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/flip.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/__init__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/about_dialog_pzf.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/asingleoraspanel.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/autolettering_widget.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/bg_color_selection.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/bug_recorder.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/caption_dialog.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/colorassistant.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/ctrl_key.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/deckcraft_blank.json +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/dimchooser.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/drag_sketch.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/drop_sketch.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/editable_export.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/editor_interaction.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/emptyimagedialog.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/equation_dialog.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/fonts/README.md +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/fontselectorgui.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/group_builder_GUI.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/headless_ops.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/integrity_ops.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/journal_style_editor.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/keep_tst_images_for_pzf.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/label_rows.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/latex_code_dialog.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/latex_support.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/lutmultiselector.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/mcp_server_dialog.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/pagelimitswidget.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/panelcreationwidget.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/pdf_support.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/portable_fonts.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/region_picker.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/render_headless.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/review/__init__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/review/_template.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/review/dialog.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/review/html_export.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/review/send.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/scalebareditor.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/scrollableEZFIG.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/show_me_how.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/simple_text_editor.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/spaceselector.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/style_text_headless.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/svg_painter.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/textEditWatcher.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/theme.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/tipdialog.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/tutorial.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/user_extra_translation.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/user_prefs.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/video_support.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/widget_for_inset.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/gui/zoom_links.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/guides.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/history.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/icons/__init__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/icons/pyfigures.png +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/icons/pyfigures_album.png +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/icons/pyfigures_poster.png +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/image_search.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/journal_styles.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/latex_document.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/layout_formula.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/layout_picture.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_server.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/__init__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/annotations.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/app.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/guidance.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/image_search.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/journal.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/overlays.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/poster.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/qc.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/stacks.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/structure.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/upkeep.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/mcp_tools/workflow.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/office_math.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/offscreen.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/panel_source_preview.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/path_resolution.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/__init__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/__main__.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/page_presets.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_align.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_canvas.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_headless.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_layout_dialog.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_layouts.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_recipe.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_shapes.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_source_data.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_templates.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_text_dialog.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_web_export.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/poster_window.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/poster/serialization.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/qt_exit.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/recipe.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/script_helpers.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/source_snapshot.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/stack_info.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures/zoom_geometry.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures.egg-info/dependency_links.txt +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/pyfigures.egg-info/top_level.txt +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/setup.cfg +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_advanced_edit_tools.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_arrow_tip.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_arrowheads.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_atomic_io.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_audit_fixes.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_audit_fixes_20261008.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_backgrounds.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_bug_recorder.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_bugs_found_by_gui_e2e.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_canvas_context_menu.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_canvas_keyboard_and_clicks.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_codex_trial_findings.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_colour_bar_gui.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_consolidate_download.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_constant_panels.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_data_plots_and_stats.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_deserialization.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_dnd_canvas_more.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_dnd_combine_with_target.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_dnd_main_editor.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_draft_figure.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_drop_sketches.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_editable_export.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_editable_plot_text.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_editor_interaction.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_equations.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_exception_handler.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_export_waits_for_images.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_fig_rect_cache.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_figure_colors.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_figure_diff.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_fiji_formats.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_file_io_encoding.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_file_state_tracking.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_flip.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_folder_drag_and_drop.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_fonts_available.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_forbidden_files.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_e2e_context_menu.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_e2e_coverage.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_e2e_dnd.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_e2e_image_editor.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_e2e_monkey.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_e2e_tutorials.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_e2e_visual.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_menus_and_toolbar.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_more_actions.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_gui_workflow_actions.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_guide_routing.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_image_opacity_reload.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_image_search.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_integrity_and_stats.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_interactive_tools.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_internal_dnd_group_placement.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_inverted_luts.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_journal_styles.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_latex_code.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_latex_documents.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_latex_extras.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_latex_full.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_latex_stress_findings.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_launchers.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_layout_canvas_geometry.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_layout_formula.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_layout_stability_gui.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_lazy_reflow.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_lettering_restore.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_lif_series_reading.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_llm_feedback_20261020.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_max_height.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_mcp_audit_findings.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_mcp_control.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_mcp_history.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_mcp_server.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_mcp_stdio_protocol.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_mcp_text_arguments.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_normalization.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_offscreen_env.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_ome_zarr.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_omero.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_open_perf.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_panel_editor.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_panel_editor_more.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_panel_preview.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_parity_mcp.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_path_resolution.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_pdf_panels.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_placeholder_grid.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_portability.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_poster_files_and_recipe.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_poster_gui.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_poster_mcp.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_poster_stress_findings.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_poster_vector_figures.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_property_setters_validate.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_pyf_loader_thread_deadlock.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_pyf_loading.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_pymupdf_offer.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_qc_gui.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_qc_mcp_tools.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_qc_reports.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_qt_exit.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_recipe.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_recipe_checks_bundles.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_recipe_extra_keys.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_recipe_for_llms.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_recipe_more_keys.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_recordings.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_render_export.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_restyle_texts.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_review_and_library.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_ruler_labels.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_save_reminder.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_scale_bar_calibration.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_scale_consistency.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_schema_sweep_findings.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_send_to_poster.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_shapes.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_show_me_how.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_source_data.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_stack_tools.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_stack_tools_gui.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_stack_with_image.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_stress_findings.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_stress_findings_20261028.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_stress_findings_20261029.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_style_audit_calbar.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_svg_clipping_and_pdf_pages.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_svg_empty_glyph.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_tex_install.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_text_editor_and_widgets.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_tutorial_controller.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_tutorials.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_typography_tidy.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_user_chat_findings_20261104.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_user_findings_20261022.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_user_gui_findings_20261021.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_user_guide_menus.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_video_support.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_zarr_stress_findings.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/tests/test_zoom_callout_gui.py +0 -0
- {pyfigures-0.2.1 → pyfigures-0.2.3}/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.3
|
|
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
|
|
@@ -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.3
|
|
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.3; 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.3; 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"
|
|
@@ -281,7 +281,7 @@ Download them from the [latest release](https://github.com/baigouy/PyFigures/rel
|
|
|
281
281
|
|
|
282
282
|
- **Windows:** `PyFigures-Windows.zip`. Unzip it anywhere you can write (Documents, Desktop, a USB stick) and run `PyFigures.exe` (also `PyFigures Album.exe` and `PyFigures Poster.exe`). If SmartScreen warns about an unknown publisher, click *More info → Run anyway*. To remove it, delete the folder.
|
|
283
283
|
- **macOS:** `PyFigures-macOS-AppleSilicon.dmg` (M1 and newer) or `PyFigures-macOS-Intel.dmg`. Open it and drag the apps to *Applications*, or, without administrator rights, to the *Applications* folder inside your home folder (or any folder).
|
|
284
|
-
- **Linux:**
|
|
284
|
+
- **Linux (x86-64):** `PyFigures-Linux-x86_64.AppImage`, one file: make it executable (`chmod +x PyFigures-Linux-x86_64.AppImage`, or *Properties → Allow executing*) and double-click it; `--album` / `--poster` open the photo album / poster designers. If it does not start because FUSE is missing, run it with `--appimage-extract-and-run`, or use `PyFigures-Linux-x86_64.tar.gz` instead: unpack it anywhere and run `PyFigures/PyFigures`. Both need a Linux at least as recent as Ubuntu 22.04 (Debian 12, Fedora 36). The chat saves API keys in the desktop's key store (GNOME Keyring, KWallet).
|
|
285
285
|
|
|
286
286
|
**Supported Macs:** the macOS executables include video support, which needs **macOS 14 (Sonoma) or newer on Apple Silicon** Macs and macOS 11 or newer on Intel Macs. On older Apple Silicon systems the app still opens, but movies cannot be read or exported; older systems are not supported (install with Conda/pip instead, see above).
|
|
287
287
|
|
|
@@ -348,7 +348,7 @@ Optional (installed only if you ask for them):
|
|
|
348
348
|
### Licence of PyFigures and of the standalone executables
|
|
349
349
|
|
|
350
350
|
- **PyFigures' own source code is BSD 2-Clause** (see [LICENSE](LICENSE)). Installed with pip, it uses the libraries above under their own licences; note that PyQt6 and read-lif are GPL v3, so if you redistribute PyFigures together with them, that combination falls under the GPL v3.
|
|
351
|
-
- **The standalone executables (Windows / macOS) are distributed under the GNU GPL v3** as a whole, because they include PyQt6 and FFmpeg built with x264/x265. Qt is used under the LGPL v3 and is dynamically linked, so it can be replaced. They read PDFs with pypdfium2 (Apache/BSD); PyMuPDF (AGPL) is not included. Each executable contains the licence texts of everything inside it (*Help → About → Third-party licences*, or `THIRD_PARTY_LICENSES.txt` next to the Windows
|
|
351
|
+
- **The standalone executables (Windows / macOS / Linux) are distributed under the GNU GPL v3** as a whole, because they include PyQt6 and FFmpeg built with x264/x265. Qt is used under the LGPL v3 and is dynamically linked, so it can be replaced. They read PDFs with pypdfium2 (Apache/BSD); PyMuPDF (AGPL) is not included. Each executable contains the licence texts of everything inside it (*Help → About → Third-party licences*, or `THIRD_PARTY_LICENSES.txt` next to the Windows and Linux executables), and the **complete corresponding source code** of every bundled component is attached to the same GitHub release as the executables (`corresponding-source-*.tar`). This is generated automatically by [`packaging/collect_licenses.py`](packaging/collect_licenses.py) when the executables are built. [docs/LICENSING.md](docs/LICENSING.md) explains the reasoning.
|
|
352
352
|
|
|
353
353
|
# Other Figure-Making Software
|
|
354
354
|
|
|
@@ -190,7 +190,7 @@ Download them from the [latest release](https://github.com/baigouy/PyFigures/rel
|
|
|
190
190
|
|
|
191
191
|
- **Windows:** `PyFigures-Windows.zip`. Unzip it anywhere you can write (Documents, Desktop, a USB stick) and run `PyFigures.exe` (also `PyFigures Album.exe` and `PyFigures Poster.exe`). If SmartScreen warns about an unknown publisher, click *More info → Run anyway*. To remove it, delete the folder.
|
|
192
192
|
- **macOS:** `PyFigures-macOS-AppleSilicon.dmg` (M1 and newer) or `PyFigures-macOS-Intel.dmg`. Open it and drag the apps to *Applications*, or, without administrator rights, to the *Applications* folder inside your home folder (or any folder).
|
|
193
|
-
- **Linux:**
|
|
193
|
+
- **Linux (x86-64):** `PyFigures-Linux-x86_64.AppImage`, one file: make it executable (`chmod +x PyFigures-Linux-x86_64.AppImage`, or *Properties → Allow executing*) and double-click it; `--album` / `--poster` open the photo album / poster designers. If it does not start because FUSE is missing, run it with `--appimage-extract-and-run`, or use `PyFigures-Linux-x86_64.tar.gz` instead: unpack it anywhere and run `PyFigures/PyFigures`. Both need a Linux at least as recent as Ubuntu 22.04 (Debian 12, Fedora 36). The chat saves API keys in the desktop's key store (GNOME Keyring, KWallet).
|
|
194
194
|
|
|
195
195
|
**Supported Macs:** the macOS executables include video support, which needs **macOS 14 (Sonoma) or newer on Apple Silicon** Macs and macOS 11 or newer on Intel Macs. On older Apple Silicon systems the app still opens, but movies cannot be read or exported; older systems are not supported (install with Conda/pip instead, see above).
|
|
196
196
|
|
|
@@ -257,7 +257,7 @@ Optional (installed only if you ask for them):
|
|
|
257
257
|
### Licence of PyFigures and of the standalone executables
|
|
258
258
|
|
|
259
259
|
- **PyFigures' own source code is BSD 2-Clause** (see [LICENSE](LICENSE)). Installed with pip, it uses the libraries above under their own licences; note that PyQt6 and read-lif are GPL v3, so if you redistribute PyFigures together with them, that combination falls under the GPL v3.
|
|
260
|
-
- **The standalone executables (Windows / macOS) are distributed under the GNU GPL v3** as a whole, because they include PyQt6 and FFmpeg built with x264/x265. Qt is used under the LGPL v3 and is dynamically linked, so it can be replaced. They read PDFs with pypdfium2 (Apache/BSD); PyMuPDF (AGPL) is not included. Each executable contains the licence texts of everything inside it (*Help → About → Third-party licences*, or `THIRD_PARTY_LICENSES.txt` next to the Windows
|
|
260
|
+
- **The standalone executables (Windows / macOS / Linux) are distributed under the GNU GPL v3** as a whole, because they include PyQt6 and FFmpeg built with x264/x265. Qt is used under the LGPL v3 and is dynamically linked, so it can be replaced. They read PDFs with pypdfium2 (Apache/BSD); PyMuPDF (AGPL) is not included. Each executable contains the licence texts of everything inside it (*Help → About → Third-party licences*, or `THIRD_PARTY_LICENSES.txt` next to the Windows and Linux executables), and the **complete corresponding source code** of every bundled component is attached to the same GitHub release as the executables (`corresponding-source-*.tar`). This is generated automatically by [`packaging/collect_licenses.py`](packaging/collect_licenses.py) when the executables are built. [docs/LICENSING.md](docs/LICENSING.md) explains the reasoning.
|
|
261
261
|
|
|
262
262
|
# Other Figure-Making Software
|
|
263
263
|
|
|
@@ -51,7 +51,7 @@ def category_for(name):
|
|
|
51
51
|
return 'images'
|
|
52
52
|
if name in ('open_annotation_editor', 'roi_to_inset'):
|
|
53
53
|
return 'annotations'
|
|
54
|
-
if name in ('list_how_to_guides', 'explain_how', 'show_me_how', 'guidance_status', 'close_guidance'):
|
|
54
|
+
if name in ('list_how_to_guides', 'explain_how', 'show_me_how', 'show_me_where', 'guidance_status', 'close_guidance'):
|
|
55
55
|
return 'help'
|
|
56
56
|
if 'scale_bar' in name:
|
|
57
57
|
return 'scale_bars'
|
|
@@ -90,7 +90,7 @@ def build_server(full_server, send):
|
|
|
90
90
|
from .original_registry import registry
|
|
91
91
|
originals = set(registry())
|
|
92
92
|
names = originals | {'arrange_live_images', 'set_panel_letter_position', 'edit_live_label',
|
|
93
|
-
'edit_panel_letters', 'inspect_panel_letters', 'swap_live_panels', 'swap_rows', 'select_live_objects', 'open_annotation_editor', 'roi_to_inset', 'preview_panel', 'explain_live_interaction', 'save_live_figure',
|
|
93
|
+
'edit_panel_letters', 'inspect_panel_letters', 'swap_live_panels', 'swap_rows', 'select_live_objects', 'open_annotation_editor', 'show_me_where', 'roi_to_inset', 'preview_panel', 'explain_live_interaction', 'save_live_figure',
|
|
94
94
|
'list_recovery_snapshots', 'restore_recovery_snapshot', 'remove_scale_bar_all', 'ungroup_all_images', 'delete_last_rows', 'reverse_selected_row'}
|
|
95
95
|
names.discard('preview_panel_source') # the live preview_panel shows the open figure's panel
|
|
96
96
|
names.update({'open_annotation_properties','inspect_annotation_objects','edit_annotation_properties','review_submission_readiness','inspect_native_gui','use_native_gui','open_native_menu','native_gui_keys','native_gui_gesture','native_gui_drop_files'})
|
|
@@ -129,8 +129,10 @@ def build_server(full_server, send):
|
|
|
129
129
|
'A successful tool call is not task success. Report verified after-state; if counts show zero letters, '
|
|
130
130
|
'say letters are absent, never claim a lettering swap succeeded. '
|
|
131
131
|
'When the human supplies annotation content, such as write a text note on a named panel, create the ordinary annotation with add_annotation. Merely opening an editor does not fulfill a request to write the supplied content. Offer/open the editor for unspecified content or an explicit editor request. '
|
|
132
|
+
'Whenever you list choices for a change (and always for a HELP request such as "help me change the channel colours of e"), add one more choice: "show me where to click", which teaches the GUI. On that choice call show_me_where with EVERY route that does it (menu bar, right-click menu of the object at the right level: image or whole row, or the panel editor tab + buttons): all are outlined at once and cleared when it worked. Say what the yellow selection outline surrounds and what to click first. Open menus for the user (open_menus=true) only when they explicitly ask to be shown the menu; never click for them in that mode. '
|
|
133
|
+
'End every answer that tells how to do something in the GUI with: "Should I **highlight where to click**, or **open it for me**?". Highlight = show_me_where with every route of that answer; open it for me = the same call with open_menus=true (menus opened down to the entry to click, or where=editor: the panel editor opened on its tab, buttons outlined). Never perform the edit itself. '
|
|
132
134
|
'When no dedicated operation covers a GUI feature, discover native_gui: inspect actual native menu/dialog controls, invoke their exact IDs, complete or cancel the dialog, then verify jobs and document state. Queued is not success. Never substitute code for a normal manual how-to request. '
|
|
133
|
-
'For rearranging EXISTING images into regular rows/columns, prefer arrange_live_images once. Derive columns from current image count when a row count is requested;
|
|
135
|
+
'For rearranging EXISTING images into regular rows/columns, prefer arrange_live_images once. Derive columns from current image count when a row count is requested; when equal rows are impossible, ask which split the human wants, then pass it as row_counts (e.g. 9 images in 4 rows: row_counts=[3, 2, 2, 2]) in that ONE call. Reading order and letters are kept. Do not rebuild existing rows with per-image move loops. '
|
|
134
136
|
'To construct NEW rows/columns, call add_group and use its returned path before adding images/plots. Requested row numbers are not existing group paths. On a missing-container error inspect/create the intended container; never fall back into an unrelated existing row. '
|
|
135
137
|
'Discover relevant operations with find_pyfigures_tools; its results include exact '
|
|
136
138
|
'argument schemas. Execute the selected operation with use_pyfigures_tool. '
|
|
@@ -157,6 +159,7 @@ def build_server(full_server, send):
|
|
|
157
159
|
'Is a font available? Use list_fonts(query=the_font), answer from font_check. '
|
|
158
160
|
'Fake, dummy or placeholder images, or a layout before the images exist ("3 rows of 2 panels"): add_placeholder_grid in one call, never invented scripted images; the user fills the grey slots later (fill_template or drag and drop). '
|
|
159
161
|
'figure_summary in the state answers "what is in the figure?". When it says empty=true, reply at once from its answer and how_to_add_content, without calling tools or previewing. '
|
|
162
|
+
'PyFigures cannot reorder channels, but every channel colour can be set on its own, which gives the same picture. For "swap channels 3->1, 1->2, 2->3" say so, then offer: do it now (set_lut with the channel_colours of the panel permuted: what each channel shows now, its LUT or else the own colour of the file; [RED, GREEN, BLUE] swapped 1<->2 is luts=["GREEN", "RED", "BLUE"]), or how to do it yourself in the GUI (right-click the image > Appearance > Set LUT(s); double-click it > File Infos + Scale tab > Set LUTs; Annotations > Figure colours… for every image), with a chat example such as "make channel 1 blue, channel 2 red, channel 3 green". The channels property is only show/hide. '
|
|
160
163
|
'Colours named without a target ("use magenta and green"): on a figure whose only coloured things are multichannel images they mean the CHANNEL colours (set_figure_colors, one per channel in channel order). If it also has coloured ROIs, arrows or text, or the colours could fit several things, ASK which ones the user means before changing anything. Which colour names work? list_colors(query=the_colour), answer from color_check. '
|
|
161
164
|
'Which LUTs/colour tables exist, or is a LUT available? Use list_luts(query=the_name), answer from lut_check and pass its exact_key to set_lut. In set_lut, null keeps a channel unchanged. '
|
|
162
165
|
'Column headers or a heading above/below a row: add_label_row(group_path=[row index], labels=[one per image] or one string). A label left/right of a row: add_side_label. add_annotation writes text INSIDE an image, not beside a row. '
|
|
@@ -218,8 +221,12 @@ def build_server(full_server, send):
|
|
|
218
221
|
"""Find operations and retrieve their exact arguments before executing. Search natural words (e.g. spacing, panel letter position, scale bar), optionally within a category. Default at most six schemas; use offset for more. No GUI edits. Leave compact unset: the client sets it when its context is filling."""
|
|
219
222
|
if category and category not in CATEGORIES:
|
|
220
223
|
raise ValueError('Unknown category. Use list_pyfigures_categories.')
|
|
221
|
-
|
|
222
|
-
|
|
224
|
+
# a model asked for limit=20 and lost a step to the error: clamp instead
|
|
225
|
+
limit = min(max(int(limit or 6), 1), 12)
|
|
226
|
+
offset = max(int(offset or 0), 0)
|
|
227
|
+
# operations named exactly ('move_image schema') come first, with no how-to guides:
|
|
228
|
+
# a model searched move_image ~20 times and got scale-bar guides each time
|
|
229
|
+
named = {n for n in available if re.search(r'(?<![a-z0-9_])' + re.escape(n.lower()) + r'(?![a-z0-9_])', query.lower())}
|
|
223
230
|
words = re.findall(r'[a-z0-9]+', query.lower())
|
|
224
231
|
aliases = {'gaps': 'spacing', 'gap': 'spacing', 'letters': 'letter',
|
|
225
232
|
'labels': 'label', 'rows': 'row', 'images': 'image', 'fonts': 'font',
|
|
@@ -233,7 +240,7 @@ def build_server(full_server, send):
|
|
|
233
240
|
title = name.replace('_', ' ')
|
|
234
241
|
help_text = tool.description.lower()
|
|
235
242
|
score = sum(5 * (w in title) + (w in help_text) for w in words)
|
|
236
|
-
if query.strip().lower()==name.lower():score+=1000
|
|
243
|
+
if query.strip().lower()==name.lower() or name in named:score+=1000
|
|
237
244
|
# Concrete output/metadata intent must outrank generic figure inspection.
|
|
238
245
|
if name=='export_figure' and any(w in ('export','png','svg','pdf','tiff','jpeg') for w in words):score+=320
|
|
239
246
|
if name in ('set_figure_caption','get_figure_caption') and 'caption' in words:
|
|
@@ -334,7 +341,7 @@ def build_server(full_server, send):
|
|
|
334
341
|
mode = os.environ.get('PYFIGURES_COMPACT_DISCOVERY', 'auto')
|
|
335
342
|
compact = mode == '1' or (mode != '0' and bool(compact))
|
|
336
343
|
for rank, (_, n, t, c) in enumerate(ranked[offset:offset + limit]):
|
|
337
|
-
if compact and rank >= FULL_SCHEMAS and query.strip().lower() != n.lower():
|
|
344
|
+
if compact and rank >= FULL_SCHEMAS and query.strip().lower() != n.lower() and n not in named:
|
|
338
345
|
summary = re.split(r'(?<=[.!?])\s', t.description.strip(), maxsplit=1)[0][:160]
|
|
339
346
|
found.append({'name': n, 'category': c, 'summary': summary,
|
|
340
347
|
'schema': 'not included: call find_pyfigures_tools(query="' + n + '") for it, or call the operation; a wrong argument returns its exact schema'})
|
|
@@ -347,7 +354,7 @@ def build_server(full_server, send):
|
|
|
347
354
|
found.append({'name': n, 'callable_directly': n in server._tool_manager._tools, 'dispatcher': 'use_pyfigures_tool', 'category': c, 'description': t.description,
|
|
348
355
|
'arguments_schema': schema})
|
|
349
356
|
manual_guides=None
|
|
350
|
-
if query:
|
|
357
|
+
if query and not named:
|
|
351
358
|
from .manual_help import explain
|
|
352
359
|
candidate=explain(query)
|
|
353
360
|
if candidate.get('status') in ('explained','source_reviewed'):
|
|
@@ -359,7 +366,7 @@ def build_server(full_server, send):
|
|
|
359
366
|
manual_guides={'status':'ambiguous','operation_executed':False,
|
|
360
367
|
'guides':[g for g in close if g.get('status')=='explained'],
|
|
361
368
|
'answer_style':'Pick the guide matching the question; human GUI steps, no tool commands.'}
|
|
362
|
-
if manual_guides is None and any(w in ('keyboard','shortcut','shortcuts','drag','drop','dnd','split','channel','channels') for w in words):
|
|
369
|
+
if manual_guides is None and not named and any(w in ('keyboard','shortcut','shortcuts','drag','drop','dnd','split','channel','channels') for w in words):
|
|
363
370
|
from .manual_help import explain
|
|
364
371
|
topic='split' if any(w in ('split','channel','channels') for w in words) else ('drag_and_drop' if any(w in ('drag','drop','dnd') for w in words) else 'shortcuts')
|
|
365
372
|
manual_guides=explain(topic)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Adapters over existing PyFigures file tools; originals are imported, never edited."""
|
|
2
2
|
import inspect
|
|
3
|
+
import re
|
|
3
4
|
import xml.etree.ElementTree as ET
|
|
4
5
|
from pyfigures.mcp_tools import structure as tools
|
|
5
6
|
from .original_registry import registry, live_parameter, encode
|
|
@@ -57,7 +58,38 @@ def run(path, calls, read_only=False):
|
|
|
57
58
|
raise ValueError(str(exc)) from exc
|
|
58
59
|
|
|
59
60
|
|
|
60
|
-
def
|
|
61
|
+
def parse_row_counts(value):
|
|
62
|
+
"""Images per row: 3, "3", [3, 2, 2, 2] or "3-2-2-2" (also "3,2,2,2" / "3 2 2 2").
|
|
63
|
+
|
|
64
|
+
Returns (columns, row_counts): an equal split keeps row_counts None.
|
|
65
|
+
"""
|
|
66
|
+
if isinstance(value, bool):
|
|
67
|
+
raise ValueError('images per row must be a number such as 3 or one number per row such as 3-2-2-2')
|
|
68
|
+
if isinstance(value, int):
|
|
69
|
+
return value, None
|
|
70
|
+
if isinstance(value, str):
|
|
71
|
+
# 'x' separates only two numbers ("3x2"); "3-x" is not a number per row
|
|
72
|
+
parts = [p for p in re.split(r'(?<=\d)\s*[x×]\s*(?=\d)|[\s,;/+-]+', value.strip()) if p]
|
|
73
|
+
if not parts or not all(p.isdigit() for p in parts):
|
|
74
|
+
raise ValueError(f'"{value}" is not a number of images per row (e.g. 3) or one number per row (e.g. 3-2-2-2)')
|
|
75
|
+
value = [int(p) for p in parts]
|
|
76
|
+
if isinstance(value, (list, tuple)):
|
|
77
|
+
if not value or not all(type(n) is int for n in value):
|
|
78
|
+
raise ValueError('row_counts must be a list of whole numbers, one per row, e.g. [3, 2, 2, 2]')
|
|
79
|
+
if len(value) == 1:
|
|
80
|
+
return value[0], None
|
|
81
|
+
return max(value), list(value)
|
|
82
|
+
raise ValueError('images per row must be a number such as 3 or one number per row such as 3-2-2-2')
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def arrange_rows(path, columns, width, spacing, row_counts=None):
|
|
86
|
+
"""Regroup every image panel into rows, in reading order: `columns` per row
|
|
87
|
+
(the last row may be shorter) or exactly `row_counts` (e.g. [3, 2, 2, 2])."""
|
|
88
|
+
if row_counts is not None:
|
|
89
|
+
if (not isinstance(row_counts, (list, tuple)) or not row_counts or len(row_counts) > 100
|
|
90
|
+
or not all(type(n) is int and 1 <= n <= 100 for n in row_counts)):
|
|
91
|
+
raise ValueError('row_counts must list 1 to 100 rows of 1 to 100 images each, e.g. [3, 2, 2, 2]')
|
|
92
|
+
columns = max(row_counts)
|
|
61
93
|
if type(columns) is not int or not 1 <= columns <= 100:
|
|
62
94
|
raise ValueError('columns must be an integer from 1 to 100')
|
|
63
95
|
if type(width) is not int or not 32 <= width <= 20000:
|
|
@@ -86,21 +118,28 @@ def arrange_rows(path, columns, width, spacing):
|
|
|
86
118
|
root.remove(node)
|
|
87
119
|
if not images:
|
|
88
120
|
raise ValueError('No image panels to arrange')
|
|
89
|
-
|
|
121
|
+
if row_counts is not None and sum(row_counts) != len(images):
|
|
122
|
+
raise ValueError(f'row_counts {"-".join(map(str, row_counts))} places {sum(row_counts)} images but the figure '
|
|
123
|
+
f'has {len(images)}; give one number per row adding up to {len(images)}. Nothing was changed.')
|
|
124
|
+
counts = list(row_counts) if row_counts is not None else [
|
|
125
|
+
min(columns, len(images) - start) for start in range(0, len(images), columns)]
|
|
126
|
+
start = 0
|
|
127
|
+
for row, count in enumerate(counts):
|
|
90
128
|
group = _new_group_elem('X', spacing, row + 1)
|
|
91
129
|
group.find('size').text = str(float(width))
|
|
92
|
-
group.find('content').extend(images[start:start +
|
|
130
|
+
group.find('content').extend(images[start:start + count])
|
|
93
131
|
root.insert(row, group)
|
|
132
|
+
start += count
|
|
94
133
|
# Preserve standalone labels after the rows; their exact old position may change.
|
|
95
134
|
for offset, label in enumerate(labels):
|
|
96
|
-
root.insert(
|
|
135
|
+
root.insert(len(counts) + offset, label)
|
|
97
136
|
checked(tools.write_xml(path, ET.tostring(root, encoding='unicode')))
|
|
98
137
|
from pathlib import Path
|
|
99
138
|
before_layout = Path(path).read_bytes()
|
|
100
139
|
checked(tools.recompute_layout(path))
|
|
101
140
|
from .partner_gui import carry_policies
|
|
102
141
|
Path(path).write_bytes(carry_policies(before_layout, Path(path).read_bytes()))
|
|
103
|
-
return {'image_count': len(images), 'rows':
|
|
142
|
+
return {'image_count': len(images), 'rows': len(counts), 'images_per_row': counts,
|
|
104
143
|
'columns': columns, 'preserved_labels': len(labels),
|
|
105
144
|
'note': 'Existing group structure replaced; image traversal order and panel annotations retained. Standalone labels placed after image rows.'}
|
|
106
145
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Small verified figure memory and strict property-preservation checks."""
|
|
2
2
|
FIELDS = ('text', 'placement', 'font_family', 'font_size', 'color', 'background', 'opacity', 'bold', 'italic', 'underline')
|
|
3
|
+
MOVE_HINT = 'To regroup images into rows (equal or uneven, e.g. 3-2-2-2) use arrange_live_images with columns or row_counts in ONE call; it keeps reading order and letters. To move single images, move them so the reading order stays the same.'
|
|
3
4
|
REQUEST_FIELDS = {'placement': 'placement', 'font_family': 'font_family', 'font_size': 'font_size',
|
|
4
5
|
'color_value': 'color', 'background': 'background'}
|
|
5
6
|
|
|
@@ -44,7 +45,7 @@ def movement_changes(before, after):
|
|
|
44
45
|
texts = [a['text'] for a in panel['letters']]
|
|
45
46
|
candidates = [p for p in candidates if [a['text'] for a in p['letters']] == texts]
|
|
46
47
|
if len(candidates) != 1:
|
|
47
|
-
raise ValueError('MOVE_VERIFICATION_FAILED: Cannot uniquely match image identity; edit rolled back.
|
|
48
|
+
raise ValueError('MOVE_VERIFICATION_FAILED: Cannot uniquely match image identity; edit rolled back. ' + MOVE_HINT)
|
|
48
49
|
matched = candidates[0]
|
|
49
50
|
known[panel['filename']].remove(matched)
|
|
50
51
|
aligned.append({**matched, 'panel_id': panel['panel_id']})
|
|
@@ -52,7 +53,7 @@ def movement_changes(before, after):
|
|
|
52
53
|
raise ValueError('MOVE_VERIFICATION_FAILED: Image count changed; edit rolled back.')
|
|
53
54
|
deltas = changes({**before, 'panels': aligned}, after)
|
|
54
55
|
if deltas:
|
|
55
|
-
raise ValueError('MOVE_VERIFICATION_FAILED:
|
|
56
|
+
raise ValueError('MOVE_VERIFICATION_FAILED: this move changes the panel letters (their reading order); edit rolled back. ' + MOVE_HINT)
|
|
56
57
|
return deltas
|
|
57
58
|
|
|
58
59
|
|
|
@@ -102,7 +102,7 @@ def open_editor(session, panel_ref=None, tab=None):
|
|
|
102
102
|
if not any(p is panel for _, _, p in panels(canvas.shapes_to_draw)):
|
|
103
103
|
raise ValueError('Panel changed before editor opened')
|
|
104
104
|
session._annotation_editor_status = 'open'
|
|
105
|
-
canvas.update_image_annotations(image2d=panel, tab=title)
|
|
105
|
+
canvas.update_image_annotations(image2d=panel, tab=title, draw_tool=False)
|
|
106
106
|
current = resolve_panel(window, panel_id)
|
|
107
107
|
if current is not panel and policy is not None and not getattr(current, POLICY, None):
|
|
108
108
|
# Native clone drops prototype-only extension metadata.
|
|
@@ -202,8 +202,9 @@ def sidecar_config(descriptor=None):
|
|
|
202
202
|
config.provider, config.base_url, config.model = 'compatible', LM_STUDIO_URL, model
|
|
203
203
|
config.adapter ={**(config.adapter or {}), 'type': 'pyfigures', 'descriptor': descriptor}
|
|
204
204
|
config.servers = {**(config.servers or {}), 'pyfigures': mcp_server_entry()}
|
|
205
|
-
from pyfigures.mcp_control import MODEL_WARNING
|
|
205
|
+
from pyfigures.mcp_control import MODEL_WARNING, REMOTE_MODEL_WARNING
|
|
206
206
|
config.notice = MODEL_WARNING # the line always shown under the chat
|
|
207
|
+
config.remote_notice = REMOTE_MODEL_WARNING # added only for an online provider
|
|
207
208
|
return config
|
|
208
209
|
|
|
209
210
|
|
|
@@ -101,10 +101,12 @@ def preview_live_figure(session_id: str, expected_revision: int) -> Image:
|
|
|
101
101
|
|
|
102
102
|
@mcp.tool()
|
|
103
103
|
def arrange_live_images(session_id: str, expected_revision: int, request_id: str,
|
|
104
|
-
columns: int = 4, row_width_px: int = 0, spacing_px: int = 3
|
|
105
|
-
|
|
104
|
+
columns: int = 4, row_width_px: int = 0, spacing_px: int = 3,
|
|
105
|
+
row_counts: list[int] | None = None) -> dict:
|
|
106
|
+
"""Regroup ALL image panels into horizontal rows, in current reading order (letters keep their order): columns images per row (final row may be shorter), OR row_counts = images in each row for uneven rows, e.g. [3, 2, 2, 2] for 9 images in 4 rows (must add up to the image count). Preserve panel annotations/crops/insets; replace previous group structure. Standalone labels follow rows; nested text rows are rejected. Uses existing PyFigures XML/layout tools on a temporary snapshot. One undo step; no save. row_width_px=0 keeps GUI width."""
|
|
106
107
|
return request('arrange_rows', session_id, expected_revision,
|
|
107
|
-
dict(columns=columns, row_width_px=row_width_px, spacing_px=spacing_px
|
|
108
|
+
dict(columns=columns, row_width_px=row_width_px, spacing_px=spacing_px,
|
|
109
|
+
row_counts=row_counts), request_id)
|
|
108
110
|
|
|
109
111
|
|
|
110
112
|
@mcp.tool()
|
|
@@ -236,10 +238,23 @@ def select_live_objects(panel_refs: list[str] | None = None, group_paths: list[l
|
|
|
236
238
|
|
|
237
239
|
@mcp.tool()
|
|
238
240
|
def open_annotation_editor(panel_ref: str | None = None, tab: str | None = None) -> dict:
|
|
239
|
-
"""Select a named panel and open its NATIVE annotation editor, just like GUI double-click, FOR THE USER to work in. tab: the tab it opens on, matching what the user wants to do there: 'crop' or 'rotate' (Rotate + Crop), 'text' (Texts), 'scale' (File Infos + Scale
|
|
241
|
+
"""Select a named panel and open its NATIVE annotation editor, just like GUI double-click, FOR THE USER to work in. tab: the tab it opens on, matching what the user wants to do there: 'crop' or 'rotate' (Rotate + Crop), 'text' (Texts), 'scale' (File Infos + Scale: pixel size, channels and their colours / LUTs, Reset all LUTs), 'script', 'export' (Export style), 'layers'; default 'annotations' (drawing ROIs, arrows). Only when the user asks for the editor: it blocks every other tool until the user presses OK/Cancel, and no tool can close it. Never open it to make an edit yourself (inset where the user clicked: roi_to_inset; ROIs, arrows, text: their tools). Omit panel_ref only when one panel is already selected. Does not invent/add annotations; human uses native OK/Cancel. Result scheduled means opening requested, not annotation completed. For a vague annotate-panel request first ask what annotation to add or offer this editor. Never add placeholder text like Panel o."""
|
|
240
242
|
return call_live('open_annotation_editor', dict(panel_ref=panel_ref, tab=tab))
|
|
241
243
|
|
|
242
244
|
|
|
245
|
+
@mcp.tool()
|
|
246
|
+
def show_me_where(routes: list[list[str]] | None = None, where: str = 'menu', panel_ref: str | None = None,
|
|
247
|
+
level: str = 'image', editor_tab: str | None = None, controls: list[str] | None = None,
|
|
248
|
+
note: str | None = None, open_menus: bool = False, stop: bool = False) -> dict:
|
|
249
|
+
"""TEACH the user where to click instead of doing it: outlines in orange EVERY entry on the given routes at once, so the user can follow whichever route they like and try things; every highlight disappears as soon as the figure changes (it worked). Nothing is clicked or edited and the mouse pointer never moves.
|
|
250
|
+
routes: one list of entry titles per possible route, e.g. [["Edit", "Arrange all images in rows…"]] (where='menu', the menu bar, checked against the real menus: a wrong title returns what that level offers), or [["Crop & size", "Reset crop only"], ["Crop & size", "Reset crop and rotation"]] (where='context', the right-click menu of the object panel_ref selects at *level*: 'image' or its whole 'row'; the yellow outline shows it). where='editor': the panel editor's editor_tab (e.g. 'File Infos + Scale') and controls (button titles, e.g. ['Reset all LUTs']) are outlined when the user opens the editor (double-click the panel).
|
|
251
|
+
open_menus=True opens the menus for the user down to where the routes split (where='editor': opens the panel editor of panel_ref on editor_tab, its buttons outlined): ONLY when the user explicitly asks ("show me the right-click menu", "open it for me"). stop=True removes the highlights. Offer this as a choice whenever you list options for a change; the user learns the GUI.
|
|
252
|
+
Follow-ups to a how-to answer: "highlight where to click" = every route, open_menus=False; "open it for me" = the same routes with open_menus=True. Never perform the edit itself."""
|
|
253
|
+
return call_live('show_me_where', dict(routes=routes or [], where=where, panel_ref=panel_ref, level=level,
|
|
254
|
+
editor_tab=editor_tab, controls=controls, note=note,
|
|
255
|
+
open_menus=open_menus, stop=stop))
|
|
256
|
+
|
|
257
|
+
|
|
243
258
|
@mcp.tool()
|
|
244
259
|
def preview_panel(panel_ref: str, brighten: bool = True) -> list:
|
|
245
260
|
"""See ONE panel's whole source image, uncropped, with pixel rulers and its current crop as a dashed yellow box. Use it BEFORE transform_image crops ("crop to the nuclei", "zoom on the cells"): read the region's pixel coordinates off the rulers, then crop once (crop_left=x0, crop_top=y0, crop_right=width-x1, crop_bottom=height-y1). Never remove a crop just to look at the whole image: this shows it. brighten stretches the contrast of this preview only (dim fluorescence); the figure is unchanged. Read-only."""
|
|
@@ -89,7 +89,10 @@ class Session:
|
|
|
89
89
|
# answers "is c calibrated?", "any scale bars?", "which colours?" without another tool
|
|
90
90
|
'pixel_size': getattr(p, 'px_to_unit_conversion_factor', None) or None, # 0 = not set
|
|
91
91
|
'scale_bars': sum(type(a).__name__ == 'ScaleBar' for a in (p.annotations or [])),
|
|
92
|
-
'luts': [str(l) if l is not None else None for l in (getattr(p, 'LUTs', None) or [])] or None
|
|
92
|
+
'luts': [str(l) if l is not None else None for l in (getattr(p, 'LUTs', None) or [])] or None,
|
|
93
|
+
# what each channel really shows (its LUT, else the file's own colour):
|
|
94
|
+
# "swap channels 1 and 2" permutes these (user chat 2026-11-05)
|
|
95
|
+
'channel_colours': channel_colours(p)}
|
|
93
96
|
for gp, ix, p in panels(self.window.paint.EZFIG_panel.shapes_to_draw)]
|
|
94
97
|
from .advanced_annotations import describe, text_inspection_record
|
|
95
98
|
annotations = [text_inspection_record(a, '/'.join(map(str, (*gp, ix))), gp, ix,
|
|
@@ -264,7 +267,7 @@ class Session:
|
|
|
264
267
|
elif op == 'arrange_rows':
|
|
265
268
|
response = arrange_rows(path, args.get('columns', 4),
|
|
266
269
|
args.get('row_width_px') or int(w.size_spinbox.value()),
|
|
267
|
-
args.get('spacing_px', 3))
|
|
270
|
+
args.get('spacing_px', 3), args.get('row_counts') or None)
|
|
268
271
|
else:
|
|
269
272
|
response = run(path, args['calls'])
|
|
270
273
|
# Original tools only touched a temporary snapshot so far.
|
|
@@ -295,6 +298,43 @@ class Session:
|
|
|
295
298
|
if not panel.grab().save(str(output)):
|
|
296
299
|
raise RuntimeError('Could not capture canvas')
|
|
297
300
|
result = {'path': str(output), 'revision': self.revision}
|
|
301
|
+
elif op == 'show_me_where':
|
|
302
|
+
# teach, never click: highlight every route, clear on success
|
|
303
|
+
from ..gui.show_me_where import ClickGuide
|
|
304
|
+
if getattr(self, 'click_guide', None) is None:
|
|
305
|
+
self.click_guide = ClickGuide(w)
|
|
306
|
+
if args.get('stop'):
|
|
307
|
+
self.click_guide.stop()
|
|
308
|
+
result = self.click_guide.status()
|
|
309
|
+
else:
|
|
310
|
+
ref, level = args.get('panel_ref'), args.get('level') or 'image'
|
|
311
|
+
if level not in ('image', 'row'):
|
|
312
|
+
raise ValueError("level must be 'image' or 'row'")
|
|
313
|
+
if ref:
|
|
314
|
+
from .gui_selection import resolve_panel
|
|
315
|
+
target = resolve_panel(w, ref)
|
|
316
|
+
if level == 'row':
|
|
317
|
+
target = next((top for top in panel.shapes_to_draw
|
|
318
|
+
if top is target or _contains(top, target)), target)
|
|
319
|
+
panel.set_current_selection(target)
|
|
320
|
+
panel.update()
|
|
321
|
+
where = args.get('where') or 'menu'
|
|
322
|
+
open_menus = bool(args.get('open_menus', False))
|
|
323
|
+
tab = args.get('editor_tab')
|
|
324
|
+
if where == 'editor' and tab:
|
|
325
|
+
from .gui_selection import editor_tab
|
|
326
|
+
tab = editor_tab(tab) # 'scale' -> 'File Infos + Scale', the title to outline
|
|
327
|
+
result = self.click_guide.start(args.get('routes') or [], where=where,
|
|
328
|
+
controls=args.get('controls'), editor_tab=tab,
|
|
329
|
+
note=args.get('note'), open_menus=open_menus)
|
|
330
|
+
if where == 'editor' and open_menus and result.get('status') == 'guidance_shown':
|
|
331
|
+
# "open it for me": the editor opens on its tab, the buttons stay outlined
|
|
332
|
+
from .gui_selection import open_editor
|
|
333
|
+
opened = open_editor(self, panel_ref=ref, tab=tab)
|
|
334
|
+
result = {**result, 'editor': opened['status'], 'tab': opened['tab']}
|
|
335
|
+
elif op == 'show_me_where_status':
|
|
336
|
+
guide = getattr(self, 'click_guide', None)
|
|
337
|
+
result = guide.status() if guide is not None else {'status': 'idle', 'operation_executed': False}
|
|
298
338
|
elif op == 'panel_source':
|
|
299
339
|
# one panel's whole source with pixel rulers, to choose crop values
|
|
300
340
|
from .gui_selection import resolve_panel
|
|
@@ -695,6 +735,58 @@ _SOURCE_KEYS = ('path', 'paths', 'file', 'files', 'filename', 'filenames', 'csv'
|
|
|
695
735
|
_OUTPUT_WORDS = ('out', 'save', 'export', 'dest')
|
|
696
736
|
|
|
697
737
|
|
|
738
|
+
_PLAIN_COLOURS = {'RED': (1, 0, 0), 'GREEN': (0, 1, 0), 'BLUE': (0, 0, 1), 'GRAY': (1, 1, 1),
|
|
739
|
+
'MAGENTA': (1, 0, 1), 'CYAN': (0, 1, 1), 'YELLOW': (1, 1, 0)}
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
def lut_colour_name(lut):
|
|
743
|
+
"""The plain LUT name a file's own colour table matches (its brightest
|
|
744
|
+
colour: an LSM 'green' channel -> GREEN), or 'custom'."""
|
|
745
|
+
import numpy as np
|
|
746
|
+
try:
|
|
747
|
+
a = np.asarray(lut, dtype=float)
|
|
748
|
+
end = a[:, -1] if a.shape[0] == 3 else a[-1, :3]
|
|
749
|
+
top = end.max()
|
|
750
|
+
if top <= 0:
|
|
751
|
+
return 'custom'
|
|
752
|
+
end = end / top
|
|
753
|
+
name, dist = min(((n, float(np.abs(end - c).sum())) for n, c in _PLAIN_COLOURS.items()), key=lambda x: x[1])
|
|
754
|
+
return name if dist < 0.6 else 'custom'
|
|
755
|
+
except Exception:
|
|
756
|
+
return 'custom'
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
def channel_colours(panel):
|
|
760
|
+
"""Per channel, the colour it is shown in: its LUT when set, else the
|
|
761
|
+
image file's own LUT (named by lut_colour_name). None when unknown
|
|
762
|
+
(image not loaded or single channel without a LUT)."""
|
|
763
|
+
set_luts = list(getattr(panel, 'LUTs', None) or [])
|
|
764
|
+
img = getattr(panel, 'img', None)
|
|
765
|
+
meta = getattr(img, 'metadata', None) or {}
|
|
766
|
+
file_luts = list(meta.get('LUTs') or []) if isinstance(meta, dict) else []
|
|
767
|
+
n = max(len(set_luts), len(file_luts))
|
|
768
|
+
if n < 1:
|
|
769
|
+
return None
|
|
770
|
+
out = []
|
|
771
|
+
for i in range(n):
|
|
772
|
+
mine = set_luts[i] if i < len(set_luts) else None
|
|
773
|
+
if isinstance(mine, str) and mine.strip():
|
|
774
|
+
out.append(mine.upper())
|
|
775
|
+
elif i < len(file_luts) and file_luts[i] is not None:
|
|
776
|
+
out.append(file_luts[i].upper() if isinstance(file_luts[i], str) else lut_colour_name(file_luts[i]))
|
|
777
|
+
else:
|
|
778
|
+
out.append(None)
|
|
779
|
+
return out if any(out) else None
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
def _contains(group, target):
|
|
783
|
+
"""True when *target* is somewhere inside *group* (a row, column or panel)."""
|
|
784
|
+
for child in getattr(group, 'content', None) or []:
|
|
785
|
+
if child is target or _contains(child, target):
|
|
786
|
+
return True
|
|
787
|
+
return False
|
|
788
|
+
|
|
789
|
+
|
|
698
790
|
def resolve_relative_sources(window, arguments, skip=None):
|
|
699
791
|
"""A bare file name from a model ("kidney.tif") was opened from whatever
|
|
700
792
|
folder PyFigures was started in (Figure 3 chat runs, 2026-11-02). Look for
|
|
@@ -92,6 +92,9 @@ class VectorialDrawPane2(QWidget):
|
|
|
92
92
|
self.background = background # this will code for the bg image over which we will always draw over --> TODO
|
|
93
93
|
self.rotate_n_crop_polygon = None
|
|
94
94
|
self.rotate_n_crop_lines = None # {side: (QPointF, QPointF)} for color-coded borders
|
|
95
|
+
# where image pixel (0, 0) is drawn: moved right/down when a rotated crop
|
|
96
|
+
# frame reaches past the image's top / left edge, so it is all visible
|
|
97
|
+
self.view_origin = QPointF(0, 0)
|
|
95
98
|
self.crops = [] # this will contain all the crops the user generated so that they can be exported easily!!!
|
|
96
99
|
self.add_text_button = None
|
|
97
100
|
self.filter_out_unwanted_shapes_based_on_distance = True # if set to True the tool will attempt to filter accidental drawings by the user (based on distance between draw points)
|
|
@@ -148,6 +151,19 @@ class VectorialDrawPane2(QWidget):
|
|
|
148
151
|
self.scaleChanged.emit(self.scale)
|
|
149
152
|
|
|
150
153
|
|
|
154
|
+
def _image_point(self, event):
|
|
155
|
+
"""The mouse position in image pixels."""
|
|
156
|
+
return event.position() / self.scale - self.view_origin
|
|
157
|
+
|
|
158
|
+
def frame_extent(self):
|
|
159
|
+
"""(origin, bottom-right) for the rotated crop frame, in image pixels:
|
|
160
|
+
the origin keeps its top / left part on screen (user report 2026-11-05)."""
|
|
161
|
+
if not self.rotate_n_crop_lines:
|
|
162
|
+
return QPointF(0, 0), None
|
|
163
|
+
pts = [p for pair in self.rotate_n_crop_lines.values() for p in pair]
|
|
164
|
+
origin = QPointF(max(0.0, -min(p.x() for p in pts)), max(0.0, -min(p.y() for p in pts)))
|
|
165
|
+
return origin, QPointF(max(p.x() for p in pts), max(p.y() for p in pts))
|
|
166
|
+
|
|
151
167
|
def updateBoudingRect(self):
|
|
152
168
|
objects = []
|
|
153
169
|
if self.background:
|
|
@@ -464,6 +480,8 @@ class VectorialDrawPane2(QWidget):
|
|
|
464
480
|
painter.save()
|
|
465
481
|
if self.scale != 1.0:
|
|
466
482
|
painter.scale(self.scale, self.scale)
|
|
483
|
+
if self.view_origin.x() or self.view_origin.y():
|
|
484
|
+
painter.translate(self.view_origin)
|
|
467
485
|
|
|
468
486
|
if self.background is not None:
|
|
469
487
|
self.background.draw_bg(painter, parent=None, restore_painter_in_the_end=False)
|
|
@@ -484,7 +502,8 @@ class VectorialDrawPane2(QWidget):
|
|
|
484
502
|
else:
|
|
485
503
|
pass
|
|
486
504
|
|
|
487
|
-
if self.rotate_n_crop_polygon:
|
|
505
|
+
if self.rotate_n_crop_polygon and not self.rotate_n_crop_lines:
|
|
506
|
+
# (the coloured frame below is the rotated outline; this cyan one stayed upright)
|
|
488
507
|
painter.save()
|
|
489
508
|
pen = QPen(Qt.cyan, 2)
|
|
490
509
|
painter.setPen(pen)
|
|
@@ -749,8 +768,8 @@ class VectorialDrawPane2(QWidget):
|
|
|
749
768
|
# self.can_go_deeper = False
|
|
750
769
|
if event.button() == Qt.LeftButton:
|
|
751
770
|
self.drawing = True
|
|
752
|
-
self.lastPoint =
|
|
753
|
-
self.firstPoint =
|
|
771
|
+
self.lastPoint = self._image_point(event)
|
|
772
|
+
self.firstPoint = self._image_point(event)
|
|
754
773
|
self._press_snapshot = self._current_snapshot()
|
|
755
774
|
|
|
756
775
|
if self.crop_controller is not None and not self._bracket_mode:
|
|
@@ -898,7 +917,7 @@ class VectorialDrawPane2(QWidget):
|
|
|
898
917
|
|
|
899
918
|
def mouseMoveEvent(self, event):
|
|
900
919
|
self.dragged = True
|
|
901
|
-
point =
|
|
920
|
+
point = self._image_point(event)
|
|
902
921
|
if self._crop_grab:
|
|
903
922
|
self.crop_controller.crop_drag_to(point)
|
|
904
923
|
self.lastPoint = point
|
|
@@ -914,13 +933,13 @@ class VectorialDrawPane2(QWidget):
|
|
|
914
933
|
if not event.buttons():
|
|
915
934
|
self._hover_cursor(point)
|
|
916
935
|
if self._bracket_mode and self._bracket_dragging:
|
|
917
|
-
self.lastPoint =
|
|
936
|
+
self.lastPoint = self._image_point(event)
|
|
918
937
|
self.update()
|
|
919
938
|
return
|
|
920
939
|
if event.buttons() and Qt.LeftButton:
|
|
921
940
|
if self.selected_shape and self.currently_drawn_shape is None:
|
|
922
941
|
logger.debug('moving' + str(self.selected_shape))
|
|
923
|
-
delta =
|
|
942
|
+
delta = self._image_point(event) - self.lastPoint
|
|
924
943
|
for shape in self.selected_shape:
|
|
925
944
|
# a zoom callout's leader lines (and the inset's crop when
|
|
926
945
|
# the box moves) follow: they stayed behind
|
|
@@ -936,7 +955,7 @@ class VectorialDrawPane2(QWidget):
|
|
|
936
955
|
self.update_size()
|
|
937
956
|
self.update()
|
|
938
957
|
|
|
939
|
-
self.lastPoint =
|
|
958
|
+
self.lastPoint = self._image_point(event)
|
|
940
959
|
|
|
941
960
|
def _hover_cursor(self, point):
|
|
942
961
|
"""Resize / move cursors over the crop rectangle and line ends."""
|
|
@@ -995,7 +1014,7 @@ class VectorialDrawPane2(QWidget):
|
|
|
995
1014
|
if self.drawing_mode and self.currently_drawn_shape is not None:
|
|
996
1015
|
# the shape ends where the mouse was released (it ended at the
|
|
997
1016
|
# last move event)
|
|
998
|
-
self.lastPoint =
|
|
1017
|
+
self.lastPoint = self._image_point(event)
|
|
999
1018
|
if not isinstance(self.currently_drawn_shape, (TAText2D, ScaleBar)):
|
|
1000
1019
|
self.currently_drawn_shape.add(self.firstPoint, self.lastPoint)
|
|
1001
1020
|
# see how to do that
|
|
@@ -1074,10 +1093,13 @@ class VectorialDrawPane2(QWidget):
|
|
|
1074
1093
|
# print('just checking',self.background.get_raw_size(), self.background.boundingRect(), self.background.width(),self.background.height(),bounds)
|
|
1075
1094
|
|
|
1076
1095
|
|
|
1096
|
+
origin, corner = self.frame_extent()
|
|
1077
1097
|
if bounds:
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1098
|
+
right, bottom = bounds.width() + bounds.x(), bounds.height() + bounds.y()
|
|
1099
|
+
if corner is not None:
|
|
1100
|
+
right, bottom = max(right, corner.x()), max(bottom, corner.y())
|
|
1101
|
+
self.setMinimumSize(int((right + origin.x()) * self.scale),
|
|
1102
|
+
int((bottom + origin.y()) * self.scale)) # marche
|
|
1081
1103
|
else:
|
|
1082
1104
|
self.setMinimumSize(512,512) # marche
|
|
1083
1105
|
|
|
@@ -3542,7 +3564,9 @@ class MainWindow(QWidget):
|
|
|
3542
3564
|
def _crop_border_lines(rect, angle, crop_left, crop_right, crop_top, crop_bottom):
|
|
3543
3565
|
"""Return {side: (QPointF, QPointF)} for the 4 crop borders in image-space coords,
|
|
3544
3566
|
or None when neither rotation nor crop is active."""
|
|
3545
|
-
if not crop_left and not crop_right and not crop_top and not crop_bottom:
|
|
3567
|
+
if not angle and not crop_left and not crop_right and not crop_top and not crop_bottom:
|
|
3568
|
+
# (user report 2026-11-05: a rotation alone drew no frame, only the
|
|
3569
|
+
# handles turned while the outline stayed on the upright image)
|
|
3546
3570
|
return None
|
|
3547
3571
|
r = QRectF(0, 0, rect.width(), rect.height())
|
|
3548
3572
|
center = r.center()
|
|
@@ -3580,6 +3604,8 @@ class MainWindow(QWidget):
|
|
|
3580
3604
|
self.qt_viewer.rotate_n_crop_lines = self._crop_border_lines(
|
|
3581
3605
|
rect, angle, crop_left, crop_right, crop_top, crop_bottom)
|
|
3582
3606
|
self.qt_viewer.inset_geometry = self.figure_inset_corners
|
|
3607
|
+
self.qt_viewer.view_origin = self.qt_viewer.frame_extent()[0]
|
|
3608
|
+
self.qt_viewer.update_size()
|
|
3583
3609
|
self.AR_display.setText(f'current AR (w/h): {AR}')
|
|
3584
3610
|
self.qt_viewer.update()
|
|
3585
3611
|
|