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 read_stb method for TCPIP HiSLIP client. #429

Merged

Conversation

ckutlu
Copy link
Contributor

@ckutlu ckutlu commented May 22, 2024

This PR adds a read_stb method to the TCPIPInstrHiSLIP class, emulating the viReadSTB function.

I recently stumbled on this issue when I tried to call resource.read_stb() using a resource created with a HiSLIP connection. I realized this was due to a missing method in the TCPIPInstrHiSLIP class, so I went ahead and implemented it. Quick trip to IVI-6.1 Rev 2.0 section 6.14 (which I found here) revealed that I can use hislip.Instrument.async_status_query for that.

Let me know if this is acceptable, and if there is anything I can do to make it work for you. Cheers!

  • Closes # (insert issue number if relevant)
  • Executed black . && isort -c . && flake8 with no errors (Checked ruff, no changes were suggested)
  • The change is fully covered by automated unit tests
  • Documented in docs/ as appropriate
  • Added an entry to the CHANGES file

@ckutlu
Copy link
Contributor Author

ckutlu commented Jun 3, 2024

@MatthieuDartiailh is there anything I can do to help move this PR?

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.

Project coverage is 24.48%. Comparing base (0367dc6) to head (0bb2c19).
Report is 3 commits behind head on main.

Current head 0bb2c19 differs from pull request most recent head f765907

Please upload reports for the commit f765907 to get more accurate results.

Files Patch % Lines
pyvisa_py/tcpip.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #429      +/-   ##
==========================================
- Coverage   24.81%   24.48%   -0.34%     
==========================================
  Files          25       23       -2     
  Lines        3502     3488      -14     
  Branches      485      485              
==========================================
- Hits          869      854      -15     
- Misses       2616     2617       +1     
  Partials       17       17              
Flag Coverage Δ
unittests 24.48% <33.33%> (-0.34%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MatthieuDartiailh
Copy link
Member

Could you add an entry to changelog ? I will merge quickly once it is done. Sorry for the slow response

@ckutlu
Copy link
Contributor Author

ckutlu commented Jun 4, 2024

No worries at all, and done! Many thanks @MatthieuDartiailh :)

@MatthieuDartiailh MatthieuDartiailh merged commit 0cded75 into pyvisa:main Jun 4, 2024
3 of 15 checks passed
MatthieuDartiailh added a commit that referenced this pull request Sep 17, 2024
* Add read_stb method for TCPIP HiSLIP client.

* Fix type error.

* Add entry to changelog.

* Update CHANGES

---------

Co-authored-by: Caglar Kutlu <caglar.kutlu@zhinst.com>
Co-authored-by: Matthieu Dartiailh <marul@laposte.net>
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