Skip to content

ENH: ui exporter#638

Merged
ZLLentz merged 30 commits into
pcdshub:masterfrom
ZLLentz:enh_ui_exporter
May 13, 2026
Merged

ENH: ui exporter#638
ZLLentz merged 30 commits into
pcdshub:masterfrom
ZLLentz:enh_ui_exporter

Conversation

@ZLLentz
Copy link
Copy Markdown
Member

@ZLLentz ZLLentz commented Apr 29, 2026

Description

Add a new command-line option to typhos:

--export some_filepath.ui

Which creates a pydm ui file facsimile of the typhos screen.

This will be used to semi-automatically create pre-filled PyDM screens that can then be tweaked manually. These PyDM screens will not have dependencies on the typhos package, only on stock PyDM widgets.

Things that are covered:

  • Only epics signals are supported. If a device has non-epics signals, these will be skipped.
  • Display titles will be swapped to basic labels
  • All sub-widgets normally generated as part of a typhos panel will be exposed as individually editable widgets.
  • All other typhos widgets in templates will be replaced with blank placeholders
  • Some basic effort will be made to "un-macro" the display- that is, produce it in a form where we could substitute e.g. the prefix and any other important macros in a swappable way using the pydm macro handling.

Some follow-up tasks for possibly a later PR, possibly never

  • Handle the customwidgets xml so the ui files run without being processed by designer
  • Do something better for the motor widgets
  • Force template option?
  • Have some support for exporting suites, not just displays

Motivation and Context

We're starting to migrate away from using typhos at LCLS to make it easier for us to handle specific user requests for screens, which includes domain-specific ideas but also better UX in general, which is not easily achievable in a fully-automated display generation system.

Additional Changes

Release Notes

I've also gone ahead and discontinued the pre-release notes system. I'm going to be discontinuing this on all of our libraries over time. I've found it extremely cumbersome and redundant compared to just linking to the github releases page.

In lieu of this, I'm going to pay more attention to PR descriptions as release note components.

uv

I like uv, I will use it

pre-commit and ruff

I've applied pre-commit and ruff rules to the repository

How Has This Been Tested?

Interactively only on a half-dozen devices.
I couldn't figure out a reasonable way to make a unit test for this, since it only works on EPICS signals and I didn't want to create real EPICS signals to test on.

Where Has This Been Documented?

Here only

Pre-merge checklist

  • Code works interactively
  • Code contains descriptive docstrings, including context and API
  • New/changed functions and methods are covered in the test suite where possible
  • Code has been checked for threading issues (no blocking tasks in GUI thread)
  • Test suite passes locally
  • Test suite passes on GitHub Actions
  • Ran docs/pre-release-notes.sh and created a pre-release documentation page
  • Pre-release docs include context, functional descriptions, and contributors as appropriate

ZLLentz and others added 25 commits April 28, 2026 18:22
@ZLLentz ZLLentz changed the title WIP: ui exporter ENH: ui exporter Apr 30, 2026
@ZLLentz ZLLentz marked this pull request as ready for review May 1, 2026 00:03
@ZLLentz ZLLentz requested review from a team as code owners May 1, 2026 00:03
@ZLLentz ZLLentz merged commit 35db14a into pcdshub:master May 13, 2026
18 of 21 checks passed
@ZLLentz ZLLentz deleted the enh_ui_exporter branch May 13, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant