Skip to content

Conversation

@mjohanse-emr
Copy link
Contributor

@mjohanse-emr mjohanse-emr commented Aug 19, 2025

What does this Pull Request accomplish?

  • Adds the VectorConverter class
  • Adds unit tests for the VectorConverter
  • Removes duplicate unit tests for ScalarConverter. The deleted tests also exist in the ni.protobuf.types package.
  • Adds a Vector to the "all types" example
image

Why should this Pull Request be merged?

Implements parts of AB#3215001

What testing has been done?

  • All types example
  • Unit tests
  • mypy, pyright, styleguide.

Signed-off-by: Michael Johansen <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Aug 19, 2025

Test Results

   10 files  ± 0     10 suites  ±0   32s ⏱️ +8s
  246 tests  -  3    246 ✅  -  3  0 💤 ±0  0 ❌ ±0 
2 410 runs   - 30  2 410 ✅  - 30  0 💤 ±0  0 ❌ ±0 

Results for commit b7265cb. ± Comparison against base commit b6eafd7.

This pull request removes 9 and adds 6 tests. Note that renamed tests count towards both.
tests.unit.test_protobuf_type_conversion ‑ test___bool_scalar___convert___valid_bool_scalar_protobuf
tests.unit.test_protobuf_type_conversion ‑ test___bool_scalar_protobuf___convert___valid_bool_scalar
tests.unit.test_protobuf_type_conversion ‑ test___double_scalar_protobuf___convert___valid_float_scalar
tests.unit.test_protobuf_type_conversion ‑ test___float_scalar___convert___valid_double_scalar_protobuf
tests.unit.test_protobuf_type_conversion ‑ test___int32_scalar_protobuf___convert___valid_int_scalar
tests.unit.test_protobuf_type_conversion ‑ test___int_scalar___convert___valid_int32_scalar_protobuf
tests.unit.test_protobuf_type_conversion ‑ test___scalar_protobuf_units_unset___convert___python_units_blank
tests.unit.test_protobuf_type_conversion ‑ test___scalar_protobuf_value_unset___convert___throws_type_error
tests.unit.test_protobuf_type_conversion ‑ test___scalar_units_unset___convert___protobuf_units_blank
tests.unit.test_convert ‑ test___python_vector_object___to_any___valid_vector_proto
tests.unit.test_convert ‑ test___various_python_objects___get_best_matching_type___returns_correct_type_string[python_object55-nitypes.scalar.Scalar]
tests.unit.test_convert ‑ test___various_python_objects___get_best_matching_type___returns_correct_type_string[python_object56-nitypes.vector.Vector]
tests.unit.test_convert ‑ test___vector_proto___from_any___valid_python_vector
tests.unit.test_protobuf_type_conversion ‑ test___str_vector___convert___valid_string_vector_protobuf
tests.unit.test_protobuf_type_conversion ‑ test___string_vector_protobuf___convert___valid_str_vector

♻️ This comment has been updated with latest results.

Signed-off-by: Michael Johansen <[email protected]>
@mjohanse-emr mjohanse-emr marked this pull request as ready for review August 19, 2025 16:03
@mjohanse-emr mjohanse-emr merged commit cfea4c1 into main Aug 19, 2025
14 checks passed
@mjohanse-emr mjohanse-emr deleted the users/mjohanse/vector_converter branch August 19, 2025 17:11
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.

3 participants