-
Notifications
You must be signed in to change notification settings - Fork 6
Drop support for Python 3.8, add support for Python 3.13, and update dependencies. #85
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
Open
v12ganesh
wants to merge
12
commits into
tektronix:main
Choose a base branch
from
v12ganesh:ganesh12/build_errors_fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #85 +/- ##
==========================================
+ Coverage 80.72% 80.91% +0.19%
==========================================
Files 3 3
Lines 524 524
Branches 94 74 -20
==========================================
+ Hits 423 424 +1
Misses 82 82
+ Partials 19 18 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nfelt14
requested changes
Jul 11, 2025
nfelt14
requested changes
Jul 14, 2025
Test Results (macos)
tests/test_client.pytekhsi_client = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x112b22f90>
capsys = <_pytest.capture.CaptureFixture object at 0x112bc52b0>
instrument = True, sum_count = 5, sum_acq_time = 10.0, sum_data_rate = 50.0
expected_output = 'Average Update Rate:0.50, Data Rate:10.00Mbs'
@pytest.mark.parametrize(
("instrument", "sum_count", "sum_acq_time", "sum_data_rate", "expected_output"),
[
(True, 5, 10.0, 50.0, "Average Update Rate:0.50, Data Rate:10.00Mbs"),
],
)
def test_server_connection(
tekhsi_client: TekHSIConnect,
capsys: pytest.CaptureFixture[str],
instrument: bool,
sum_count: int,
sum_acq_time: float,
sum_data_rate: float,
expected_output: str,
) -> None:
"""Test the server connection using the TekHSI client.
Args:
tekhsi_client: An instance of the TekHSI client to be tested.
capsys (CaptureFixture): Pytest fixture to capture system output.
instrument: Whether the instrument is connected.
sum_count: The sum count.
sum_acq_time: The sum acquisition time.
sum_data_rate: The sum data rate.
expected_output: The expected output message.
"""
# Set the required attributes
tekhsi_client._instrument = instrument
tekhsi_client._sum_count = sum_count
tekhsi_client._sum_acq_time = sum_acq_time
tekhsi_client._sum_data_rate = sum_data_rate
# Set the verbose attribute to True
tekhsi_client.verbose = True
# Use the context manager to handle connection
> with tekhsi_client as connection:
^^^^^^^^^^^^^
capsys = <_pytest.capture.CaptureFixture object at 0x112bc52b0>
captured = CaptureResult(out='2025-10-27 04:50:12.000888 - enter()\n', err='')
connection = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x112b22f90>
expected_output = 'Average Update Rate:0.50, Data Rate:10.00Mbs'
instrument = True
request = name: "test_client"
response = status: CONNECTSTATUS_SUCCESS
sum_acq_time = 10.0
sum_count = 5
sum_data_rate = 50.0
tekhsi_client = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x112b22f90>
tests/test_client.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/tests/lib/python3.13/site-packages/tekhsi/tek_hsi_connect.py:211: in __exit__
self.close()
exc_tb = None
exc_type = None
exc_val = None
self = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x112b22f90>
.tox/tests/lib/python3.13/site-packages/tekhsi/tek_hsi_connect.py:443: in close
self.force_sequence()
self = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x112b22f90>
.tox/tests/lib/python3.13/site-packages/tekhsi/tek_hsi_connect.py:500: in force_sequence
self.connection.RequestNewSequence(request)
request = name: "24b4b079-a711-47cc-b919-4d16796e4c0b"
self = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x112b22f90>
.tox/tests/lib/python3.13/site-packages/grpc/_channel.py:1166: in __call__
return _end_unary_response_blocking(state, call, False, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
call = <grpc._cython.cygrpc.SegregatedCall object at 0x112bb3300>
compression = None
credentials = None
metadata = None
request = name: "24b4b079-a711-47cc-b919-4d16796e4c0b"
self = <grpc._channel._UnaryUnaryMultiCallable object at 0x112d2f540>
state = <grpc._channel._RPCState object at 0x112c09130>
timeout = None
wait_for_ready = None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <grpc._channel._RPCState object at 0x112c09130>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x112bb3300>
with_call = False, deadline = None
def _end_unary_response_blocking(
state: _RPCState,
call: cygrpc.SegregatedCall,
with_call: bool,
deadline: Optional[float],
) -> Union[ResponseType, Tuple[ResponseType, grpc.Call]]:
if state.code is grpc.StatusCode.OK:
if with_call:
rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
return state.response, rendezvous
return state.response
> raise _InactiveRpcError(state) # pytype: disable=not-instantiable
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.FAILED_PRECONDITION
E details = ""
E debug_error_string = "UNKNOWN:Error received from peer ipv6:%5B::1%5D:50313 {grpc_status:9, grpc_message:""}"
E >
call = <grpc._cython.cygrpc.SegregatedCall object at 0x112bb3300>
deadline = None
state = <grpc._channel._RPCState object at 0x112c09130>
with_call = False
.tox/tests/lib/python3.13/site-packages/grpc/_channel.py:996: _InactiveRpcError |
Test Results (ubuntu)
|
Test Results (windows)
tests\test_client.pytekhsi_client = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x0000023D5287C6E0>
capsys = <_pytest.capture.CaptureFixture object at 0x0000023D5287DBE0>
instrument = True, sum_count = 5, sum_acq_time = 10.0, sum_data_rate = 50.0
expected_output = 'Average Update Rate:0.50, Data Rate:10.00Mbs'
@pytest.mark.parametrize(
("instrument", "sum_count", "sum_acq_time", "sum_data_rate", "expected_output"),
[
(True, 5, 10.0, 50.0, "Average Update Rate:0.50, Data Rate:10.00Mbs"),
],
)
def test_server_connection(
tekhsi_client: TekHSIConnect,
capsys: pytest.CaptureFixture[str],
instrument: bool,
sum_count: int,
sum_acq_time: float,
sum_data_rate: float,
expected_output: str,
) -> None:
"""Test the server connection using the TekHSI client.
Args:
tekhsi_client: An instance of the TekHSI client to be tested.
capsys (CaptureFixture): Pytest fixture to capture system output.
instrument: Whether the instrument is connected.
sum_count: The sum count.
sum_acq_time: The sum acquisition time.
sum_data_rate: The sum data rate.
expected_output: The expected output message.
"""
# Set the required attributes
tekhsi_client._instrument = instrument
tekhsi_client._sum_count = sum_count
tekhsi_client._sum_acq_time = sum_acq_time
tekhsi_client._sum_data_rate = sum_data_rate
# Set the verbose attribute to True
tekhsi_client.verbose = True
# Use the context manager to handle connection
> with tekhsi_client as connection:
^^^^^^^^^^^^^
capsys = <_pytest.capture.CaptureFixture object at 0x0000023D5287DBE0>
captured = CaptureResult(out='2025-10-27 04:51:32.000751 - ch1:read header\n2025-10-27 04:51:32.000752 - enter()\n', err='')
connection = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x0000023D5287C6E0>
expected_output = 'Average Update Rate:0.50, Data Rate:10.00Mbs'
instrument = True
request = name: "test_client"
response = status: CONNECTSTATUS_SUCCESS
sum_acq_time = 10.0
sum_count = 5
sum_data_rate = 50.0
tekhsi_client = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x0000023D5287C6E0>
tests\test_client.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\tests\Lib\site-packages\tekhsi\tek_hsi_connect.py:211: in __exit__
self.close()
exc_tb = None
exc_type = None
exc_val = None
self = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x0000023D5287C6E0>
.tox\tests\Lib\site-packages\tekhsi\tek_hsi_connect.py:443: in close
self.force_sequence()
self = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x0000023D5287C6E0>
.tox\tests\Lib\site-packages\tekhsi\tek_hsi_connect.py:500: in force_sequence
self.connection.RequestNewSequence(request)
request = name: "abaabb6d-4019-41ec-bd41-8679caf66087"
self = <tekhsi.tek_hsi_connect.TekHSIConnect object at 0x0000023D5287C6E0>
.tox\tests\Lib\site-packages\grpc\_channel.py:1166: in __call__
return _end_unary_response_blocking(state, call, False, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
call = <grpc._cython.cygrpc.SegregatedCall object at 0x0000023D527D1F40>
compression = None
credentials = None
metadata = None
request = name: "abaabb6d-4019-41ec-bd41-8679caf66087"
self = <grpc._channel._UnaryUnaryMultiCallable object at 0x0000023D527CC910>
state = <grpc._channel._RPCState object at 0x0000023D528AECF0>
timeout = None
wait_for_ready = None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
state = <grpc._channel._RPCState object at 0x0000023D528AECF0>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x0000023D527D1F40>
with_call = False, deadline = None
def _end_unary_response_blocking(
state: _RPCState,
call: cygrpc.SegregatedCall,
with_call: bool,
deadline: Optional[float],
) -> Union[ResponseType, Tuple[ResponseType, grpc.Call]]:
if state.code is grpc.StatusCode.OK:
if with_call:
rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
return state.response, rendezvous
return state.response
> raise _InactiveRpcError(state) # pytype: disable=not-instantiable
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E status = StatusCode.FAILED_PRECONDITION
E details = ""
E debug_error_string = "UNKNOWN:Error received from peer ipv6:%5B::1%5D:50313 {grpc_status:9, grpc_message:""}"
E >
call = <grpc._cython.cygrpc.SegregatedCall object at 0x0000023D527D1F40>
deadline = None
state = <grpc._channel._RPCState object at 0x0000023D528AECF0>
with_call = False
.tox\tests\Lib\site-packages\grpc\_channel.py:996: _InactiveRpcError |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Drop support for Python 3.8, add support for Python 3.13, and update dependencies.
Addresses #76, #28, #74
Types of changes
What types of changes does your code introduce?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Addresses #<issue_number>