v0.10.0 - DataGrids, sliders, shortcuts, fixes
New shortcuts:
- The QApp and Puzzle name arguments are no longer required when creating a Puzzle. The QApp still needs to be created in non-IPython contexts, but it can now be inferred by the Piece.
- You can directly accesss a Piece's params by indexing it like a dictionary:
puzzle["piece"]["param_name"]
# is now equivalent to
puzzle["piece"].params["param_name"]
New features:
- A slider parameter type - displays a slider and a value label. Min and max values, as well as the step size, are defined on creation.
- First
extra
submodule -DataGrid
s allow for storing and interacting with data using theparam
abstractions in a table format. Can be added to a Piece'scustom_layout
to enable new data manipulation tasks.
Fixes and enhancements:
- add_piece now returns the Piece instance (useful if a class is being passed for instantiation)
v_step
argument when creating spinboxes changes the step of the box's buttons.- Popups now close when the Puzzle is closed.
- Default param values are cast to the right type on creation.
- IPython exception handler is now inserted correctly even if
puzzle.process_events()
is called in the cell that creates the Puzzle. - Pieces can now be instantiated without a parent Puzzle. This allows for using the Piece as a standalone Widget in an environment where only one Piece is needed, or a Puzzle cannot be set up, but is in general not advised.
- Option to hide the bottom buttons of a Puzzle (Tree, Export, STOP)
- All code has been re-formatted using ruff.