Skip to content

Conversation

@batzuu
Copy link

@batzuu batzuu commented Nov 7, 2025

  • 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?

Fixes the codegen to properly handle functions with multiple array parameters that reference different size parameters:

  • Updates metadata_filters.py: Refactors the filter_parameters function to collect all size parameter names referenced by len-sized parameters into a len_size_parameter_names, replacing the previous single len_size_parameter approach. Removed assert to check if all size parameters are same from filter_len_parameters. Following this updated var names in default_method.py.mako and initialization_method.py.mako to reflect multiple possible size params.

  • Updates to nifake to enable testing: Details covered in testing section

Previously, it was assumed all len-mechanism arrays in a function shared the same size parameter. This change enables functions like CreateDeembeddingSparameterTableArray in NI-RFSG where frequencies uses frequenciesSize and sparameterTable uses sparameterTableSize.

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

Issue 2137: Fix size parameter handling for functions with parameters referencing multiple size parameters.
Additional PR needs to be raised to update NI-RFSG function metadata (CreateDeembeddingSparameterTableArray) to consume
these changes.

What testing has been done?

  • Added MultipleArraysDifferentSize function to nifake metadata with two arrays (valuesArray using valuesArraySize, and dataArray using dataArraySize) to test the change in filter param logic
  • Added unit test test_multiple_arrays_different_size in test_library_interpreter.py that verifies correct handling of multiple arrays with independent size parameters
  • Test validates that each array's length is properly calculated and passed with its corresponding size parameter (3 elements for valuesArray with valuesArraySize, and 5 elements for dataArray with dataArraySize)
  • All existing tests continue to pass.

@codecov-commenter
Copy link

codecov-commenter commented Nov 7, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.21%. Comparing base (7712396) to head (2700665).

Files with missing lines Patch % Lines
generated/nifake/nifake/_grpc_stub_interpreter.py 50.00% 1 Missing ⚠️
generated/nifake/nifake/session.py 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2138      +/-   ##
==========================================
- Coverage   81.72%   81.21%   -0.51%     
==========================================
  Files          29       53      +24     
  Lines        4115    14981   +10866     
==========================================
+ Hits         3363    12167    +8804     
- Misses        752     2814    +2062     
Flag Coverage Δ
codegenunittests ?
nidcpowersystemtests 85.50% <ø> (?)
nidcpowerunittests 89.53% <ø> (ø)
nidigitalunittests 68.44% <ø> (ø)
nidmmsystemtests 81.65% <ø> (?)
nifakeunittests 85.41% <60.00%> (-0.11%) ⬇️
nifgensystemtests 85.11% <ø> (?)
nimodinstsystemtests 73.85% <ø> (?)
nimodinstunittests 94.20% <ø> (ø)
nirfsgsystemtests 73.95% <ø> (?)
niscopesystemtests 84.94% <ø> (?)
niscopeunittests 43.20% <ø> (ø)
niswitchsystemtests 71.26% <ø> (?)
nitclksystemtests 94.87% <ø> (?)
nitclkunittests 98.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
generated/nifake/nifake/_grpc_stub_interpreter.py 82.80% <50.00%> (-0.27%) ⬇️
generated/nifake/nifake/session.py 77.43% <66.66%> (-0.07%) ⬇️

... and 45 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7712396...2700665. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants