-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add codegen support for using converters to convert parameter of type string sequence to comma-delimited string #1404
Add codegen support for using converters to convert parameter of type string sequence to comma-delimited string #1404
Conversation
… string sequence to comma-delimited string - Rename convert_repeated_capabilities_from_init() to convert_repeated_capabilities_without_prefix(). Other than its current use for option_string in init(), it will be used for indices in get_channel_names() (#1386) and for initial state parameters in apply_levels_and_timing() (#1391) - Update _get_ctype_variable_definition_snippet_for_string() to add case for string input with converter and special case for NOT using converter in init function
Codecov Report
@@ Coverage Diff @@
## master #1404 +/- ##
==========================================
+ Coverage 91.88% 91.90% +0.01%
==========================================
Files 20 20
Lines 3637 3642 +5
==========================================
+ Hits 3342 3347 +5
Misses 295 295
Continue to review full report at Codecov.
|
Without the special-case, converters will be called in `_init_function` unnecessarily. This is ok since the any kind of special-casing will add complexity without enough benefit. The redundant call to converters is not a big deal since it happens only once during session init.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good but we need to add an NI-FAKE test case specifically testing using a converter in this way in a parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think having a nifake test for the parameter would be nice, but I think the usage in the generated init function (not __init__
) also proves it is working.
Mark said: "I think having a nifake test for the parameter would be nice, but I think the usage in the generated init function (not init) also proves it is working."
- [ ] I've updated CHANGELOG.md if applicable.What does this Pull Request accomplish?
List issues fixed by this Pull Request below, if any.
What testing has been done?
Added new unit tests. Ran all unit tests. CI will run system tests.