Giter Club home page Giter Club logo

adl2pydm's People

Contributors

klauer avatar prjemian avatar

Watchers

 avatar  avatar  avatar  avatar

adl2pydm's Issues

"Connected" text does not show

When using the new PyDM screens with an AVT Mako camera, the green "Connected" text does not show on the PyDM screen although it shows in the caQtDM screen (shown to the left).

command line option to use PyDMScatterPlot instead of PyDMWaveformPlot

Until then, the translator should default to PyDMWaveformPlot instead of PyDMScatterPlot.

I agree, I think the Cartesian plot is used much more with waveforms than scalers.

Since most windows have at most one plot window (or if there is more than one they are usually all the same type) then you could have a command line option for the translator that tells it to use PyDMScatterPlot rather than the default PyDMWaveformPlot.

Originally posted by @MarkRivers in #45 (comment)

handling and tests for MEDM widgets

Define handling and unit testing for reading these MEDM widgets. Check them off once both parts are complete for reading a MEDM widget.

  • arc
  • bar
  • byte
  • cartesian plot
  • choice button
  • composite
  • embedded display
  • image
  • indicator
  • menu
  • message button
  • meter
  • oval
  • polygon
  • polyline
  • rectangle
  • related display
  • shell command
  • strip chart
  • text
  • text entry
  • text update
  • valuator
  • wheel switch

Also basic attribute and dynamic attribute appear at the file level of some displays, such as std-R3-5-ID_ctrl.adl. There can be more than one basic attribute at the file level. Some contain channel information. Where should these data be placed? Could these be errors in the file?

Also: caServerApp/test.adl has some unusual but allowed .adl structures, probably a torture test for translators such as this

valuator: error when precision written as float

Processing this file: testDisplay.adl, this error stops the PyDM screen from displaying:

[2019-11-18 12:02:13,098] [ERROR   ] - Cannot open file: '/tmp/testDisplay.ui'. Reason: 'invalid literal for int() with base 10: '1.000000''.

The precision of the valuator (slider) widget is written as a float.

      <property name="precision">
        <number>1.000000</number>
      </property>

slider not matching MEDM example

Describe the bug
The slider in this screen does not match the MEDM example.

Clipboard01

  • limits are wrong
  • values of target and limits should not be shown

hyphen in file name raises exception

Describe the bug
When a converted file has a hyphen in the name, it raises an exception only because the file base name is used as the text of the class element in the .ui file. Changing the hyphen to underscore was successful.

atures_3.uiemian@wow ~/.../projects/sbc-mako $     pydm  ${PYDM_OPTIONS}  --macro "P=13ARV1:,R=cam1:"  AVT_Mako_G234C-fe 
Traceback (most recent call last):
  File "/home/beams/JEMIAN/.conda/envs/pydm_03/bin/pydm", line 11, in <module>
    load_entry_point('pydm', 'gui_scripts', 'pydm')()
  File "/home/beams1/JEMIAN/Documents/projects/pydm-prj/pydm_launcher/main.py", line 113, in main
    stylesheet_path=pydm_args.stylesheet
  File "/home/beams1/JEMIAN/Documents/projects/pydm-prj/pydm/application.py", line 96, in __init__
    self.main_window.open(ui_file, macros, command_line_args)
  File "/home/beams1/JEMIAN/Documents/projects/pydm-prj/pydm/main_window.py", line 328, in open
    target=target)
  File "/home/beams1/JEMIAN/Documents/projects/pydm-prj/pydm/display.py", line 62, in load_file
    w = load_ui_file(file, macros=macros)
  File "/home/beams1/JEMIAN/Documents/projects/pydm-prj/pydm/display.py", line 97, in load_ui_file
    klass, _ = uic.loadUiType(f)
  File "/home/beams/JEMIAN/.conda/envs/pydm_03/lib/python3.7/site-packages/PyQt5/uic/__init__.py", line 202, in loadUiType
    exec(code_string.getvalue(), ui_globals)
  File "<string>", line 4
    class Ui_AVT_Mako_G234C-features_3(object):
                           ^
SyntaxError: invalid syntax

Summary: clean up this text before using it in the class element

root.display

move the display block from root.contents[somewhere] to root.display

write and test PyDM widget types

these are the (internal, MEDM) widget types to write in PyDM:

  • arc
  • bar
  • byte (Byte Monitor)
  • cartesian plot
  • choice button
  • composite
  • embedded display (see #17 and slaclab/pydm#565)
  • image
  • indicator (Scale Monitor)
  • menu
  • message button
  • meter
  • oval
  • polygon
  • polyline
  • rectangle
  • related display
  • shell command
  • strip chart
  • text
  • text entry
  • text update (Text Monitor)
  • valuator (Slider)
  • wheel switch

customwidgets

In the .ui file, build the <customwidgets/> section from only the widgets used in the file. Where is the source of this information available?

custom widgets extend other custom widgets

Some custom widgets (PyDMDrawingPie, for example) extend another custom widget (in this case: PyDMDrawingArc). The extended widget(s) must be included in the <customwidgets> element of the .ui file.

TODO items in cartesian plot output

still some TODO items in cartesian plot writer:

# "lineWidth": 1, # TODO:
# "symbol": null, # TODO:
# "symbolSize": 10, # TODO:
# "redraw_mode": 2 # TODO:

# TODO: improve? fill-under not available in PyDM

# x_axis y1_axis y2_axis: might have rangeStyle="auto-scale"
for item in "x_axis y1_axis y2_axis".split():
if item in block.contents:
# TODO:
logger.warning("block.contents['%s'] not handled" % item)

support writing of .adl files

With this step, this package could become the start of a back-translator from PyDM (or potentially other screen formats) to .adl, or converter between formats.

Consider this a means for developers to interchange screens between contemporary tools.

setup.py packaging needs to be rebuilt

Describe the bug
With the existing setup.py, the source code is not installed and the adl2pydm command line program will not run.

To Reproduce

  1. pip install .
  2. adl2pydm -h -- this command fails

Expected behavior
adl2pydm -h should show a help message.

PyDMSpinbox

Need to learn how to use the controls of the PyDMSpinbox widget so as to translate properly the MEDM wheel switch widget.

various options in MEDM limits

The MEDM widget set supports PV limits through several options. Primarily, the Label (enumeration) and the PV Limits dialog. These are related.

Provide consistent handling for the various features. Need example .adl file(s) exercising these features.

Label

Clipboard01

PV Limits

Clipboard02

add versioneer

add support for version control using python versioneer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.