Releases: hanjinliu/magic-class
Releases · hanjinliu/magic-class
v0.7.0
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 inpyqtgraph
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
v0.6.15
v0.6.14
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 thanget_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 argumentrecord=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 correspondingExprStr
type (#78).
Bug Fixes
v0.6.13
New Features
- Implement
abstractapi
. From now on, usingabstractapi
to pre-define methods is recommended.See here.@magicclass class A: @magicclass class B: a = abstractapi() # instead of def a(self): ... @B.wraps def a(self): # do something
- Implement
with_progress
method tothread_worker
(#67). Changing code to use this is highly recommended.See here.@thread_worker(progress={"desc": "running...", "total": 10}) # instead of this @thread_worker.with_progress(desc="running...", total=10) # use this
- Implement
wraps
like field definition (#66). - Implement
with_options
andwith_choices
to magic fields. See here. - Add
properties
argument to@magicclass
etc., to setmin_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
v0.6.12
New Features
- Add matplotlib like API in
magicclass.plot_api
(#55). - Implement
Points
3D,Arrows3D
layers and napari-style blending inmagicclass.ext.vispy
(#52, #56). - Implement
impl_preview
, a successor ofmark_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
v0.6.11
New Features
- Updates for
magicgui=0.6.0
. magicclass.functools
submodule forfunctools
like functions.partial
... partialize a function and its magicgui configurationpartialmethod
... 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 aHasFields
subclass.add_curve
method.
- Utility function
call_recent_menu
. Union
type inmagicclass.types
to create a widget tabbed with different widgets.
Deprecations
- The
wraps
function is moved tomagicclass.functools
submodule.
v0.6.10
Improvements
- Improved typing of
@magicclass
,@magicmenu
,@magiccontext
and@magictoolbar
when they decorated a subclass ofMagicTemplate
. - Update titlebar design of docked magicgui widget.
- Use container to store all the
thread_worker
progress bar. - Lazy import
matplotlib
in the file ofLogger
.
Bug Fixes
- Nested
Annotated
type did not work. @wraps
without pre-definition did not work correctly.
New Widgets
HistoryLineEdit
andHistoryFileEdit
: widgets with value histories.
v0.6.9
New Features
- Add plot API to
pyqtgraph
extension subpackage. - Support PyQt6.
Changes
- Magicgui with configuration
auto_call=True
will not be called onreset_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
New Features
- Install context menu to a push button using
into
argument of@magiccontext
. - Many functions in
vispy
extension now works. plot_api
invispy
extension.- New popup mode "parentsub". In this mode, magicgui will be added to the parent as a subwindow.
dataclass_gui
decorator for usingHasFields
anddataclass
in combination.
Bug Fixes
- Make things compatible with older Qt.
Deprecations
redo
is renamed torepeat
.redo
will be removed in the future.