Skip to content

Releases: hanjinliu/magic-class

v0.7.0

14 May 02:18
Compare
Choose a tag to compare

Highlight

Undo/redo architecture is now available (#98)! See documentation for more details.

Changed

  • Update minimum magicgui version to >=0.7.0 to use generic type variables in fields (#92).
  • add_text method in pyqtgraph widgets (#93).
  • Refactor types submodule (#95).
  • Use debounced updating strategy in magicproperty widget (#96).
  • Add github workflow, use pyproject.toml (#97).
  • Support clickable hyper links in Logger widget.
  • Add finder to Logger widget.

Bug Fixes

  • Fix stripped error message when the message contains HTML escape sequence (#94).
  • Fix bugs using Qt6.
  • Fix wrong offset of line numbers in macro widget.

v0.7.0rc0

09 May 14:32
Compare
Choose a tag to compare
v0.7.0rc0 Pre-release
Pre-release

Pre-release of v0.7.0

v0.6.15

18 Mar 02:40
Compare
Choose a tag to compare

Bug Fixes

  • Fix GenericAlias typing in python 3.11 (#88).
  • Reactivate macro when errored in GeneratorWorker (#89).
  • Search for the propert button in get_button (#90).
  • Fix progress bar widget of dask_thread_worker (#91).

v0.6.14

15 Mar 03:56
Compare
Choose a tag to compare

New Features

  • impl_preview now supports custom clean-up strategies (#69).
  • do_not_record now supports recursive silencing of macro recording with new argument @do_not_record(recursive=True) (#70).
  • The built-in macro widget is updated so that users can utilize the recorded macro (#71).
  • Animation in collapsible container (#73).
  • get_function_gui now accepts method input. From now on, get_function_gui(ui.func) is preferred rather than get_function_gui(ui, "func") (#74).
  • To avoid a child widget being appended to the parent, now you can just name it with a string starting with underscore, rather than changing the attribute name (#75).
  • @magicclass, @magicmenu, @magiccontext and @magictoolbar allow new argument record=False to silent all the macro recording in the child widgets (#76).
  • setup_function_gui decorator for customizing any magicgui widgets after construction (#79).
  • Built-in command palette (#81).
  • More IDE-like behavior in the built-in macro widget (#82).
  • Catch KeyboardInterrupt during blocking asynchronous execution (#83).

New Widgets

  • An iPhone-like ToggleSwitch widget (#77).
  • Literal evaluation widget with arbitrary namespace using EvalLineEdit widget, and the corresponding ExprStr type (#78).

Bug Fixes

  • Minor bug fixes in pyqtgraph submodule.
  • Bug fixes in vtk submodule, with the latest vedo.
  • Fix nested Annotated type (#80).
  • @thread_worker now allows nested calls (#84).

v0.6.13

09 Dec 06:42
Compare
Choose a tag to compare

New Features

  • Implement abstractapi. From now on, using abstractapi to pre-define methods is recommended.
    @magicclass
    class A:
        @magicclass
        class B:
            a = abstractapi()  # instead of def a(self): ...
        @B.wraps
        def a(self):
            # do something
    See here.
  • Implement with_progress method to thread_worker (#67). Changing code to use this is highly recommended.
    @thread_worker(progress={"desc": "running...", "total": 10})  # instead of this
    @thread_worker.with_progress(desc="running...", total=10)  # use this
    See here.
  • Implement wraps like field definition (#66).
  • Implement with_options and with_choices to magic fields. See here.
  • Add properties argument to @magicclass etc., to set min_width etc.
  • Syntax highlightening of macro widget (#65). Enable by defaults["macro-highlight"] = True.

Changes

  • For upcoming magicgui==0.7, many imports of variables are refactored (#61).

Bug Fixes

  • Bug fix in data orientation of vispy Points layer.
  • Title bar did not work in many popup mode (#62).
  • Fix widget visibility (#63).
  • Fix __getitem__ of widget macro and change the default macro history to 100k lines.
  • Fix vispy camera event emission bug for magicgui>=0.7.

v0.6.12

03 Nov 08:26
Compare
Choose a tag to compare

New Features

  • Add matplotlib like API in magicclass.plot_api (#55).
  • Implement Points3D, Arrows3D layers and napari-style blending in magicclass.ext.vispy (#52, #56).
  • Implement impl_preview, a successor of mark_preview, for preview/prerun of method (#57).
  • Implement magicproperty for property like widget creation (#58).
  • Add magicclass.logging submodule for logging in a widget.

Bug Fixes

  • Signals were not connected to FieldGroup (#51).
  • Child FunctionGui widgets were invisible (#54).
  • range objects were not formatted in macro.

v0.6.11

27 Oct 07:00
Compare
Choose a tag to compare

New Features

  • Updates for magicgui=0.6.0.
  • magicclass.functools submodule for functools like functions.
    • partial ... partialize a function and its magicgui configuration
    • partialmethod ... partialize a method and its magicgui configuration.
    • singledispatchmethod ... call a method with a variable of different types.
  • New API in magicclass.ext.vispy submodule.
    • camera is now a HasFields subclass.
    • add_curve method.
  • Utility function call_recent_menu.
  • Union type in magicclass.types to create a widget tabbed with different widgets.

Deprecations

  • The wraps function is moved to magicclass.functools submodule.

v0.6.10

28 Sep 10:23
Compare
Choose a tag to compare

Improvements

  • Improved typing of @magicclass, @magicmenu, @magiccontext and @magictoolbar when they decorated a subclass of MagicTemplate.
  • Update titlebar design of docked magicgui widget.
  • Use container to store all the thread_worker progress bar.
  • Lazy import matplotlib in the file of Logger.

Bug Fixes

  • Nested Annotated type did not work.
  • @wraps without pre-definition did not work correctly.

New Widgets

  • HistoryLineEdit and HistoryFileEdit: widgets with value histories.

v0.6.9

30 Aug 14:18
Compare
Choose a tag to compare

New Features

  • Add plot API to pyqtgraph extension subpackage.
  • Support PyQt6.

Changes

  • Magicgui with configuration auto_call=True will not be called on reset_choices if it is invisible. This change is on the consideration of closed magicgui window in a napari viewer. Invisible auto calls should be disabled to avoid unexpected function call on layer deletion.

Bug Fixes

  • dask_thread_worker did not create a new window correctly but used to update the old one.
  • The "Attributes" section of class doc of magicmenu was not parsed to the child fields.

Deprecations

  • All the icon_path arguments/properties are removed. icon should be used now.

v0.6.8

02 Aug 09:54
Compare
Choose a tag to compare

New Features

  • Install context menu to a push button using into argument of @magiccontext.
  • Many functions in vispy extension now works.
  • plot_api in vispy extension.
  • New popup mode "parentsub". In this mode, magicgui will be added to the parent as a subwindow.
  • dataclass_gui decorator for using HasFields and dataclass in combination.

Bug Fixes

  • Make things compatible with older Qt.

Deprecations

  • redo is renamed to repeat. redo will be removed in the future.