Releases: PlotPyStack/guidata
v3.14.4
guidata Version 3.14.4
🛠️ Bug fixes:
DataSetEditGroupBox/ computed items: Fixed input field corruption when typing into aLineEditWidgetwhoseDataSetcontains other items declared viaset_computed(...)(or anydisplay.callback) — typing multiple characters in a row (e.g.52after selecting all) was silently truncated and re-interpreted between keystrokes (producing5.02instead of52, or0.0.25instead of0.25). The reactive update of computed siblings was recursively re-entering the same callback with a different exclusion target and overwriting the field the user was editing. Bug introduced in v3.13.0 (commit0af365e, "Add support for computed properties in datasets") (fixes Issue #104)- High-DPI display scaling: Enabled automatic high-DPI scaling attributes (
AA_EnableHighDpiScaling,AA_UseHighDpiPixmaps,HighDpiScaleFactorRoundingPolicy.PassThrough) beforeQApplicationcreation inqapplication()— on Qt5, UI elements were not scaled on high-DPI monitors (150%/200%/300% Windows display scaling), making text and widgets appear disproportionately small. Qt6 already enables these by default, so the calls are no-ops there. This single change resolves a large portion of visible symptoms downstream (PlotPy, PythonQwt, DataLab) (partial fix for Issue #101) CheckBoxWidgetclipping: Fixed checkbox visual clipping when the checkbox text is empty — in mixed-widget grid layouts (especially at high DPI), the checkbox's natural height was smaller than other input widgets (QComboBox,QLineEdit), causing it to be cut off. The minimum height is now aligned to a standard input widget heightgbuildCLI command: Fixedgbuildentry point referencing amainfunction that did not exist insecurebuild.py— running thegbuildcommand after installing guidata raised anAttributeError. The argument parsing code was moved from a top-levelif __name__block into a propermain()function (fixes Issue #99)- Cleanup utility (
gclean): Fixedclean_wix_installer_filesremoving git-tracked files (e.g..bmp,.wxstemplates) when their extension matched generated artefact patterns — tracked files are now excluded from glob-based removal
♻️ Internal changes:
- Debug environment variable: Renamed debug environment variable from
DEBUGtoGUIDATA_DEBUGto avoid collisions with unrelated tooling or third-party conventions that also use the genericDEBUGname
v3.14.3
guidata Version 3.14.3
🛠️ Bug fixes:
FilesOpenItem: FixedAttributeErrorraised when callingfrom_string(None)andTypeErrorraised when serializing an item whose value was never set —Nonevalues are now handled gracefully (empty list / empty sequence)FilesOpenItem: Replaced unsafeeval()call withast.literal_eval()when parsing list-literal strings — eliminates an arbitrary code execution risk when reading list-of-paths values from configuration files or command-line argumentsPreviewTableModel(import wizard): Fixed mutable default argument bug where multiplePreviewTableModelinstances shared the same underlying data list, causing cross-instance mutations- Dockable console: Fixed floating dock widget that could not be reopened after closing — when a dock widget was closed while floating (via the window's X button), it now automatically re-docks inside the main window when re-shown, instead of remaining hidden as a floating window
- Dark mode toolbar overflow button: Fixed toolbar overflow button (the
>>chevron) being invisible in dark mode — added proper QSS styling with gradient backgrounds and hover/pressed states for theqt_toolbar_ext_button
♻️ Internal changes:
- Development environment: Added
scripts/run_with_env.pyutility to run commands within multiple Python environment contexts (WinPython, venv, etc.), with.envfile support forPYTHONPATHconfiguration - Translation file cleanup: Enhanced PO file cleanup to remove additional headers (
PO-Revision-Date,Generated-By,Project-Id-Version,Report-Msgid-Bugs-To,Language-Team) that cause unnecessary diffs in version control. Also cleanup the POT template file after extraction.
v3.14.2
guidata Version 3.14.2
🛠️ Bug fixes:
- Old QtPy compatibility: Fixed
ImportErrorwhen using QtPy < 2.0.0 (guidata supports QtPy >= 1.9) — thePYSIDE6constant was not available before QtPy 2.0.0 - MultipleChoiceItem validation: Fixed
DataItemValidationErrorwhen accepting a dialog containing aMultipleChoiceItemwith validation enabled — the widget was passing a list instead of the expected tuple, causing a validation failure when closing the dialog (fixes Issue #98) - PyQt6 compatibility: Fixed
RuntimeError: wrapped C/C++ object has been deletedwhen closing dialogs in automated tests with PyQt6 —exec_dialog()now checks object validity before callingdeleteLater(), since Qt may already have destroyed the C++ object duringexec()
v3.14.1
guidata Version 3.14.1
- Added official support for Python 3.14
🛠️ Bug fixes:
- PySide6 compatibility: Added
is_qobject_valid()utility function to safely check if aQObject's underlying C++ object is still valid- With PySide6, accessing methods on a deleted C++ object causes a segfault instead of raising
RuntimeError(as PyQt does) - Uses
shiboken.isValid()on PySide2/PySide6 andobjectName()try/except on PyQt5/PyQt6 - Updated
close_widgets_and_quit()to useis_qobject_valid()instead of a bare try/except for widget validity checks - Updated
close_dialog_and_quit()to check widget validity before and afterprocessEvents(), preventing segfaults when Qt deletes widgets during event processing
- With PySide6, accessing methods on a deleted C++ object causes a segfault instead of raising
♻️ Code improvements:
- Refactored refresh action lambda in
IconBrowserWindowfor improved readability - Simplified widget name retrieval in
close_widgets_and_quit()function
v3.14.0
Version 3.14
guidata Version 3.14.0
✨ New features:
-
Jupyter notebook HTML representation: Added rich HTML display support for DataSet and LabeledEnum objects
- New
_repr_html_()method onDataSetclass for styled HTML table rendering in Jupyter notebooks - New
_repr_html_()method onLabeledEnumclass for formatted display of enum values with labels - CSS styling with
.guidata-dataset-tableclass for consistent visual appearance - Automatically called by Jupyter when displaying objects as cell output
- HTML representation now includes attribute names in a third column for easier programmatic access
- New
-
Interactive Python experience: Improved DataSet representation in Python interpreters
- New
__repr__()method onDataSetclass shows attribute names instead of labels - Makes it easy to discover attribute names when working interactively in a Python shell or notebook
print(dataset)still shows user-friendly labels, whilerepr(dataset)or just typing the variable shows attribute names
- New
-
Secure build utility: Added
--prebuildoption to run commands before package build- New
--prebuildcommand-line argument forguidata.utils.securebuild - Executes custom commands in the temporary build directory before
python -m build - Useful for compiling translations or other pre-build tasks in the clean clone environment
- Automatically replaces
pythonwith the current interpreter to avoid PATH issues on Windows - Converts relative PYTHONPATH entries to absolute paths for correct module resolution
- Usage:
python -m guidata.utils.securebuild --prebuild "python -m guidata.utils.translations compile --name myapp --directory ."
- New
-
New
cleanup-doccommand for Sphinx documentation translation files- Added
cleanup_doc_translations()function to clean up.pofiles indoc/locale/directories - Removes
POT-Creation-DateandLast-Translatorheaders from all Sphinx-generated translation files - Usage:
python -m guidata.utils.translations cleanup-doc --directory . - Helps avoid merge conflicts when cherry-picking commits between branches (e.g.,
release↔develop) - Optional
--locale-dirargument to specify custom locale directory path (defaults todoc/locale)
- Added
-
Translation file generation: Ignore POT-Creation-Date and Last-Translator headers to reduce unnecessary diffs
- Added
_cleanup_po_file()helper function to remove thePOT-Creation-DateandLast-Translatorheaders from generated.pofiles - This prevents spurious diffs in version control when regeneration occurs at different times
- Integrated cleanup step into
generate_translation_files()after.pofile creation - Ensures cleaner translation file management and reduces noise in commit history
- Added
-
Icon Browser utility: Added a new GUI tool for browsing and exploring icon collections
- New
guidata.widgets.iconbrowsermodule withIconBrowserWindowwidget - Command-line tool:
giconbrowser [folder]orpython -m guidata.widgets.iconbrowser [folder] - Features a split-pane interface with tree view for folder navigation and icon grid display
- Tree view shows folder hierarchy with open/closed folder icons and file counts
- Single-click on icons opens file location in system file explorer (Windows/macOS/Linux)
- Adjustable thumbnail sizes (16-256 pixels) via toolbar
- Supports PNG, SVG, ICO, JPG, GIF, and BMP formats
- Responsive grid layout adapts to window resizing
- Useful for developers managing icons for their applications and libraries
- Refresh action to toolbar for reloading current folder after external changes
- New
-
Cleanup utility enhancements: Improved the
guidata.utils.cleanupmodule- Added case sensitivity option for glob patterns (default: case-insensitive matching)
- Improved module name detection from
pyproject.tomlwhen name differs from directory name - Enhanced documentation cleanup to support removing PDF files with library name prefix
- These improvements make the cleanup utility more robust and flexible for different project structures
v3.13.4
Version 3.13
Version 3.13.4 (2025-12-03)
🛠️ Bug fixes:
-
BoolItem numpy compatibility: Fixed
numpy.bool_type conversion issueBoolItemnow ensures all assigned values are converted to Pythonbooltype- Added
__set__override to convertnumpy.bool_values to native Pythonbool - Fixes compatibility issues with Qt APIs that strictly require Python
bool(e.g.,QAction.setChecked()) - Prevents
TypeError: setChecked(self, a0: bool): argument 1 has unexpected type 'numpy.bool' - Affects applications using
BoolItemvalues with Qt widgets after HDF5 deserialization - Maintains backward compatibility as
bool(bool)is a no-op - This closes Issue #96 -
BoolItem:numpy.bool_compatibility fix
-
Fix documentation build error due to the fact that Qt is needed for some parts of the building process
guidata Version 3.13.3 (2025-11-10)
🛠️ Bug fixes:
- ButtonItem callbacks: Fixed critical regression breaking callbacks with 4 parameters
- In v3.13.2, the auto-apply feature unconditionally passed a 5th parameter (
trigger_auto_apply) to all ButtonItem callbacks - This broke all existing callbacks expecting only 4 parameters (instance, item, value, parent)
- Now uses
inspect.signature()to check callback parameter count at runtime - Callbacks with fewer than 5 parameters receive only the standard 4 arguments
- Callbacks with 5+ parameters receive the additional
trigger_auto_applyfunction - Maintains full backward compatibility while supporting the new auto-apply feature
- Fixes
TypeError: callback() takes 4 positional arguments but 5 were given
- In v3.13.2, the auto-apply feature unconditionally passed a 5th parameter (
guidata Version 3.13.2 (2025-11-03)
✨ New features:
-
DataSet setter methods: Added public setter methods for title, comment, and icon
- New
set_title()method: Sets the DataSet's title - New
set_comment()method: Sets the DataSet's comment - New
set_icon()method: Sets the DataSet's icon - These methods provide a clean public API to modify DataSet metadata previously stored in private attributes
- Useful for applications that need to dynamically update DataSet metadata programmatically
- New
-
Auto-apply for DictItem and FloatArrayItem in DataSetEditGroupBox: Improved user experience when editing dictionaries and arrays
- When a
DictItemorFloatArrayItemis modified within aDataSetEditGroupBox(with an Apply button), changes are now automatically applied when the editor dialog is validated - Previously, users had to click "Save & Close" in the dictionary/array editor, then click the "Apply" button in the dataset widget layout
- Now, clicking "Save & Close" automatically triggers the apply action, making changes immediately effective
- Implementation: The auto-apply trigger function is passed as an optional 5th parameter to button callbacks
- This behavior only applies to dataset layouts with an Apply button (DataSetEditGroupBox), not to standalone editors
- Provides more intuitive workflow and reduces the number of clicks required to apply changes
- Affects both
DictItem(dictionary editor) andFloatArrayItem(array editor)
- When a
🛠️ Bug fixes:
-
Git report utility: Fixed UnicodeDecodeError on Windows when commit messages contain non-ASCII characters
- The
guidata.utils.gitreportmodule now explicitly uses UTF-8 encoding when reading Git command output - Previously, on Windows systems with cp1252 default encoding, Git commit messages containing Unicode characters (emoji, accented characters, etc.) would cause a
UnicodeDecodeError - Fixed by adding
encoding="utf-8"parameter to allsubprocess.check_output()calls in_extract_git_information() - This ensures proper decoding of Git output which is always UTF-8 encoded, regardless of the system's default encoding
- The
-
DataSet.to_html(): Improved color contrast for dark mode
- Changed title and comment color from standard blue (#0000FF) to a lighter shade (#5294e2)
- Provides better visibility in dark mode while maintaining good appearance in light mode
- Affects the HTML representation of DataSets displayed in applications with dark themes
-
ChoiceItem validation: Fixed tuple/list equivalence during JSON deserialization
- When a
ChoiceItemhas tuple values (e.g.,((10, 90), "10% - 90%")), JSON serialization converts tuples to lists - During deserialization, validation failed because
[10, 90]was not recognized as equivalent to(10, 90) - Modified
ChoiceItem.check_value()to compare sequence contents when both the value and choice are sequences (list/tuple) - This ensures that ChoiceItems with tuple values work correctly with
dataset_to_json()/json_to_dataset()round-trips - Added regression test in
test_choice_tuple_serialization.py
- When a
-
Fix the
AboutInfo.aboutmethod: renamed parameteraddinfostoaddinfofor consistency
guidata Version 3.13.1 (2025-10-28)
🛠️ Bug fixes:
-
DataSet.to_string(): Fixed missing labels for BoolItem when only text is provided
- When a
BoolItemis defined with only thetextparameter (first argument) and no explicitlabelparameter (second argument), the label was displayed as empty into_string()output, resulting in: ☐or: ☑instead of the expectedItem text: ☐ - Added fallback logic to use the
textproperty as label whenlabelis empty, matching the behavior already implemented into_html() - This ensures consistency between text and HTML representations of DataSets containing BoolItems
- When a
-
Qt scraper: Fixed thumbnail generation for sphinx-gallery examples in subdirectories
- The
qt_scrapernow correctly detects and handles examples organized in subsections (e.g.,examples/features/,examples/advanced/) - Thumbnails are now saved in the correct subdirectory-specific
images/thumb/folders instead of the top-level directory - Image paths in generated RST files now include the subdirectory path
- Added new
_get_example_subdirectory()helper function to extract subdirectory from source file path and avoid code duplication
- The
guidata Version 3.13.0 (2025-10-24)
✨ New features:
- JSON Serialization for DataSets: Added new functions for serializing/deserializing DataSet objects to/from JSON:
- New
dataset.dataset_to_json()function: Serialize a DataSet instance to a JSON string - New
dataset.json_to_dataset()function: Deserialize a JSON string back to a DataSet instance - The JSON format includes class module and name information for automatic type restoration
- Enables easy data interchange, storage, and transmission of DataSet configurations
- Example usage:
- New
from guidata.dataset import dataset_to_json, json_to_dataset
# Serialize to JSON
json_str = dataset_to_json(my_dataset)
# Deserialize from JSON
restored_dataset = json_to_dataset(json_str)- DataSet Class-Level Configuration: Added support for configuring DataSet metadata at the class definition level using
__init_subclass__:- DataSet title, comment, icon, and readonly state can now be configured directly in the class inheritance declaration
- Uses Python's standard
__init_subclass__mechanism (PEP 487) for explicit, type-safe configuration - Configuration is embedded in the class definition, making it impossible to accidentally remove or forget
- Instance parameters can still override class-level settings for flexibility
- Improved docstring handling: When title is explicitly set (even to empty string), the entire docstring becomes the comment
- Backward compatibility: When no title is set at all, docstring first line is still used as title (old behavior)
- Example usage:
class MyParameters(DataSet,
title="Analysis Parameters",
comment="Configure your analysis options",
icon="params.png"):
"""This docstring is for developer documentation only"""
threshold = FloatItem("Threshold", default=0.5)
method = StringItem("Method", default="auto")
# No need to pass title when instantiating
params = MyParameters()
# Can still override at instance level if needed
params_custom = MyParameters(title="Custom Title")-
Priority order: instance parameter > class-level config > empty/default
-
Makes it explicit when title is intentionally set vs. accidentally left empty
-
Improves code clarity by separating user-facing metadata from developer documentation
-
SeparatorItem: Added a new visual separator data item for better dataset organization:
- New
SeparatorItemclass allows inserting visual separators between sections in datasets - In textual representation, separators appear as a line of dashes (
--------------------------------------------------) - In GUI dialogs, separators display as horizontal gray lines spanning the full width
- Separators don't store any data - they are purely visual elements for organizing forms
- Example usage:
- New
class PersonDataSet(DataSet):
name = StringItem("Name", default="John Doe")
age = IntItem("Age", default=30)
# Visual separator with label
sep1 = SeparatorItem("Contact Information")
email = StringItem("Email", default="john@example.com")
phone = StringItem("Phone", default="123-456-7890")
# Visual separator without label
sep2 = SeparatorItem()
notes = StringItem("Notes", default="Additional notes")-
Improves readability and visual organization of complex datasets
-
Fully integrated with existing DataSet serialization/deserialization (separators are ignored during save/load)
-
Compatible with both edit and show modes in dataset dialogs
-
Computed Items: Added support for computed/calculated data items in datasets:
- New ...
v3.13.3
Version 3.13.3
🛠️ Bug fixes:
- ButtonItem callbacks: Fixed critical regression breaking callbacks with 4 parameters
- In v3.13.2, the auto-apply feature unconditionally passed a 5th parameter (
trigger_auto_apply) to all ButtonItem callbacks - This broke all existing callbacks expecting only 4 parameters (instance, item, value, parent)
- Now uses
inspect.signature()to check callback parameter count at runtime - Callbacks with fewer than 5 parameters receive only the standard 4 arguments
- Callbacks with 5+ parameters receive the additional
trigger_auto_applyfunction - Maintains full backward compatibility while supporting the new auto-apply feature
- Fixes
TypeError: callback() takes 4 positional arguments but 5 were given
- In v3.13.2, the auto-apply feature unconditionally passed a 5th parameter (
Version 3.13.2
✨ New features:
-
DataSet setter methods: Added public setter methods for title, comment, and icon
- New
set_title()method: Sets the DataSet's title - New
set_comment()method: Sets the DataSet's comment - New
set_icon()method: Sets the DataSet's icon - These methods provide a clean public API to modify DataSet metadata previously stored in private attributes
- Useful for applications that need to dynamically update DataSet metadata programmatically
- New
-
Auto-apply for DictItem and FloatArrayItem in DataSetEditGroupBox: Improved user experience when editing dictionaries and arrays
- When a
DictItemorFloatArrayItemis modified within aDataSetEditGroupBox(with an Apply button), changes are now automatically applied when the editor dialog is validated - Previously, users had to click "Save & Close" in the dictionary/array editor, then click the "Apply" button in the dataset widget layout
- Now, clicking "Save & Close" automatically triggers the apply action, making changes immediately effective
- Implementation: The auto-apply trigger function is passed as an optional 5th parameter to button callbacks
- This behavior only applies to dataset layouts with an Apply button (DataSetEditGroupBox), not to standalone editors
- Provides more intuitive workflow and reduces the number of clicks required to apply changes
- Affects both
DictItem(dictionary editor) andFloatArrayItem(array editor)
- When a
🛠️ Bug fixes:
-
Git report utility: Fixed UnicodeDecodeError on Windows when commit messages contain non-ASCII characters
- The
guidata.utils.gitreportmodule now explicitly uses UTF-8 encoding when reading Git command output - Previously, on Windows systems with cp1252 default encoding, Git commit messages containing Unicode characters (emoji, accented characters, etc.) would cause a
UnicodeDecodeError - Fixed by adding
encoding="utf-8"parameter to allsubprocess.check_output()calls in_extract_git_information() - This ensures proper decoding of Git output which is always UTF-8 encoded, regardless of the system's default encoding
- The
-
DataSet.to_html(): Improved color contrast for dark mode
- Changed title and comment color from standard blue (#0000FF) to a lighter shade (#5294e2)
- Provides better visibility in dark mode while maintaining good appearance in light mode
- Affects the HTML representation of DataSets displayed in applications with dark themes
-
ChoiceItem validation: Fixed tuple/list equivalence during JSON deserialization
- When a
ChoiceItemhas tuple values (e.g.,((10, 90), "10% - 90%")), JSON serialization converts tuples to lists - During deserialization, validation failed because
[10, 90]was not recognized as equivalent to(10, 90) - Modified
ChoiceItem.check_value()to compare sequence contents when both the value and choice are sequences (list/tuple) - This ensures that ChoiceItems with tuple values work correctly with
dataset_to_json()/json_to_dataset()round-trips - Added regression test in
test_choice_tuple_serialization.py
- When a
-
Fix the
AboutInfo.aboutmethod: renamed parameteraddinfostoaddinfofor consistency
Version 3.13.1
🛠️ Bug fixes:
-
DataSet.to_string(): Fixed missing labels for BoolItem when only text is provided
- When a
BoolItemis defined with only thetextparameter (first argument) and no explicitlabelparameter (second argument), the label was displayed as empty into_string()output, resulting in: ☐or: ☑instead of the expectedItem text: ☐ - Added fallback logic to use the
textproperty as label whenlabelis empty, matching the behavior already implemented into_html() - This ensures consistency between text and HTML representations of DataSets containing BoolItems
- When a
-
Qt scraper: Fixed thumbnail generation for sphinx-gallery examples in subdirectories
- The
qt_scrapernow correctly detects and handles examples organized in subsections (e.g.,examples/features/,examples/advanced/) - Thumbnails are now saved in the correct subdirectory-specific
images/thumb/folders instead of the top-level directory - Image paths in generated RST files now include the subdirectory path
- Added new
_get_example_subdirectory()helper function to extract subdirectory from source file path and avoid code duplication
- The
Version 3.13.0
✨ New features:
- JSON Serialization for DataSets: Added new functions for serializing/deserializing DataSet objects to/from JSON:
- New
dataset.dataset_to_json()function: Serialize a DataSet instance to a JSON string - New
dataset.json_to_dataset()function: Deserialize a JSON string back to a DataSet instance - The JSON format includes class module and name information for automatic type restoration
- Enables easy data interchange, storage, and transmission of DataSet configurations
- Example usage:
- New
from guidata.dataset import dataset_to_json, json_to_dataset
# Serialize to JSON
json_str = dataset_to_json(my_dataset)
# Deserialize from JSON
restored_dataset = json_to_dataset(json_str)- DataSet Class-Level Configuration: Added support for configuring DataSet metadata at the class definition level using
__init_subclass__:- DataSet title, comment, icon, and readonly state can now be configured directly in the class inheritance declaration
- Uses Python's standard
__init_subclass__mechanism (PEP 487) for explicit, type-safe configuration - Configuration is embedded in the class definition, making it impossible to accidentally remove or forget
- Instance parameters can still override class-level settings for flexibility
- Improved docstring handling: When title is explicitly set (even to empty string), the entire docstring becomes the comment
- Backward compatibility: When no title is set at all, docstring first line is still used as title (old behavior)
- Example usage:
class MyParameters(DataSet,
title="Analysis Parameters",
comment="Configure your analysis options",
icon="params.png"):
"""This docstring is for developer documentation only"""
threshold = FloatItem("Threshold", default=0.5)
method = StringItem("Method", default="auto")
# No need to pass title when instantiating
params = MyParameters()
# Can still override at instance level if needed
params_custom = MyParameters(title="Custom Title")-
Priority order: instance parameter > class-level config > empty/default
-
Makes it explicit when title is intentionally set vs. accidentally left empty
-
Improves code clarity by separating user-facing metadata from developer documentation
-
SeparatorItem: Added a new visual separator data item for better dataset organization:
- New
SeparatorItemclass allows inserting visual separators between sections in datasets - In textual representation, separators appear as a line of dashes (
--------------------------------------------------) - In GUI dialogs, separators display as horizontal gray lines spanning the full width
- Separators don't store any data - they are purely visual elements for organizing forms
- Example usage:
- New
class PersonDataSet(DataSet):
name = StringItem("Name", default="John Doe")
age = IntItem("Age", default=30)
# Visual separator with label
sep1 = SeparatorItem("Contact Information")
email = StringItem("Email", default="john@example.com")
phone = StringItem("Phone", default="123-456-7890")
# Visual separator without label
sep2 = SeparatorItem()
notes = StringItem("Notes", default="Additional notes")-
Improves readability and visual organization of complex datasets
-
Fully integrated with existing DataSet serialization/deserialization (separators are ignored during save/load)
-
Compatible with both edit and show modes in dataset dialogs
-
Computed Items: Added support for computed/calculated data items in datasets:
- New
ComputedPropclass allows defining items whose values are automatically calculated from other items - Items can be marked as computed using the
set_computed(method_name)method - Computed items are automatically read-only and update in real-time when their dependencies change
- Example usage:
- New
class DataSet(gdt.DataSet):
def compute_sum(self) -> float:
return self.x + self.y
x = gdt.FloatItem("X", default=1.0)
y = gdt.FloatItem("Y", default=2.0)
sum_xy = gdt.FloatItem("Sum", default=0.0).set_computed(compute_sum)-
Computed items automatically display with visual distinction (neutral background color) in GUI forms
-
Supports complex calculations and can access any other items in the dataset
-
Improved Visual Distinction for Read-only Fields: Enhanced user interface to clearly identify non-editable fields:
- Read-only text fields now display with a subtle gray background and darker text color
- Visual styling automatica...
v3.13.2
Version 3.13.2
✨ New features:
-
DataSet setter methods: Added public setter methods for title, comment, and icon
- New
set_title()method: Sets the DataSet's title - New
set_comment()method: Sets the DataSet's comment - New
set_icon()method: Sets the DataSet's icon - These methods provide a clean public API to modify DataSet metadata previously stored in private attributes
- Useful for applications that need to dynamically update DataSet metadata programmatically
- New
-
Auto-apply for DictItem and FloatArrayItem in DataSetEditGroupBox: Improved user experience when editing dictionaries and arrays
- When a
DictItemorFloatArrayItemis modified within aDataSetEditGroupBox(with an Apply button), changes are now automatically applied when the editor dialog is validated - Previously, users had to click "Save & Close" in the dictionary/array editor, then click the "Apply" button in the dataset widget layout
- Now, clicking "Save & Close" automatically triggers the apply action, making changes immediately effective
- Implementation: The auto-apply trigger function is passed as an optional 5th parameter to button callbacks
- This behavior only applies to dataset layouts with an Apply button (DataSetEditGroupBox), not to standalone editors
- Provides more intuitive workflow and reduces the number of clicks required to apply changes
- Affects both
DictItem(dictionary editor) andFloatArrayItem(array editor)
- When a
🛠️ Bug fixes:
-
Git report utility: Fixed UnicodeDecodeError on Windows when commit messages contain non-ASCII characters
- The
guidata.utils.gitreportmodule now explicitly uses UTF-8 encoding when reading Git command output - Previously, on Windows systems with cp1252 default encoding, Git commit messages containing Unicode characters (emoji, accented characters, etc.) would cause a
UnicodeDecodeError - Fixed by adding
encoding="utf-8"parameter to allsubprocess.check_output()calls in_extract_git_information() - This ensures proper decoding of Git output which is always UTF-8 encoded, regardless of the system's default encoding
- The
-
DataSet.to_html(): Improved color contrast for dark mode
- Changed title and comment color from standard blue (#0000FF) to a lighter shade (#5294e2)
- Provides better visibility in dark mode while maintaining good appearance in light mode
- Affects the HTML representation of DataSets displayed in applications with dark themes
-
ChoiceItem validation: Fixed tuple/list equivalence during JSON deserialization
- When a
ChoiceItemhas tuple values (e.g.,((10, 90), "10% - 90%")), JSON serialization converts tuples to lists - During deserialization, validation failed because
[10, 90]was not recognized as equivalent to(10, 90) - Modified
ChoiceItem.check_value()to compare sequence contents when both the value and choice are sequences (list/tuple) - This ensures that ChoiceItems with tuple values work correctly with
dataset_to_json()/json_to_dataset()round-trips - Added regression test in
test_choice_tuple_serialization.py
- When a
-
Fix the
AboutInfo.aboutmethod: renamed parameteraddinfostoaddinfofor consistency
Version 3.13.1
🛠️ Bug fixes:
-
DataSet.to_string(): Fixed missing labels for BoolItem when only text is provided
- When a
BoolItemis defined with only thetextparameter (first argument) and no explicitlabelparameter (second argument), the label was displayed as empty into_string()output, resulting in: ☐or: ☑instead of the expectedItem text: ☐ - Added fallback logic to use the
textproperty as label whenlabelis empty, matching the behavior already implemented into_html() - This ensures consistency between text and HTML representations of DataSets containing BoolItems
- When a
-
Qt scraper: Fixed thumbnail generation for sphinx-gallery examples in subdirectories
- The
qt_scrapernow correctly detects and handles examples organized in subsections (e.g.,examples/features/,examples/advanced/) - Thumbnails are now saved in the correct subdirectory-specific
images/thumb/folders instead of the top-level directory - Image paths in generated RST files now include the subdirectory path
- Added new
_get_example_subdirectory()helper function to extract subdirectory from source file path and avoid code duplication
- The
Version 3.13.0
✨ New features:
- JSON Serialization for DataSets: Added new functions for serializing/deserializing DataSet objects to/from JSON:
- New
dataset.dataset_to_json()function: Serialize a DataSet instance to a JSON string - New
dataset.json_to_dataset()function: Deserialize a JSON string back to a DataSet instance - The JSON format includes class module and name information for automatic type restoration
- Enables easy data interchange, storage, and transmission of DataSet configurations
- Example usage:
- New
from guidata.dataset import dataset_to_json, json_to_dataset
# Serialize to JSON
json_str = dataset_to_json(my_dataset)
# Deserialize from JSON
restored_dataset = json_to_dataset(json_str)- DataSet Class-Level Configuration: Added support for configuring DataSet metadata at the class definition level using
__init_subclass__:- DataSet title, comment, icon, and readonly state can now be configured directly in the class inheritance declaration
- Uses Python's standard
__init_subclass__mechanism (PEP 487) for explicit, type-safe configuration - Configuration is embedded in the class definition, making it impossible to accidentally remove or forget
- Instance parameters can still override class-level settings for flexibility
- Improved docstring handling: When title is explicitly set (even to empty string), the entire docstring becomes the comment
- Backward compatibility: When no title is set at all, docstring first line is still used as title (old behavior)
- Example usage:
class MyParameters(DataSet,
title="Analysis Parameters",
comment="Configure your analysis options",
icon="params.png"):
"""This docstring is for developer documentation only"""
threshold = FloatItem("Threshold", default=0.5)
method = StringItem("Method", default="auto")
# No need to pass title when instantiating
params = MyParameters()
# Can still override at instance level if needed
params_custom = MyParameters(title="Custom Title")-
Priority order: instance parameter > class-level config > empty/default
-
Makes it explicit when title is intentionally set vs. accidentally left empty
-
Improves code clarity by separating user-facing metadata from developer documentation
-
SeparatorItem: Added a new visual separator data item for better dataset organization:
- New
SeparatorItemclass allows inserting visual separators between sections in datasets - In textual representation, separators appear as a line of dashes (
--------------------------------------------------) - In GUI dialogs, separators display as horizontal gray lines spanning the full width
- Separators don't store any data - they are purely visual elements for organizing forms
- Example usage:
- New
class PersonDataSet(DataSet):
name = StringItem("Name", default="John Doe")
age = IntItem("Age", default=30)
# Visual separator with label
sep1 = SeparatorItem("Contact Information")
email = StringItem("Email", default="john@example.com")
phone = StringItem("Phone", default="123-456-7890")
# Visual separator without label
sep2 = SeparatorItem()
notes = StringItem("Notes", default="Additional notes")-
Improves readability and visual organization of complex datasets
-
Fully integrated with existing DataSet serialization/deserialization (separators are ignored during save/load)
-
Compatible with both edit and show modes in dataset dialogs
-
Computed Items: Added support for computed/calculated data items in datasets:
- New
ComputedPropclass allows defining items whose values are automatically calculated from other items - Items can be marked as computed using the
set_computed(method_name)method - Computed items are automatically read-only and update in real-time when their dependencies change
- Example usage:
- New
class DataSet(gdt.DataSet):
def compute_sum(self) -> float:
return self.x + self.y
x = gdt.FloatItem("X", default=1.0)
y = gdt.FloatItem("Y", default=2.0)
sum_xy = gdt.FloatItem("Sum", default=0.0).set_computed(compute_sum)-
Computed items automatically display with visual distinction (neutral background color) in GUI forms
-
Supports complex calculations and can access any other items in the dataset
-
Improved Visual Distinction for Read-only Fields: Enhanced user interface to clearly identify non-editable fields:
- Read-only text fields now display with a subtle gray background and darker text color
- Visual styling automatically adapts to your theme (light or dark mode)
- Applies to computed fields, locked parameters, and any field marked as read-only
- Makes it immediately clear which fields you can edit and which are display-only
- Validation errors are still highlighted with orange background when they occur
-
DataSet HTML Export: Added HTML representation method for datasets:
- New
to_html()method onDataSetclass generates HTML representation similar to Sigima's TableResult format - Features blue-styled title and comment section derived from the dataset's docstring
- Two-column table layout with right-aligned item names and left-aligned values
- Special handling for
BoolItemwith checkbox characters (☑ for True, ☐ for False) - Monospace font styling ...
- New
v3.13.1
Version 3.13.1
🛠️ Bug fixes:
-
DataSet.to_string(): Fixed missing labels for BoolItem when only text is provided
- When a
BoolItemis defined with only thetextparameter (first argument) and no explicitlabelparameter (second argument), the label was displayed as empty into_string()output, resulting in: ☐or: ☑instead of the expectedItem text: ☐ - Added fallback logic to use the
textproperty as label whenlabelis empty, matching the behavior already implemented into_html() - This ensures consistency between text and HTML representations of DataSets containing BoolItems
- When a
-
Qt scraper: Fixed thumbnail generation for sphinx-gallery examples in subdirectories
- The
qt_scrapernow correctly detects and handles examples organized in subsections (e.g.,examples/features/,examples/advanced/) - Thumbnails are now saved in the correct subdirectory-specific
images/thumb/folders instead of the top-level directory - Image paths in generated RST files now include the subdirectory path
- Added new
_get_example_subdirectory()helper function to extract subdirectory from source file path and avoid code duplication
- The
Version 3.13.0
✨ New features:
- JSON Serialization for DataSets: Added new functions for serializing/deserializing DataSet objects to/from JSON:
- New
dataset.dataset_to_json()function: Serialize a DataSet instance to a JSON string - New
dataset.json_to_dataset()function: Deserialize a JSON string back to a DataSet instance - The JSON format includes class module and name information for automatic type restoration
- Enables easy data interchange, storage, and transmission of DataSet configurations
- Example usage:
- New
from guidata.dataset import dataset_to_json, json_to_dataset
# Serialize to JSON
json_str = dataset_to_json(my_dataset)
# Deserialize from JSON
restored_dataset = json_to_dataset(json_str)- DataSet Class-Level Configuration: Added support for configuring DataSet metadata at the class definition level using
__init_subclass__:- DataSet title, comment, icon, and readonly state can now be configured directly in the class inheritance declaration
- Uses Python's standard
__init_subclass__mechanism (PEP 487) for explicit, type-safe configuration - Configuration is embedded in the class definition, making it impossible to accidentally remove or forget
- Instance parameters can still override class-level settings for flexibility
- Improved docstring handling: When title is explicitly set (even to empty string), the entire docstring becomes the comment
- Backward compatibility: When no title is set at all, docstring first line is still used as title (old behavior)
- Example usage:
class MyParameters(DataSet,
title="Analysis Parameters",
comment="Configure your analysis options",
icon="params.png"):
"""This docstring is for developer documentation only"""
threshold = FloatItem("Threshold", default=0.5)
method = StringItem("Method", default="auto")
# No need to pass title when instantiating
params = MyParameters()
# Can still override at instance level if needed
params_custom = MyParameters(title="Custom Title")-
Priority order: instance parameter > class-level config > empty/default
-
Makes it explicit when title is intentionally set vs. accidentally left empty
-
Improves code clarity by separating user-facing metadata from developer documentation
-
SeparatorItem: Added a new visual separator data item for better dataset organization:
- New
SeparatorItemclass allows inserting visual separators between sections in datasets - In textual representation, separators appear as a line of dashes (
--------------------------------------------------) - In GUI dialogs, separators display as horizontal gray lines spanning the full width
- Separators don't store any data - they are purely visual elements for organizing forms
- Example usage:
- New
class PersonDataSet(DataSet):
name = StringItem("Name", default="John Doe")
age = IntItem("Age", default=30)
# Visual separator with label
sep1 = SeparatorItem("Contact Information")
email = StringItem("Email", default="john@example.com")
phone = StringItem("Phone", default="123-456-7890")
# Visual separator without label
sep2 = SeparatorItem()
notes = StringItem("Notes", default="Additional notes")-
Improves readability and visual organization of complex datasets
-
Fully integrated with existing DataSet serialization/deserialization (separators are ignored during save/load)
-
Compatible with both edit and show modes in dataset dialogs
-
Computed Items: Added support for computed/calculated data items in datasets:
- New
ComputedPropclass allows defining items whose values are automatically calculated from other items - Items can be marked as computed using the
set_computed(method_name)method - Computed items are automatically read-only and update in real-time when their dependencies change
- Example usage:
- New
class DataSet(gdt.DataSet):
def compute_sum(self) -> float:
return self.x + self.y
x = gdt.FloatItem("X", default=1.0)
y = gdt.FloatItem("Y", default=2.0)
sum_xy = gdt.FloatItem("Sum", default=0.0).set_computed(compute_sum)-
Computed items automatically display with visual distinction (neutral background color) in GUI forms
-
Supports complex calculations and can access any other items in the dataset
-
Improved Visual Distinction for Read-only Fields: Enhanced user interface to clearly identify non-editable fields:
- Read-only text fields now display with a subtle gray background and darker text color
- Visual styling automatically adapts to your theme (light or dark mode)
- Applies to computed fields, locked parameters, and any field marked as read-only
- Makes it immediately clear which fields you can edit and which are display-only
- Validation errors are still highlighted with orange background when they occur
-
DataSet HTML Export: Added HTML representation method for datasets:
- New
to_html()method onDataSetclass generates HTML representation similar to Sigima's TableResult format - Features blue-styled title and comment section derived from the dataset's docstring
- Two-column table layout with right-aligned item names and left-aligned values
- Special handling for
BoolItemwith checkbox characters (☑ for True, ☐ for False) - Monospace font styling for consistent alignment and professional appearance
- Proper handling of None values (displayed as "-") and nested ObjectItem datasets
- Example usage:
- New
class PersonDataSet(DataSet):
"""Personal Information Dataset
This dataset collects basic personal information.
"""
name = StringItem("Full Name", default="John Doe")
age = IntItem("Age", default=30)
active = BoolItem("Account Active", default=True)
dataset = PersonDataSet()
html_output = dataset.to_html() # Generate HTML representation-
Ideal for reports, documentation, and web-based dataset visualization
-
Comprehensive unit test coverage ensures reliability across all item types
-
guidata.configtools.get_icon:- This function retrieves a QIcon from the specified image file.
- Now supports Qt standard icons (e.g. "MessageBoxInformation" or "DialogApplyButton").
-
Removed
requirements-min.txtgeneration feature fromguidata.utils.genreqs:- The minimal requirements feature was causing platform compatibility issues when specific minimum versions weren't available on all platforms (e.g.,
SciPy==1.7.3works on Windows but fails on Linux) - Removed
__extract_min_requirements()function and--minCLI flag - The
genreqstool now only generatesrequirements.txtandrequirements.rstfiles - Updated documentation and MANIFEST.in files to remove references to
requirements-min.txt
- The minimal requirements feature was causing platform compatibility issues when specific minimum versions weren't available on all platforms (e.g.,
-
Added a
readonlyparameter toStringItemandTextIteminguidata.dataset.dataitems:- This allows these items to be set as read-only, preventing user edits in the GUI.
- The
readonlyproperty is now respected in the corresponding widgets (seeguidata.dataset.qtitemwidgets). - Example usage:
text = gds.TextItem("Text", default="Multi-line text", readonly=True)
string = gds.StringItem("String", readonly=True)-
Note: Any other item type can also be turned into read-only mode by using
set_prop("display", readonly=True). This is a generic mechanism, but the main use case is forStringItemandTextItem(hence the dedicated input parameter for convenience). -
Issue #94 - Make dataset description text selectable
-
New
guidata.utils.cleanuputility:- Added a comprehensive repository cleanup utility similar to
genreqsandsecurebuild - Provides both programmatic API (
from guidata.utils.cleanup import run_cleanup) and command-line interface (python -m guidata.utils.cleanup) - Automatically detects repository type and cleans Python cache files, build artifacts, temporary files, coverage data, backup files, and empty directories
- Features comprehensive Google-style docstrings and full typing annotations
- Cross-platform compatible with proper logging and error handling
- Can be integrated into project workflows via VSCode tasks or build scripts
- Added a comprehensive repository cleanup utility similar to
-
New validation modes for
DataItemobjects:- Validation modes allow you to control how
DataItemvalues are validated when they are set. ValidationMode.DISABLED: no validation is performed (default behavior, for backward compatibility)ValidationMode.ENABLED: va...
- Validation modes allow you to control how
v3.13.0
✨ New features:
- JSON Serialization for DataSets: Added new functions for serializing/deserializing DataSet objects to/from JSON:
- New
dataset.dataset_to_json()function: Serialize a DataSet instance to a JSON string - New
dataset.json_to_dataset()function: Deserialize a JSON string back to a DataSet instance - The JSON format includes class module and name information for automatic type restoration
- Enables easy data interchange, storage, and transmission of DataSet configurations
- Example usage:
- New
from guidata.dataset import dataset_to_json, json_to_dataset
# Serialize to JSON
json_str = dataset_to_json(my_dataset)
# Deserialize from JSON
restored_dataset = json_to_dataset(json_str)- DataSet Class-Level Configuration: Added support for configuring DataSet metadata at the class definition level using
__init_subclass__:- DataSet title, comment, icon, and readonly state can now be configured directly in the class inheritance declaration
- Uses Python's standard
__init_subclass__mechanism (PEP 487) for explicit, type-safe configuration - Configuration is embedded in the class definition, making it impossible to accidentally remove or forget
- Instance parameters can still override class-level settings for flexibility
- Improved docstring handling: When title is explicitly set (even to empty string), the entire docstring becomes the comment
- Backward compatibility: When no title is set at all, docstring first line is still used as title (old behavior)
- Example usage:
class MyParameters(DataSet,
title="Analysis Parameters",
comment="Configure your analysis options",
icon="params.png"):
"""This docstring is for developer documentation only"""
threshold = FloatItem("Threshold", default=0.5)
method = StringItem("Method", default="auto")
# No need to pass title when instantiating
params = MyParameters()
# Can still override at instance level if needed
params_custom = MyParameters(title="Custom Title")-
Priority order: instance parameter > class-level config > empty/default
-
Makes it explicit when title is intentionally set vs. accidentally left empty
-
Improves code clarity by separating user-facing metadata from developer documentation
-
SeparatorItem: Added a new visual separator data item for better dataset organization:
- New
SeparatorItemclass allows inserting visual separators between sections in datasets - In textual representation, separators appear as a line of dashes (
--------------------------------------------------) - In GUI dialogs, separators display as horizontal gray lines spanning the full width
- Separators don't store any data - they are purely visual elements for organizing forms
- Example usage:
- New
class PersonDataSet(DataSet):
name = StringItem("Name", default="John Doe")
age = IntItem("Age", default=30)
# Visual separator with label
sep1 = SeparatorItem("Contact Information")
email = StringItem("Email", default="john@example.com")
phone = StringItem("Phone", default="123-456-7890")
# Visual separator without label
sep2 = SeparatorItem()
notes = StringItem("Notes", default="Additional notes")-
Improves readability and visual organization of complex datasets
-
Fully integrated with existing DataSet serialization/deserialization (separators are ignored during save/load)
-
Compatible with both edit and show modes in dataset dialogs
-
Computed Items: Added support for computed/calculated data items in datasets:
- New
ComputedPropclass allows defining items whose values are automatically calculated from other items - Items can be marked as computed using the
set_computed(method_name)method - Computed items are automatically read-only and update in real-time when their dependencies change
- Example usage:
- New
class DataSet(gdt.DataSet):
def compute_sum(self) -> float:
return self.x + self.y
x = gdt.FloatItem("X", default=1.0)
y = gdt.FloatItem("Y", default=2.0)
sum_xy = gdt.FloatItem("Sum", default=0.0).set_computed(compute_sum)-
Computed items automatically display with visual distinction (neutral background color) in GUI forms
-
Supports complex calculations and can access any other items in the dataset
-
Improved Visual Distinction for Read-only Fields: Enhanced user interface to clearly identify non-editable fields:
- Read-only text fields now display with a subtle gray background and darker text color
- Visual styling automatically adapts to your theme (light or dark mode)
- Applies to computed fields, locked parameters, and any field marked as read-only
- Makes it immediately clear which fields you can edit and which are display-only
- Validation errors are still highlighted with orange background when they occur
-
DataSet HTML Export: Added HTML representation method for datasets:
- New
to_html()method onDataSetclass generates HTML representation similar to Sigima's TableResult format - Features blue-styled title and comment section derived from the dataset's docstring
- Two-column table layout with right-aligned item names and left-aligned values
- Special handling for
BoolItemwith checkbox characters (☑ for True, ☐ for False) - Monospace font styling for consistent alignment and professional appearance
- Proper handling of None values (displayed as "-") and nested ObjectItem datasets
- Example usage:
- New
class PersonDataSet(DataSet):
"""Personal Information Dataset
This dataset collects basic personal information.
"""
name = StringItem("Full Name", default="John Doe")
age = IntItem("Age", default=30)
active = BoolItem("Account Active", default=True)
dataset = PersonDataSet()
html_output = dataset.to_html() # Generate HTML representation-
Ideal for reports, documentation, and web-based dataset visualization
-
Comprehensive unit test coverage ensures reliability across all item types
-
guidata.configtools.get_icon:- This function retrieves a QIcon from the specified image file.
- Now supports Qt standard icons (e.g. "MessageBoxInformation" or "DialogApplyButton").
-
Removed
requirements-min.txtgeneration feature fromguidata.utils.genreqs:- The minimal requirements feature was causing platform compatibility issues when specific minimum versions weren't available on all platforms (e.g.,
SciPy==1.7.3works on Windows but fails on Linux) - Removed
__extract_min_requirements()function and--minCLI flag - The
genreqstool now only generatesrequirements.txtandrequirements.rstfiles - Updated documentation and MANIFEST.in files to remove references to
requirements-min.txt
- The minimal requirements feature was causing platform compatibility issues when specific minimum versions weren't available on all platforms (e.g.,
-
Added a
readonlyparameter toStringItemandTextIteminguidata.dataset.dataitems:- This allows these items to be set as read-only, preventing user edits in the GUI.
- The
readonlyproperty is now respected in the corresponding widgets (seeguidata.dataset.qtitemwidgets). - Example usage:
text = gds.TextItem("Text", default="Multi-line text", readonly=True)
string = gds.StringItem("String", readonly=True)-
Note: Any other item type can also be turned into read-only mode by using
set_prop("display", readonly=True). This is a generic mechanism, but the main use case is forStringItemandTextItem(hence the dedicated input parameter for convenience). -
Issue #94 - Make dataset description text selectable
-
New
guidata.utils.cleanuputility:- Added a comprehensive repository cleanup utility similar to
genreqsandsecurebuild - Provides both programmatic API (
from guidata.utils.cleanup import run_cleanup) and command-line interface (python -m guidata.utils.cleanup) - Automatically detects repository type and cleans Python cache files, build artifacts, temporary files, coverage data, backup files, and empty directories
- Features comprehensive Google-style docstrings and full typing annotations
- Cross-platform compatible with proper logging and error handling
- Can be integrated into project workflows via VSCode tasks or build scripts
- Added a comprehensive repository cleanup utility similar to
-
New validation modes for
DataItemobjects:- Validation modes allow you to control how
DataItemvalues are validated when they are set. ValidationMode.DISABLED: no validation is performed (default behavior, for backward compatibility)ValidationMode.ENABLED: validation is performed, but warnings are raised instead of exceptionsValidationMode.STRICT: validation is performed, and exceptions are raised if the value is invalid- To use these validation modes, you need to set the option:
- Validation modes allow you to control how
from guidata.config import set_validation_mode, ValidationMode
set_validation_mode(ValidationMode.STRICT)-
New
check_callbackparameter forFloatArrayItem:- The
check_callbackparameter allows you to specify a custom validation function for the item. - This function will be called to validate the item's value whenever it is set.
- If the function returns
False, the value will be considered invalid.
- The
-
New
allow_noneparameter forDataItemobjects:- The
allow_noneparameter allows you to specify whetherNoneis a valid value for the item, which can be especially useful when validation modes are used. - If
allow_noneis set toTrue,Noneis considered a valid value regardless of other constraints. - If
allow_noneis set toFalse,Noneis considered an invalid value. - The default value for
allow_noneisFalse, except forFloatArrayItem,ColorItemandChoiceItemand its subclasses, where it ...
- The