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 compatibility with Pyside2/Qt5 #1

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

Conversation

amotl
Copy link

@amotl amotl commented Feb 21, 2021

Dear Uwe, Jens and all sigrok contributors,

first things first: Thanks a stack for conceiving and maintaining sigrok.

While we know PulseView and SmuView are in the focus of development, there might still be a need for sigrok-meter. A friend told me that he would be interested to run sigrok-meter on Python 3. So, I tried to look into that and after finding it would still be based on PySide/Qt4, I decided to give it a shot to check what it would take to modernize it to use PySide2/Qt5. It turned out that it was not too much.

So, while I don't know if this is an accepted method to hand in patches to the code base, I still wanted to publish it here. Let me know what you think about it and also if you have a different process of submitting patches.

Keep up the spirit and with kind regards,
Andreas.

There have been some errors when configuring the device before opening.

The reason might be that something changed here with more recent
libsigrok versions. However, we have not been able to verify it yet.
With more recent libsigrok versions, "session.run()" has to be invoked
after "session.start()".

Other than this, pending events should be processed in order not to
block the UI. The most naive approach is to do it in the measurement
loop for now.
@abraxa
Copy link
Member

abraxa commented Feb 21, 2021

Thanks a lot for the changes!

In the .rst file you refer to "git clone https://github.com/daq-tools/sigrok-meter --branch pyside2", which as you know isn't the main repo. From a quick glance, it seems as if it merely contains the changes of this PR, so if the PR is merged, the .rst file might as well refer to the sigrok-meter main repo.

Is my understanding correct?

@amotl amotl force-pushed the pyside2 branch 2 times, most recently from df61a38 to f84d056 Compare February 22, 2021 00:45
@amotl
Copy link
Author

amotl commented Feb 22, 2021

Hi Soeren,

--branch pyside2 - ... so if the PR is merged, the .rst file might as well refer to the sigrok-meter main repo.

Thanks for spotting this flaw. I merely added this to provide my colleague with thorough installation instructions and forgot to remove it before submitting the patch.

I've now corrected this and also improved the INSTALL.rst to provide better guidance while being at it.

With kind regards,
Andreas.

@amotl
Copy link
Author

amotl commented Mar 8, 2021

Hi Soeren,

I've addressed your suggestions the other day. Please let me know if you see that any other amendments should be made.

With kind regards,
Andreas.

@amotl
Copy link
Author

amotl commented Apr 19, 2021

Dear Soeren,

is there a chance to merge this patch?

With kind regards,
Andreas.

@fenugrec
Copy link

fenugrec commented Oct 9, 2023

FYI it is being discussed on the sigrok IRC channel these days if you would still care to participate. The PR is not mergeable as-is, there is some interest, but some broader questions need to be addressed first.

Copy link

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

Having had a conversation with the sigrok folks on IRC, we've had a look through and identified some items that could do with clarification and potentially clean-up.

It would also be helpful if commit messages like "Make the data flow" were improved to better explain what the commits do and summarise. Right now, the commit log messages don't make much sense to us.

@@ -1,2 +1,3 @@
.idea

Choose a reason for hiding this comment

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

This seems unrelated to the main change set - perhaps drop this change?

@@ -24,13 +24,21 @@ ifneq ($(MAKECMDGOALS),clean)
ifeq (0,$(shell which pyside-rcc >/dev/null 2>&1; echo $$?))
RCC = pyside-rcc
else
$(error "resource compiler not found")
ifeq (0,$(shell which pyside2-rcc >/dev/null 2>&1; echo $$?))

Choose a reason for hiding this comment

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

Is there a particular reason for checking for PySide2's resource compiler /after/ PySide's? Would have thought you'd want this the other way around. Additionally, the Python changes drop support for PySide, so what point is there keeping the old build logic around?

Comment on lines +102 to +103
self.session.add_device(device)
device.open()

Choose a reason for hiding this comment

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

What is the purpose of moving these two lines? This reads like change noise - a comment inserted before on why this reordering is needed and what bug it solves would be very helpful.

@@ -114,6 +115,7 @@ def is_running(self):
def start(self):
'''Start the session.'''
self.session.start()
self.session.run()

Choose a reason for hiding this comment

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

This looks like a behaviour change, why is this necessary?

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.

4 participants