Skip to content

Conversation

@WayneDroid
Copy link
Collaborator

@WayneDroid WayneDroid commented Jan 19, 2024

What does this Pull Request accomplish?

This PR is to add calibration info APIs support.
Work Item: https://dev.azure.com/ni/DevCentral/_workitems/edit/2611013

Why should this Pull Request be merged?

It provides support for calibration info reflection.

What testing has been done?

Regression test on test machine - passing.

tests/component/system/test_device.py::test___devices_with_same_name___compare___equal[library_init_kwargs] PASSED                                   [ 33%]
tests/component/system/test_device.py::test___devices_with_same_name___compare___equal[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not inst...) [ 33%]
tests/component/system/test_device.py::test___devices_with_different_names___compare___not_equal[library_init_kwargs] PASSED                         [ 33%]
tests/component/system/test_device.py::test___devices_with_different_names___compare___not_equal[grpc_init_kwargs] SKIPPED (NI gRPC Device Serve...) [ 33%]
tests/component/system/test_device.py::test___devices_with_same_name___hash___equal[library_init_kwargs] PASSED                                      [ 33%]
tests/component/system/test_device.py::test___devices_with_same_name___hash___equal[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not installed)  [ 33%]
tests/component/system/test_device.py::test___devices_with_different_names___hash___not_equal[library_init_kwargs] PASSED                            [ 33%]
tests/component/system/test_device.py::test___devices_with_different_names___hash___not_equal[grpc_init_kwargs] SKIPPED (NI gRPC Device Server n...) [ 33%]
tests/component/system/test_device.py::test___self_test_device___no_errors[library_init_kwargs] PASSED                                               [ 33%]
tests/component/system/test_device.py::test___self_test_device___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not installed)           [ 33%]
tests/component/system/test_device.py::test___restore_last_ext_cal_const___no_errors[library_init_kwargs] PASSED                                     [ 33%]
tests/component/system/test_device.py::test___restore_last_ext_cal_const___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not installed) [ 34%]
tests/component/system/test_device.py::test___self_cal___no_errors[library_init_kwargs] PASSED                                                       [ 34%]
tests/component/system/test_device.py::test___self_cal___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not installed)                   [ 34%]
tests/component/system/test_device_properties.py::test___constructed_device___get_property___returns_value[library_init_kwargs] PASSED               [ 34%]
tests/component/system/test_device_properties.py::test___constructed_device___get_property___returns_value[grpc_init_kwargs] SKIPPED (NI gRPC De...) [ 34%]
tests/component/system/test_device_properties.py::test___nonexistent_device___get_property___raises_invalid_device_id[library_init_kwargs] PASSED    [ 34%]
tests/component/system/test_device_properties.py::test___nonexistent_device___get_property___raises_invalid_device_id[grpc_init_kwargs] SKIPPED      [ 34%]
tests/component/system/test_device_properties.py::test___device___bool_property___returns_value[library_init_kwargs] PASSED                          [ 34%]
tests/component/system/test_device_properties.py::test___device___bool_property___returns_value[grpc_init_kwargs] SKIPPED (NI gRPC Device Server...) [ 34%]
tests/component/system/test_device_properties.py::test___device___float_property___returns_value[library_init_kwargs] PASSED                         [ 34%]
tests/component/system/test_device_properties.py::test___device___float_property___returns_value[grpc_init_kwargs] SKIPPED (NI gRPC Device Serve...) [ 34%]
tests/component/system/test_device_properties.py::test___device___uint_property___returns_value[library_init_kwargs] PASSED                          [ 34%]
tests/component/system/test_device_properties.py::test___device___uint_property___returns_value[grpc_init_kwargs] SKIPPED (NI gRPC Device Server...) [ 35%]
tests/component/system/test_device_properties.py::test___device___string_property___returns_value[library_init_kwargs] PASSED                        [ 35%]
tests/component/system/test_device_properties.py::test___device___string_property___returns_value[grpc_init_kwargs] SKIPPED (NI gRPC Device Serv...) [ 35%]
tests/component/system/test_device_properties.py::test___device___enum_property___returns_value[library_init_kwargs] PASSED                          [ 35%]
tests/component/system/test_device_properties.py::test___device___enum_property___returns_value[grpc_init_kwargs] SKIPPED (NI gRPC Device Server...) [ 35%]
tests/component/system/test_device_properties.py::test___device___list_of_float_property___returns_value[library_init_kwargs] PASSED                 [ 35%]
tests/component/system/test_device_properties.py::test___device___list_of_float_property___returns_value[grpc_init_kwargs] SKIPPED (NI gRPC Devi...) [ 35%]
tests/component/system/test_device_properties.py::test___device___list_of_enum_property___returns_value[library_init_kwargs] PASSED                  [ 35%]
tests/component/system/test_device_properties.py::test___device___list_of_enum_property___returns_value[grpc_init_kwargs] SKIPPED (NI gRPC Devic...) [ 35%]
tests/component/system/test_device_properties.py::test___device___list_of_uint_property___returns_value[library_init_kwargs] PASSED                  [ 35%]
tests/component/system/test_device_properties.py::test___device___list_of_uint_property___returns_value[grpc_init_kwargs] SKIPPED (NI gRPC Devic...) [ 35%]
tests/component/system/test_device_properties.py::test___device___get_deprecated_properties___reports_warnings[library_init_kwargs] PASSED           [ 35%]
tests/component/system/test_device_properties.py::test___device___get_deprecated_properties___reports_warnings[grpc_init_kwargs] SKIPPED (NI gRP...) [ 35%]
tests/component/system/test_device_properties.py::test___chassis___get_modules___returns_modules[library_init_kwargs] PASSED                         [ 36%]
tests/component/system/test_device_properties.py::test___chassis___get_modules___returns_modules[grpc_init_kwargs] SKIPPED (NI gRPC Device Serve...) [ 36%]
tests/component/system/test_device_properties.py::test___chassis___get_modules___shared_interpreter[library_init_kwargs] PASSED                      [ 36%]
tests/component/system/test_device_properties.py::test___chassis___get_modules___shared_interpreter[grpc_init_kwargs] SKIPPED (NI gRPC Device Se...) [ 36%]
tests/component/system/test_device_properties.py::test___module___get_chassis___returns_chassis[library_init_kwargs] PASSED                          [ 36%]
tests/component/system/test_device_properties.py::test___module___get_chassis___returns_chassis[grpc_init_kwargs] SKIPPED (NI gRPC Device Server...) [ 36%]
tests/component/system/test_device_properties.py::test___module___get_chassis___shared_interpreter[library_init_kwargs] PASSED                       [ 36%]
tests/component/system/test_device_properties.py::test___module___get_chassis___shared_interpreter[grpc_init_kwargs] SKIPPED (NI gRPC Device Ser...) [ 36%]
tests/component/system/test_device_properties.py::test___ext_cal_last_date_and_time___no_errors[library_init_kwargs] PASSED                          [ 36%]
tests/component/system/test_device_properties.py::test___ext_cal_last_date_and_time___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Server...) [ 36%]
tests/component/system/test_device_properties.py::test___self_cal_last_date_and_time___no_errors[library_init_kwargs] PASSED                         [ 36%]
tests/component/system/test_device_properties.py::test___self_cal_last_date_and_time___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Serve...) [ 36%]
tests/component/system/test_device_properties.py::test___device_supports_cal___no_errors[library_init_kwargs] PASSED                                 [ 36%]
tests/component/system/test_device_properties.py::test___device_supports_cal___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not in...) [ 37%]
tests/component/system/test_device_properties.py::test___cal_acc_connection_count__raises_attr_not_supported[library_init_kwargs] PASSED             [ 37%]
tests/component/system/test_device_properties.py::test___cal_acc_connection_count__raises_attr_not_supported[grpc_init_kwargs] SKIPPED (NI gRPC ...) [ 37%]
tests/component/system/test_device_properties.py::test___cal_recommended_acc_connection_count_limit___raises_attr_not_supported[library_init_kwargs] PASSED [ 37%]
tests/component/system/test_device_properties.py::test___cal_recommended_acc_connection_count_limit___raises_attr_not_supported[grpc_init_kwargs] SKIPPED [ 37%]
tests/component/system/test_device_properties.py::test___cal_user_defined_info___no_errors[library_init_kwargs] PASSED                               [ 37%]
tests/component/system/test_device_properties.py::test___cal_user_defined_info___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not ...) [ 37%]
tests/component/system/test_device_properties.py::test___cal_dev_temp___no_errors[library_init_kwargs] PASSED                                        [ 37%]
tests/component/system/test_device_properties.py::test___cal_dev_temp___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not installed)    [ 37%]
tests/component/system/test_device_properties.py::test___ext_cal_last_temp___no_errors[library_init_kwargs] PASSED                                   [ 37%]
tests/component/system/test_device_properties.py::test___ext_cal_last_temp___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not inst...) [ 37%]
tests/component/system/test_device_properties.py::test___ext_cal_recommended_interval___no_errors[library_init_kwargs] PASSED                        [ 37%]
tests/component/system/test_device_properties.py::test___ext_cal_recommended_interval___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Serv...) [ 38%]
tests/component/system/test_device_properties.py::test___self_cal_last_temp___no_errors[library_init_kwargs] PASSED                                  [ 38%]
tests/component/system/test_device_properties.py::test___self_cal_last_temp___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not ins...) [ 38%]
tests/component/system/test_device_properties.py::test___self_cal_supported___no_errors[library_init_kwargs] PASSED                                  [ 38%]
tests/component/system/test_device_properties.py::test___self_cal_supported___no_errors[grpc_init_kwargs] SKIPPED (NI gRPC Device Server not ins...) [ 38%]

