Skip to content

PyDM 0.4.0

Compare
Choose a tag to compare
@mattgibbs mattgibbs released this 13 Dec 04:34
· 2775 commits to master since this release

PyDM 0.4.0 Release Notes

Like all of the releases so far, 0.4.0 fixes a bunch of bugs, and adds a few new features. The biggest thing to note is that PyQt4 is no longer supported - from this release onward, PyDM only supports PyQt5. There are major breaking changes too, that may require you to modify .ui or .py display files. This is probably the last minor release before we finally increment the major version number. Once we hit 1.0, the APIs for the widgets 'fixed', and .ui/.py display files you create for 1.0 should continue to work without modification in any 1.x release. We will continue adding additional features in 1.x releases, but will not make any breaking changes.

Breaking Changes

  • PyQt4 is no longer supported, due to changes that require PyQt5 features.
  • All PyDM widgets now inherit from a base 'PyDMWidget' class. Widgets that write to PVs are derived from a subclass of PyDMWidget called PyDMWritableWidget. These base classes provide good default behavior for handing read/write access changes, connection status changes, and alarm changes, which makes developing new widgets (and maintaining old ones) much easier.
  • PyDMRelatedDisplayButton is no longer alarm sensitive, and now inherits from QPushButton instead of QFrame. This is only a breaking change if you've been using PyDM in between 0.3 and 0.4. It is recommended to embed a related display button within the new PyDMFrame if you want an alarm-sensitive border around your button.

The last two changes will cause a warning messages when you open old .ui files in Qt Designer. Simply opening the file and saving it should prevent the warning from appearing in the future, and even without saving, these .ui files should still work in PyDM. Python-based displays which relied on old behavior might crash unless they are modified.

New Features

  • PyDM widgets are now grouped into different categories in Qt Designer, which makes them much easier to find. (Thanks @laispc)
  • PyDM plot classes now have Qt properties for specifying manual plot ranges in code and in Qt Designer.
  • The navigation bar (forward/back/home buttons) has been totally redone, and can be shown/hidden via menu actions and command line arguments.
  • A third plot type has been added: PyDMScatterPlot. Scatter plots take two scalar channels, and plot one channel vs. the other on an X vs Y plot. A configurable number of prior data points are displayed on the plot. Multiple curves are possible, with different colors and data symbols.
  • Documentation has been significantly improved: All widgets are now documented (useful for folks developing python-based displays), the PyDMApplication class is documented, documentation has been added on how to create python-based displays, and there is a new guide to getting started with PyDM.
  • The documentation is generated any time new code is committed, and the most up-to-date version is available at http://slaclab.github.io/pydm/ (Thanks @hhslepicka)
  • Waveform plots now have options to redraw only when one of the two axes update, or only after both have updated, in addition to the previous behavior of redrawing when either axes updated.
  • The Archiver Appliance data plugin (which is really just a proof of concept right now) has been modified to use an environment variable to specify the URL of the archiver instance, rather than hard-coded in the plugin itself (Thanks @hhslepicka)
  • PyDM plots now have many more options for curves (line width, line type, etc.) (Thanks @fernandohds564)
  • The 'units' module in the utilities has been improved with even more unit types. (Thanks @fernandohds564)
  • PyDMSpinBox's step size picker can now be shown an hidden at runtime via a right-click menu option. (Thanks @fernandohds564)
  • A new PyDMScaleIndicator widget provides a bar-graph-like indicator for a single scalar value. The widget has a configurable scale tick marks, and works in both horizontal and vertical orientations. (Thanks @laispc)
  • PyDMWaveformTable can now edit waveform data as well as read it. It can also transform one-dimensional arrays into two-dimensions. Labels can be added to both rows and columns.
  • All plot-related classes now inherit from common plot base classes, making maintenance much easier (Thanks @fernandohds564)
  • Widgets can now be imported directly from pydm.widgets, no need to import from the individual widget's module anymore. For example from pydm.widgets.line_edit import PyDMLineEdit can now be from pydm.widgets import PyDMLineEdit. (Thanks @hhslepicka)
  • PyDM now has an Anaconda recipe! See the documentation for more details. (Thanks @hhslepicka)
  • The image widget and plot widgets all handle updates differently now - they have a fixed maximum update rate that is user-configurable. This prevents massive, extremely-fast updating waveforms from bringing the whole display to a grinding halt.
  • A new PyDMFrame widget now provides a general-purpose way to give any widget (even a non-PyDM widget!) an alarm sensitive border. This also allows you to show one alarm border for a group of multiple widgets, or use a different PV for the alarm than the PV used for the control widget. (Thanks @hhslepicka)
  • The menu bar at the top of the window and the status bar at the bottom of the window are now toggle-able via menu actions, keyboard shortcuts, and command line arguments. (Thanks @hhslepicka)
  • PyDMDrawingImage now has an initializer argument to specify an image file at initialization time.
  • The Edit in Designer menu item can now be used to open python-based displays (or displays that use both .ui files and .py files) too. The .py file will be opened in the default text editor for your OS. (Thanks @hhslepicka)
  • An option has been added to PyDMShellCommand buttons to allow them to run the command multiple times, even before the initial command is finished running. This is useful when the button is used to launch a long-lived process, like an application. (Thanks @hhslepicka)

Bug Fixes

  • Warnings about "TypeError" no longer appear when manipulating PyDMSliders in Qt Designer.
  • Fix problems with unit strings disappearing if labels were configured with precision of 0. (Thanks @laispc)
  • Fixed a crash when using PyDMWaveformTable. (Thanks @hhslepicka)
  • Better error handling for PyDMTimePlots and PyDMWaveformPlots curve properties in Qt Designer. (Thanks @gabrielfedel)
  • Fix broken 'camviewer' example (Thanks @hhslepicka)
  • Widgets that never established a connection to a channel are now properly disabled.
  • Fix string encoding problems in the PyEPICS plugin (Thanks @ZLLentz)
  • Fix an edge-case where a not-fully-connected PV may try to send a connection state change, causing a crash (Thanks @ZLLentz)
  • Fix issues with PyDMSpinBox when used in locales which use commas as decimal separators rather. (Thanks @fernandohds564)
  • Fix a bug when adding many Y signals to a PyDMTimePlot via the widget's initializer. (Thanks @fernandohds564)
  • Fix bug where values equal to 0 would never cause PyDMEnumComboBox to update (Thanks @gu1lhermelp)
  • Fix bug where PyDMPushButton would not send values equal to 0 (Thanks @fernandohds564)
  • Fix bugs related to alarm borders (Thanks @xresende)
  • Better clean-up of signals/slots when disconnecting from a channel (Thanks @ZLLentz)
  • PyDM displays now resize in a less-braindead way that obeys the size of the .ui file, and no longer attempts to make the window as small as possible.
  • PyDMDrawingImages now properly show images in Qt Designer, even when the images are specified via relative paths (Thanks @hhslepicka)
  • Drawing widgets now have size hints to prevent layouts from crushing them into oblivion.