Skip to content

Conversation

@mjohanse-emr
Copy link
Contributor

What does this Pull Request accomplish?

  • Includes non-units extended properties in __repr__ so that the copy/pickle operations work as expected.

Why should this Pull Request be merged?

Fixes #211

What testing has been done?

Unit tests, mypy, pyright, styleguide

Signed-off-by: Michael Johansen <[email protected]>
Signed-off-by: Michael Johansen <[email protected]>
Signed-off-by: Michael Johansen <[email protected]>
Signed-off-by: Michael Johansen <[email protected]>
Signed-off-by: Michael Johansen <[email protected]>
Signed-off-by: Michael Johansen <[email protected]>
Signed-off-by: Michael Johansen <[email protected]>
…will fix these failures

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

github-actions bot commented Oct 20, 2025

Test Results

    56 files  ±  0      56 suites  ±0   25m 0s ⏱️ -33s
 2 256 tests + 15   2 256 ✅ + 15  0 💤 ±0  0 ❌ ±0 
64 590 runs  +435  64 590 ✅ +435  0 💤 ±0  0 ❌ ±0 

Results for commit 98d90cf. ± Comparison against base commit 98d2821.

This pull request removes 16 and adds 31 tests. Note that renamed tests count towards both.
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value0-nitypes.scalar.Scalar(value=False, units='')]
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value1-nitypes.scalar.Scalar(value=10, units='')]
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value2-nitypes.scalar.Scalar(value=20.0, units='')]
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value3-nitypes.scalar.Scalar(value='value', units='')]
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value7-nitypes.scalar.Scalar(value='value', units='')]
tests.unit.vector.test_vector ‑ test___various_values___repr___looks_ok[value0-nitypes.vector.Vector(values=[False, True], units='')]
tests.unit.vector.test_vector ‑ test___various_values___repr___looks_ok[value1-nitypes.vector.Vector(values=[10, 20], units='')]
tests.unit.vector.test_vector ‑ test___various_values___repr___looks_ok[value2-nitypes.vector.Vector(values=[20.0, 20.1], units='')]
tests.unit.vector.test_vector ‑ test___various_values___repr___looks_ok[value3-nitypes.vector.Vector(values=['a', 'b'], units='')]
tests.unit.vector.test_vector ‑ test___various_values___repr___looks_ok[value7-nitypes.vector.Vector(values=['a', 'b'], units='')]
…
tests.unit.scalar.test_scalar ‑ test___both_units_specified_unequal__create___raises_value_error
tests.unit.scalar.test_scalar ‑ test___units_only_specified_in_extended_properties__create___creates_with_units
tests.unit.scalar.test_scalar ‑ test___various_values___copy___makes_copy[value8]
tests.unit.scalar.test_scalar ‑ test___various_values___pickle_unpickle___makes_copy[value8]
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value0-nitypes.scalar.Scalar(value=False)]
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value1-nitypes.scalar.Scalar(value=10)]
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value2-nitypes.scalar.Scalar(value=20.0)]
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value3-nitypes.scalar.Scalar(value='value')]
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value7-nitypes.scalar.Scalar(value='value')]
tests.unit.scalar.test_scalar ‑ test___various_values___repr___looks_ok[value8-nitypes.scalar.Scalar(value=10, units='volts', extended_properties=nitypes.waveform.ExtendedPropertyDictionary({'Prop1': 'Value1', 'NI_UnitDescription': 'volts'}))]
…

♻️ This comment has been updated with latest results.

@mjohanse-emr mjohanse-emr marked this pull request as ready for review October 22, 2025 13:12
@mjohanse-emr mjohanse-emr requested a review from bkeryan October 23, 2025 15:51
Signed-off-by: Michael Johansen <[email protected]>
@mjohanse-emr mjohanse-emr requested a review from bkeryan October 29, 2025 13:48
@mjohanse-emr mjohanse-emr merged commit 61a0c13 into main Oct 30, 2025
40 checks passed
@mjohanse-emr mjohanse-emr deleted the users/mjohanse/fix_scalar_vector branch October 30, 2025 13:24
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.

pickle/copy for scalar/vector discards non-units extended properties

4 participants