Skip to content
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

Add support for writing to user-editable variables through the API #284

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

JamesWrigley
Copy link
Member

This has been requested by various users. Note that currently we only support writes for user-editable variables because writing to the HDF5 files would require some more coordination.

@JamesWrigley JamesWrigley self-assigned this Jul 5, 2024
@@ -944,6 +945,42 @@ def __init__(self, file_path: Path, parent=None):
self.setCentralWidget(self.text_edit)
self.resize(1000, 800)

class QtUpdateAgent(UpdateAgent, QtCore.QObject):
Copy link
Member

Choose a reason for hiding this comment

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

I appreciate this isn't really part of this PR, but is there any reason we need the update sender & update receiver to be one class? It seems like all they share is the topic name, so they could easily be independent.

Copy link
Member Author

Choose a reason for hiding this comment

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

One thing is better than two? 😛 I dunno, either design seems fine to me.

Copy link
Member

Choose a reason for hiding this comment

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

If there's an easy way to avoid multiple inheritance, I generally think it's worth taking. I don't feel strongly enough to hold this up, though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah right, that makes sense. I refactored it in 6ca1363.

tests/test_api.py Outdated Show resolved Hide resolved
@takluyver
Copy link
Member

LGTM!

@takluyver
Copy link
Member

Thanks James, LEBTM (Looks Even Better To Me)!

@JamesWrigley
Copy link
Member Author

Thanks :) I found a bug to do with writing to the comment column so I'm holding off on merging until I fix that.

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