8000 FIX: ArchiverPlotCurveItem.to_dict keys Match Keyword Arguments of addYChannel by zdomke · Pull Request #1257 · slaclab/pydm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

FIX: ArchiverPlotCurveItem.to_dict keys Match Keyword Arguments of addYChannel #1257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2025

Conversation

zdomke
Copy link
Contributor
@zdomke zdomke commented Jun 6, 2025

Fixing a bug with PyDMArchiverTimePlot.addYChannel's keyword arguments having a different name than the ArchiverPlotCurveItem.to_dict's keys.

When feeding one of these dicts back into addYChannel (create the same curve) it resulted in 2 bad outcomes:

  1. showExtensionLine was not a recognized argument and would throw a TypeError
  2. useArchiveData was never actually used by ArchiverPlotCurveItem.__init__ since it expects use_archive_data

@zdomke
Copy link
Contributor Author
zdomke commented Jun 6, 2025

Below is an example of a bad dictionary that cannot be used by addYChannel. Notice that useArchiveData is false, but it will be ignored by the curve's initialization and archive data will still be fetched.

{
    "useArchiveData": false,
    "liveData": true,
    "showExtensionLine": false,
    "channel": "KLYS:LI22:31:KVAC",
    "name": "KLYS:LI22:31:KVAC",
    "color": "#008cf9",
    "lineStyle": 1,
    "lineWidth": 1,
    "symbolSize": 10,
    "yAxisName": "Axis 1",
    "thresholdColor": "white"
}

@zdomke zdomke marked this pull request as ready for review June 6, 2025 21:39
Copy link
Collaborator
@YektaY YektaY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! thanks for the fix

@YektaY YektaY merged commit 3b6d9c4 into slaclab:master Jun 10, 2025
13 checks passed
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.

2 participants
0