Copy link
Collaborator

@zhindes zhindes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start!

Copy link
Collaborator

@zhindes zhindes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What you have so far looks good to me. I agree with Brad that the other properties should be generated. Also some formatting things that I think the PR will yell at you about. Otherwise you can run ni-python-styleguide or black to fix most of them.

@WayneDroid WayneDroid force-pushed the users/waynedroid/add_calibration_info_properties_support branch from 35551a8 to c202241 Compare January 23, 2024 06:14
Copy link
Collaborator

@bkeryan bkeryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggestions

Copy link
Collaborator

@zhindes zhindes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great once Brad's suggestion is in!

@WayneDroid
Copy link
Collaborator Author

@zhindes @bkeryan Any suggestion to resolve the docs build failure? Based on the error message, the pipeline is running Sphinx v4.5.0 whereas the sphinxcontrib.applehelp extension requires Sphinx v5.0.

https://readthedocs.org/projects/nidaqmx-python/builds/23394435/

@zhindes
Copy link
Collaborator

zhindes commented Feb 9, 2024

@zhindes @bkeryan Any suggestion to resolve the docs build failure? Based on the error message, the pipeline is running Sphinx v4.5.0 whereas the sphinxcontrib.applehelp extension requires Sphinx v5.0.

https://readthedocs.org/projects/nidaqmx-python/builds/23394435/

