-
Notifications
You must be signed in to change notification settings - Fork 15
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
The display_name
parameter is misleadingly named
#336
Comments
@bkeryan Although slightly misleading, this is functional. Can we treat it as a tech debt to avoid the >28d bug limit? |
This doesn't work because the positional parameter is still required.
|
@bkeryan Do you have any other ideas about how to fix this? It's been around for almost 4 months. |
We should rethink how we handle configuration/output names. It may be better to accept a user-friendly display name and sanitize it for use in protobuf. Or accept a protobuf-style snake_case name and automatically convert to "Sentence case" for the default naming in the UI. |
Bug Report
The
MeasurementService.configuration
andMeasurementService.output
methods have adisplay_name
parameter, which is not the display name but rather the Protobuf field name. The display name is provided by the UI file, and is not required to match the Protobuf field name.Repro or Code Sample
https://github.com/ni/measurementlink-python/blob/main/ni_measurementlink_service/measurement/service.py#L233
Expected Behavior
Parameter name correctly describes its function.
Current Behavior
Parameter name incorrectly describes its function.
Possible Solution
Rename parameter to
name
.Add a keyword-only parameter with the old name (
display_name
) which defaults to None. Ifdisplay_name
is specified, overridename
and generate a deprecation warning.Your Environment
ni-measurementlink-service
version: 1.0 through 1.2.0-dev0AB#2457655
The text was updated successfully, but these errors were encountered: