[RSDK-9631] Add deprecation warnings to DiscoverComponents #818
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.
This PR adds warnings to client calls and Deprecation docstrings to the
discover_componentsAPI in the robot client. To my knowledge, this SDK does not have a server side implementation of this API.I also pre-emptively removed the tests that call this api - let me know if you'd rather keep those.
I don't usually contribute to the python sdk - so here are my local
uv run make testwarnings and failures - if they matter:============================================================== FAILURES =============================================================== ____________________________________________________ test_ndarrays_to_flat_tensors ____________________________________________________ @pytest.mark.filterwarnings("ignore::DeprecationWarning") def test_ndarrays_to_flat_tensors(): output = ndarrays_to_flat_tensors(MockMLModel.INTS_NDARRAYS) assert len(output.tensors) == 4 assert all(name in output.tensors.keys() for name in ["0", "1", "2", "3"]) assert type(output.tensors["0"].int8_tensor.data) is builtins.bytes bytes_buffer = output.tensors["0"].int8_tensor.data assert np.array_equal(np.frombuffer(bytes_buffer, dtype=np.int8).reshape(output.tensors["0"].shape), MockMLModel.INT8_NDARRAY) > assert np.array_equal(np.array(output.tensors["1"].int16_tensor.data, dtype=np.int16), MockMLModel.INT16_NDARRAY) E OverflowError: Python integer 4294967295 out of bounds for int16 tests/test_mlmodel_utils.py:56: OverflowError ========================================================== warnings summary =========================================================== tests/test_board.py::TestClient::test_stream_ticks /opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/asyncio/base_events.py:745: RuntimeWarning: coroutine method 'aclose' of 'BoardClient.stream_ticks.<locals>.read' was never awaited self._ready.clear() Enable tracemalloc to get traceback where the object was allocated. See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info. -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ======================================================= short test summary info ======================================================= FAILED tests/test_mlmodel_utils.py::test_ndarrays_to_flat_tensors - OverflowError: Python integer 4294967295 out of bounds for int16 ============================================== 1 failed, 645 passed, 1 warning in 12.27s ============================================== make: *** [test] Error 1