pyvisa / pyvisa-py

A pure python PyVISA backend
https://pyvisa-py.readthedocs.io
MIT License
282 stars 120 forks source link

Update iter_bytes to be the same as what's used in `pyvisa-sim` #389

Closed dougthor42 closed 11 months ago

dougthor42 commented 1 year ago

This ports https://github.com/pyvisa/pyvisa-sim/pull/81 to this project per request in https://github.com/pyvisa/pyvisa-sim/pull/81#issuecomment-1567565412, closing #374.

MatthieuDartiailh commented 11 months ago

Sorry this completely escaped my attention. I would say we can scrape iter_bytes from serial. It was not really meant to be public. But its disappearance should be mentioned.

I am planning to release soon since there has been multiple bug fixes. Do you think you can make the changes before next week ?

dougthor42 commented 11 months ago

Updated, PTAL

codecov[bot] commented 11 months ago

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (ea7fa43) 23.14% compared to head (28fbf8c) 24.22%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #389 +/- ## ========================================== + Coverage 23.14% 24.22% +1.07% ========================================== Files 23 24 +1 Lines 3318 3356 +38 Branches 458 469 +11 ========================================== + Hits 768 813 +45 + Misses 2532 2524 -8 - Partials 18 19 +1 ``` | [Flag](https://app.codecov.io/gh/pyvisa/pyvisa-py/pull/389/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyvisa) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/pyvisa/pyvisa-py/pull/389/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyvisa) | `24.22% <83.63%> (+1.07%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyvisa#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/pyvisa/pyvisa-py/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyvisa) | Coverage Δ | | |---|---|---| | [pyvisa\_py/testsuite/test\_common.py](https://app.codecov.io/gh/pyvisa/pyvisa-py/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyvisa#diff-cHl2aXNhX3B5L3Rlc3RzdWl0ZS90ZXN0X2NvbW1vbi5weQ==) | `100.00% <100.00%> (ø)` | | | [pyvisa\_py/common.py](https://app.codecov.io/gh/pyvisa/pyvisa-py/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyvisa#diff-cHl2aXNhX3B5L2NvbW1vbi5weQ==) | `88.09% <93.33%> (+13.09%)` | :arrow_up: | | [pyvisa\_py/serial.py](https://app.codecov.io/gh/pyvisa/pyvisa-py/pull/389?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pyvisa#diff-cHl2aXNhX3B5L3NlcmlhbC5weQ==) | `5.97% <12.50%> (+0.25%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

MatthieuDartiailh commented 11 months ago

Isort and flake8 are unhappy. CI do not run automatically because you are a first time contributor.