Magic-class

Latest version: v0.7.14

Safety actively analyzes 682471 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 11

0.6.6

Bug Fixes
-----------
- Set parent on launching dialog popup when `popup_mode="dialog"`.
- `magicclass.ext.pyqtgraph` widgets were not working in Mac due to difference in running `QApplication`.

0.6.5

New Features
---------------
- New popup mode `"dialog"` is available. The `Dialog` widget of `magicgui` will be used.
- `str` can now be used for `"bind"` and `"choices"` options. e.g. `def func(self, x: Bound["_get_value"])` instead of `def func(self, x: Bound[_get_value])`.
- Initial support of `copy_info`.
- `Choices` type in `magicclass.types`: `def func(self, x: Choices[1, 2, 3])` or `def func(self, x: Choices[_get_choices])`.
- New `napari` type annotations in `magicclass.ext.napari.types`: `Features`, `FeatureColumn`, `FeatureInfo`. See [examples](https://github.com/hanjinliu/magic-class/blob/main/examples/napari/feature_types.py).

Deprecations
---------------
- `icon_size` is deprecated. Icon size will be automatically determined by the button size.
- `click` is moved from `magicclass` to `magicclass.utils`.

Bug Fixes
-----------
- `confirm` and `thread_worker` are now compatible.
- Support `magicgui>=0.5.0`.
- `get_function_gui` was not completely equivalent to clicking a button.

0.6.4

Highlights
-----------
- Package design related to `MagicField` is significantly revised. Now fields can be used in many occasions. See documentation for more details.
- `field` and `vfield` now can be used in any classes.
- `FieldGroup` abstract class can be used to group fields.
- `HasFields` trait is useful to define classes with fields.
- `pre_set_hook` and `post_get_hook`.
- If a class has "Attributes" block in its docstring, the contents will be parsed to field tooltips.

New Features
---------------
- Status tip property in main window GUI, via `ui.status`.
- Use `HasFields` trait in `vispy` and `vtk` submodules.
- `SeabornFigure` is available and works well.
- Initial support of `Table` bound pandas data frame. Available in `magicclass.ext.pandas`

Changes
---------
- `MagicField` no longer inherits `dataclasses.Field`

Bug Fixes
----------
- Font error in Mac.
- Missing dependency `superqt`.

0.6.3

Highlight
-----------
- `dask` progress bar is available at `magicclass.ext.dask`. Wrap a method using `dask_thread_worker` and it can monitor `da.compute`.
- `field` and `vfield` now work in combination with generic types, such as `field(tuple[str, int])`.
- Use rich text in built-in error message box.

Other New Features
----------------------
- Updates in `magicclass.ext.vispy`.
- Scroll logger down when an image is appended.
- Always update the timer of the default progress bar.
- `field()`
- Delete deprecations.

Bug fixes
----------
- `set_design` made widgets visible.
- `thread_worker` appended macro before end of exection.
- Bug fix when using `Optional` and generic types in combination.
- Bug fixes in help widget.

0.6.2

New Features
---------------
- Updates in `thread_worker`.
- The default progress bar created by `thread_worker` now has "pause" and "abort" button and displays time.
- Clarify required methods for `thread_worker` progress bar using `_SupportProgress` protocol.
- Add macro of calling `thread_worker` after it is finished.
- `mark_preview` decorator to define a preview function to widgets created by `magicgui`. It works both in `magic-class` and in `magicgui`.
- Now `MagicTemplate` has a custom meta-class. This update improves typing of nested magic-class. For instance, in the following definition
python
magicclass
class A(MagicTemplate):
magicclass
class B(MagicTemplate):
def f(self): ...
def g(self):
self.B.f()

the last line `self.B.f()` is not correct because native python type checker expects `self.B.f(obj)`. This problem is fixed.
- Initial support of `SeabornFigure`.

Improvements
----------------
- Do not create temporal `FunctionGui` widget when converting methods into push buttons or menus.
- To show private child widgets as a floating dock widget in `napari`, it used to be docked on the right side before calling `setFloating`. To avoid it affecting existing dock widgets, it is changed to left side.

Extensions
------------
- Experimental VTK support in `magicclass.ext.vtk`. Depend on `vedo`.
- `vispy` 3D canvas supports `add_surface`. 2D canvas supports `add_curve`.

Bug fixes
----------
- Minor error in logger widget right context menu.
- Many private methods with key bindings did not get called.

0.6.1

Highlights
-----------
- `confirm` decorator is working now. When a function is called from GUI, a dialog will be created to confirm whether it is OK to be run. Available at `from magicclass import confirm`.
- The `Figure` widget is largely improved (11). It is now interactive (currently linear-scale and log-scale are supported) and can be copied/saved via right click context menu.
- Initial support of `thread_worker` for multi-threading (14).

New Features
---------------
- The `Logger` widget now supports coping/saving inline images.
- Labels and button visibility of `ListEdit` can now be controlled.
- `redo` helper function. `redo(self)` repeats the last operation of `self`. Available at `from magicclass import redo`.

Bug Fixes
----------
- Import bug fix in `magicclass.ext.napari`.
- The "choices" option was broken if many GUI objects are constructed from the same magic class (13).
- The "enabled" option in `field` and `vfield` had no effect (16).

Page 5 of 11

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.