That's fixed in mainline. See #487. I think if you rebase your changes on latest master it will be resolved. I'm more worried about you system tests failures.

Copy link
Collaborator

@bkeryan bkeryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with suggestions

@WayneDroid WayneDroid force-pushed the users/waynedroid/add_calibration_info_properties_support branch from 3aca8b8 to 6a2d14f Compare February 18, 2024 16:00
@WayneDroid
Copy link
Collaborator Author

@zhindes @bkeryan Any suggestion to resolve the docs build failure? Based on the error message, the pipeline is running Sphinx v4.5.0 whereas the sphinxcontrib.applehelp extension requires Sphinx v5.0.
https://readthedocs.org/projects/nidaqmx-python/builds/23394435/

That's fixed in mainline. See #487. I think if you rebase your changes on latest master it will be resolved. I'm more worried about you system tests failures.

Thanks, rebase my branch to latest master resolves the docs build issue.
For the system test failure, it's caused by operation not supported by gRPC device server as what Brad commented. It's resolved after marking grpc_xfail on the test case.

@WayneDroid WayneDroid force-pushed the users/waynedroid/add_calibration_info_properties_support branch from 6a2d14f to 5a52db9 Compare February 20, 2024 03:18
@WayneDroid WayneDroid merged commit a7a3643 into ni:master Feb 21, 2024
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.

4 participants