Releases: slaclab/pydm
PyDM 1.4 Release Notes
PyDM 1.4 Release Notes
PyDM 1.4 is here. This one has some very big new feature additions, as well as the usual host of minor improvements and bug fixes. We're very excited for the new stylesheet support, and the new widget rules system. Read on for more details...
New Features
- PyDM now has a 'rules' system, that lets you add simple dynamic behavior to widgets directly from within Designer, without writing any code. When you right click a PyDM widget, a 'Edit Rules' option is available to open up the Rules Editor. From here, you can set up channels to observe, and configure rules to change widget properties based on formulas you define. If you use EDM, and miss its visibility rule feature, this is like that on steroids. If you use CS-Studio, you'll probably feel right at home. See the documentation for all the details. (#365)
- Added a new PyDM Stylesheet system. This builds on Qt's stylesheet support, and lets you configure stylesheets to define the look-and-feel of PyDM widgets, including different styling for each alarm state. A stylesheet can be defined for the entire PyDM application to create a unified style for your entire library of displays. Stylesheets can also be defined for individual panels, or even individual widgets, to add new styling that also inherits (or overrides) the application stylesheet behavior. (#372)
- Added a new 'fullscreen mode'. You can access it via the 'View' menu, by pressing 'F11', or by supplying '--fullscreen' at the command line. (#371)
- PyDMComboBox can now handle data sources that provide a string-based value, in addition to the existing int support. (#369, thanks @teddyrendahl)
- Added a new PyDMDrawingPolygon widget, which draws an equilateral polygon with a user-specifiable number of sides. Triangles, hexagons, octagons, dodecagons... the power of Euclidian geometry is now in your hands. (#376)
- The PyDM command line launcher now has a '--version' argument that will display version information. (#377)
Bug Fixes
- PyDM plot classes now convert limit information to floats before using. This works around an overflow bug in pyqtgraph. (#370)
- On MacOS, PyDM will also search <qt_home>/libexec for the Designer.app package, in addition to <qt_home>/bin. If you installed Qt via Homebrew, PyDM's 'Edit in Designer' menu button should work for you now. (#366)
PyDM Version 1.3 Release Notes
PyDM 1.3 Release Notes
PyDM 1.3 is now available. This is a small release compared to the average for this project. We are hopefully going to be making smaller, more frequent minor version releases like this in the future.
New Features
- A new environment variable, PYDM_DISPLAYS_PATH, can be used to specify a default directory in which to look for display files. This way, you don't always have to provide a full path to a display file, if you keep them all in one place. Your current working directory will be searched first, followed by all the directories listed in PYDM_DISPLAYS_PATH, separated by a ":". (#349)
- An alternative syntax for supplying macro variables. The new syntax looks like this:
variable1=a, variable2=b
, which is much easier to type by hand. The old JSON-based syntax still works too. (#351, thanks @prjemian!) - PyDMDrawingImage now supports Animated GIF files. Finally, your PyDM displays can recreate the Geocities websites of your childhood. (#358)
Bug Fixes
- Channels for widgets inside embedded displays are no longer connected multiple times. This should fix problems where say, clicking a button would write to a channel three times. (#346, thanks to @prjemian for discovering the problem)
- In the PyEPICS data plugin, channel alarm changes will now be sent out even if the channel's value didn't change. (#356)
- The pyca data plugin now properly handles read/write access state changes, handles control variable changes, and sends out control variables to new listeners of an existing PV. (#357)
- The related display button will now only open a new display on left clicks, not middle or right clicks. (#359)
- Fix CI problems with codecov in Windows builds. (#360)
- Waveform plots no longer redraw unless the underlying data has changed. (#364)
- PyDM will no longer crash if a Symbol widget's imageFiles attribute is not valid JSON. (#368)
Other Changes
- Vestiges of PyQt4 code have been removed from PyDM. (#354, thanks @tacaswell)
PyDM Version 1.2.0 Release Notes
PyDM 1.2 Release Notes
Hello again, PyDM users! Version 1.2 is now available. This release is focused mostly on bug fixes, and the addition of many, many unit tests. We do have a few user-facing improvements, though.
New Features
- Major improvements to the Scale Widget (Thanks @laispc)
- More customizability of PyDMImageView in Designer.
Full List of Changes
- Changed the default EPICS plugin to PyEPICS, rather than pyca.
- Major improvements to the Scale Widget (Thanks @laispc)
- Expanded documentation for Tab Bar Widget
- Reorganized documentation for PyDM developers
- Many warning messages have been migrated from print statements to use the python logger system.
- Fix bugs in the right-click context menu for widgets.
- Unit tests and documentation added for PyDM utility classes.
- PyDM now has CI for Windows builds as well, through AppVeyor.
- PyDM will now display a blank main window if launched without a filename, rather than silently running with no UI at all.
- Unit tests added for PyDMPushButton.
- Add a command line option to the PyDM executable to use PyDM without showing a main window, for users who want to subclass PyDMApplication.
- Fix a bug where the PyDMPushButton would never send its value on push if the configured value was '0'.
- More customizability of PyDMImageView in Designer.
- PyDMImageView no longer has a hard-coded maximum value for the image data.
- Unit tests for PyDMLineEdit.
- Unit tests for PyDM Widget base classes.
- Fix a bug on PyDMBitIndicator which was causing crashes.
- Unit tests for PyDMShellCommand.
- Fix a bug when reshaping image data with C-like ordering in PyDMImageView.
- Unit tests for PyDMFrame.
- Unit tests for PyDMSpinbox.
- Fix crashes in PyDMDrawingImage when an invalid image file path was specified.
- PyDMEnumComboBox now inherits from QComboBox instead of QFrame. The API for this widget is still the same, but now all the QComboBox methods can be easily overridden.
- Fix an issue where changing a widget's
channel
property wouldn't update its internal variable. - Fix a bug when dynamically adding curves to PyDMTimePlots.
- Fixed a crash when a zero-length waveform was used by a PyDMWaveformPlot.
- Refactored the data plugin loading system.
- Add a PyDMLogWidget to display logging information.
- Update the year on PyDM's license document.
- Add a new widget category for 'container' widgets like PyDMTabBar and PyDMFrame.
- Unit tests for PyDMEnumComboBox.
- Fix a crash when trying to load a new tool on a blank PyDMMainWindow.
- PyDMLabels now treat character waveforms as null-terminated.
- Fix a crash when trying to open a non-existent file in a new window with a PyDMRelatedDisplay button.
- Fix a crash case where PyDM sometimes tried to disconnect from the same channel multiple times.
- Fix a crash when a PyDM widget had a blank
channel
property.
PyDM 1.1
PyDM 1.1.0 Release Notes
This is a pretty small release in terms of changes, but its got an important bug fix to PyDMImageViews, so we wanted to get it out quickly.
New Features
- Data plugins can now be dynamically loaded from a user-specified directory outside of where PyDM is installed. Simply set an environment variable named 'PYDM_DATA_PLUGINS_PATH' which points to the directory you want to load from.
- The PyDMShellCommand and PyDMRelatedDisplay button widgets now have a boolean property to hide/show their default icons.
Bug Fixes
- Fixed a bug in ImageView that prevented its channels from ever connecting. (Thanks @hhslepicka)
- Fixed a race condition in the PyEPICS plugin that would sometimes prevent it from working (Thanks @ZLLentz)
PyDM Version 1.0
PyDM 1.0.0 Release Notes
Version 1.0, just in time for the end of the year! At this point, we think that PyDM is ready for general use. In the spirit of semantic versioning, we’re promising that from this point forward, all 1.x releases will not change the public interfaces for widgets (both in Python and Designer), data plugins, and the application. That isn’t to say we don’t have more new features to come in 1.x releases, just that you’ll hopefully not have to worry about your displays breaking with updates.
The star of this release is the new ‘external tool interface’. This system lets you write simple interfaces to launch external applications (for example, a strip-tool, or archive viewer). Each external tool gets a menu item in the new ‘Tools’ menu, as well as in a menu that appears when right-clicking on widgets. When you execute an external tool, it is passed a list of all channels in the current widget, as well as the widget instance itself. This lets you do some clever stuff: launch a history plot for the PV in a widget! Open a browser window and start writing a logbook entry, with a list of PVs attached! Because we don’t know what external tools you are using, PyDM itself will only come with a couple examples. We’re excited to see what people come up with.
Finally, we’ve got all of the usual goodies below: One breaking change to pydm-testing-ioc, a few new smaller features, and several bug fixes.
Thanks for using PyDM! <3
Breaking Changes
- pydm-testing-ioc was moved from the
scripts
folder to the new locationexamples/testing_ioc
with theaccess_rules.as
file. (Thanks @hhslepicka) - The ‘pydm’ launcher is now autogenerated at the proper location on the system through the package installation procedure. This means that the scripts and data folders are gone. (Thanks @hhslepicka)
- PyDMIndicator is now deprecated after warning on previous versions of PyDM. Please use PyDMDrawingRectangle as a replacement.
New Features
- Added a pyqtProperty to ImageView that lets you specify a color map in Designer.
- Expanded documentation with some extra steps explaining how to build the PyDM prerequisites.
- Add a ‘read-only mode’ to PyDM. At the command line, you can specify a ‘--read-only’ argument, which prevents the user from writing to any channels. (Thanks @hhslepicka)
- Add a new ‘Show connections…’ menu option, which opens a window with a list of all channels used on the current display. The protocol for each channel and the connection status are also displayed. The list of channels can be dumped to a text file (one channel per line).
- Add context menu to PyDMRelatedDisplay to open in a new Window.
- About Screen with useful information of Python Modules, External Tools and Data Plugins in use.
Bug Fixes
- Fixed the tag_prefix at setup.cfg so the version is represented correctly and not with the “v” from the tag name. (Thanks @hhslepicka)
- Changed .gitattributes in order to make the “Pickle” files behave as binary files and not having its line endings (LF) changed to CRLF on checkout and break the code. Issue #196. (Thanks @hhslepicka)
- Fixed the open_file behaviour under Windows. Issues #32 and #196. (Thanks @hhslepicka)
- Fixed PyDM launcher generation and install (
pydm
for Linux and OSX andpydm.exe
for Windows) (Thanks @hhslepicka) - Prevent GUI from crashing if an exception is raised when executing a shell command (Thanks @ZLLentz)
- Fixed a crash if PyDMImageView receives a (0,0) image.
- Fixed the camviewer to work with the new colormaps file and the enhanced version of the ImageView. Issue #210. (Thanks @hhslepicka)
PyDM 0.4.0
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 befrom 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.
PyDM 0.3.0
v0.3 RELEASE NOTES
PyDM v0.3 adds new widgets, new features, and many bug fixes. Please note the breaking changes section below - if you use plot widgets, some action will need to be taken to make your displays work again. As a reminder, the project uses semantic versioning, and as we are still in major version 0, any release may have breaking changes, although we try to keep them to a minimum.
Breaking Changes
- PyDMTimePlot and PyDMWaveformPlot now accept multiple curves for each plot. To edit the curves for a plot in designer, right click it and choose 'edit curves', or double click on the widget. This will bring up a curve editor where the channel, label, and color for each curve can be configured. Please note that existing plots will no longer function, plots in .ui files and plots created in .py files need to be updated to use the new properties provided by the widgets. (thanks @laispc)
New Features
- The macro system has been extended to python based displays as well. Any Display subclass should expect to receive a 'macros' keyword argument in the initalizer, which is a dictionary with macro values, keyed on macro names.
- In the 'View' menu there is now an option to show the path to the file you are currently viewing, rather than its title.
- A new SpinBox widget to manipulate float values has been added (thanks @mennodoor)
- Display subclasses no longer need to define an 'intelclass' variable, PyDM will inspect the loaded python file and find the appropriate class to use.
- The 'File' menu now has an 'Open...' item which brings up a file dialog box to pick a file to load. (thanks @hhslepicka)
- A set of widgets for drawing shapes and static images have been added. These widgets all have alarm sensitivity in fill color and border. (thanks @hhslepicka)
- A widget called PyDMByteIndicator has been added for viewing the individual bits in a status 'byte'. Each bit has a configurable label, and the endianness of the byte, and number of bits contained within, are configurable.
- A widget called PyDMSymbol has been added. The symbol widget takes a enum channel as an input, and displays a different image for each state of the enum. Most common image file types are supported, as well as SVG (scalable vector graphics) files.
- PyDM now supports an environment variable to set a default protocol. If you set the PYDM_DEFAULT_PROTOCOL environment variable to a protocol specifier (for example, 'ca' for EPICS), you can define channels throughout PyDM without supplying the 'ca://' before the rest of the address.
- PyDMRelatedDisplayButtons now have an option to open their file in a new window, rather than in the existing window. (Note from Matt: Please use this feature sparingly to avoid a huge number of windows that operators need to clean up!)
- Data plugins can now be added by adding a file in pydm/data_plugins/. It is no longer necessary to modify the PyDMApplication to register a new plugin.
- PyDMPushButtons now have an option to display a confirmation dialog box before sending the value to the PV. Additionally, an 'enter password' box option has been added (thanks @hhslepicka).
- Data plugins can now send control limits and units to widgets. These can be used for example to set the maximum and minimum values the widget can handle. Support for control limits and units has been added to existing widgets, where applicable. These properties can be overridden by the display author if desired.
Bug Fixes
- Many problems with PyQt5 compatibility were fixed (thanks @gabrielfedel and @laispc)
- Handle cases where EPICS PVs return bytestrings for units in Python 3 (thanks @gabrielfedel)
- Widgets can implement slots for only one signal type (float, int, or string), they will not fail if all types are not implemented.
- Fix a crash when using PyEPICS plugin, and a PV info field (units, precision, etc.) changes without the value changing.
- Add handling of EPICS long, char, and short data types to EPICS plugins (thanks Tim Madden (@argonnexraydetector))
- Clicking on related display buttons without a defined filename property no longer crashes PyDM.
- Image color maps scaling calculations no longer rely on 8-bit image values (thanks @mennodoor)
- Fix a bug with PyDMLabel and PyDMSlider where they would not visually show disconnected status when their channel disconnects (thanks @laispc)
- Fixed a bug that prevented tooltips from displaying when middle clicking widgets. Also fixes problems when copying channel information to the clipboard when a widget is middle clicked. (thanks @scalverson)
- Fix a bug where old widgets were left in an embedded display after the file displayed was changed. (thanks @hhslepicka)
- Fix a bug where data plugins would sometimes get passed channels with empty 'address' fields and crash.
- Fix a bug where the slider widget would crash if it was sent an int value instead of a float. (thanks @mennodoor)
- Whitespace has been standardized throughout the project to four spaces per tab. (thanks @hhslepicka)
Macro Substitution Support
This release has a few new features (macro substitutions, a widget for setting enum values, new slider, etc), and a ton of bug fixes. Special thanks to @gabrielfedel and @laispc for their work fixing bugs that cropped up in the last release.
New Features
Macro Substitution
PyDM now supports macro variables, similar to those in EDM or CSS. Anywhere in a .ui file, you can add a macro variable that looks like this: ${variable}. If you are using Qt Designer, you can only add macros in string properties. But, if you want, you can open up the .ui file in a text editor and add one directly.
When you launch a display from the command line, you can specify values for each macro variable using the '-m' command line option. Specify variables as a JSON object. For example:
python pydm.py -m '{"variable": "value"}' my_file.ui
The related display button and embedded display widgets both support passing macros to their files.
Enum Combo Box
A new widget, PyDMEnumComboBox has been added. This widget provides a drop-down selector to set values for an enum channel.
New Slider
The slider widget has been completely re-written from scratch. It is less buggy, has indicators for limits and the current value, and is alarm-sensitive.
New Embedded Display Widget
The embedded display widget has been completely re-written. It is now based on QWidget, not QStackedWidget. As mentioned above, it supports macros, and it has an option to automatically disconnect from PVs when the display is not visible, and reconnect when it becomes visible again. The new widget is easier to embed inside container widgets. If you want the old QStackedWidget behavior, for example, just embed PyDMEmbeddedDisplays inside a QStackedWidget.
Command line args for .py files
Any command line options you give PyDM will be passed into your Display subclasses. You can use this however you want in your Display. As an example, you could pass in a text file with a list of devices, then have your Display populate itself from this list. Arguments are also passed from the 'filename' fields in related display buttons and embedded displays.
Bug fixes
- Fix many issues with handling signals with multiple types
- Widgets not held within layouts no longer disappear
- Write access and connection state supported in most widgets
- Labels have faster alarm handling, better enum support
- Fix some potential crashes in the image widget
- Many more!
Support for both PyQt4 and PyQt5
This release (v0.1.1) adds support for both PyQt4 and PyQt5. By default, it will first try to use PyQt4, and if that fails to import, it will try to use PyQt5. If you'd like to force PyDM to use one or the other, you can set an environment variable named PYDM_QT_LIB to either 'PyQt4' or 'PyQt5'. If you force a particular PyQt version, you will also have to force pyqtgraph to use the same version as PyDM, which you can do with its own environment variable: PYQTGRAPH_QT_LIB.
Basic Functionality
Seems like a good idea to start tagging versions at some point in time, so here we are. This release merges in a bunch of new functionality from Teddy Rendahl and Zachary Lentz, including:
- New widgets
- PyDMPushButton, a widget which puts a value to a channel when you click it.
- PyDMShellCommand, a widget which executes a shell command.
- PyDMEmbeddedDisplay, a widget which lets you embed one .ui file within another.
- New features
- PyDMLineEdit now has fancy support for units, including changing unit scales client-side.
- PyDMRelatedDisplayButton can now be given a path to a .ui file relative to the file the button lives in.
- A new 'local' plugin that can hook into arbitrary python objects
- Support for using the 'PSP' EPICS client, in addition to PyEPICS. The application will automatically determine whether or not you have PSP or PyEPICS, and use the right one.
- Code-base improvements
- Sphinx documentation added for many files.
- Unit tests for the PSP and local plugins.
Thanks to everybody who contributed. Have fun!