Skip to content

nirfsg: Enable complex number support for gRPC and update system tests.#6

Open
rahur-NI wants to merge 39 commits intomasterfrom
nirfsgGrpcComplexNumberSupport
Open

nirfsg: Enable complex number support for gRPC and update system tests.#6
rahur-NI wants to merge 39 commits intomasterfrom
nirfsgGrpcComplexNumberSupport

Conversation

@rahur-NI
Copy link
Copy Markdown
Owner

  • This contribution adheres to CONTRIBUTING.md.
  • I've updated CHANGELOG.md if applicable.
  • I've added tests applicable for this pull request

What does this Pull Request accomplish?

  • Added gRPC generation support for numpy complex methods that are included in proto, instead of always generating NotImplemented paths. Used the newly created helper functions to make template concise.
  • Created below helper functions for handling gRPC specific logic.
    • does_function_use_complex_parameters() - Check if function uses complex arrays
    • get_grpc_complex_request_args_snippet() - Convert numpy arrays to gRPC protobuf format
    • get_grpc_response_info() - Normalize return snippets and response assignment
  • Updated _grpc_stub_interpreter.py.mako template to import nidevice_pb2 as grpc_complex_types only if complex numbers are used in the module.
  • Updated 'included_in_proto' in functions.py of niFake to generate the gRPC implementational changes in functions which has complex numpy values.
  • Added grpc_server_config.json file for nirfsg to include the address and port for server listening.

List issues fixed by this Pull Request below, if any.

What testing has been done?

  • Ensured the codegen modifications are as expected.
  • Added a new TestGrpc class in test_system_nirfsg.py to include gRPC-based system test session setup.
  • The existing system tests are passing when tested against TestLibrary and TestGrpc class included. A test case was moved from common path to TestLibrary class due to known defect in gRPC version. This will be fixed once the fix is merged into gRPC-device repo.

rahur-NI added 30 commits March 18, 2026 05:33
…t_get_all_named_waveform_names in test_system_nirfsg to common path for testing
- Add @pytest.mark.skipif decorator to TestGrpc class
- Add connectivity check with 20s timeout in grpc_channel fixture
- Keep test_get_all_named_waveform_names in TestLibrary for 32-bit coverage
@rahur-NI rahur-NI force-pushed the nirfsgGrpcComplexNumberSupport branch from f951952 to df2dade Compare March 31, 2026 16:02
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.

1 participant