pcdshub / pmps-ui

User interfaces and diagnostics for PMPS
Other
0 stars 8 forks source link

MNT: Consider refactoring entrypoints to import PMPS Display instead of call file #102

Open tangkong opened 7 months ago

tangkong commented 7 months ago

Expected Behavior

From Zach:

I think ideally the code looks more like "import the pmps class and create it" 
and less like "here's a string path to a python file to exec", so long as the
pydm application would support it.

Current Behavior

We call PyDMApplication and direct its ui_file arg to the right python file (source)

Possible Solution

Refactor the package a smidge. Doing this might require us to do more PyDM initialization.

A note: I did try creating the display under a vanilla QApplication, but got a lot of EPICS connection errors. For example this fails on teardown:

app = QApplication([])
display = PMPS()
display.show()
app.exec()

Context

Brought up in #100

Your Environment

pcds-5.8.1