ni / ni/measurement-plugin-python
The `display_name` parameter is misleadingly named
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 21
- Forks
- 20
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 3
Description
Bug Report
The MeasurementService.configuration and MeasurementService.output methods have a display_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
def configuration(
self,
display_name: str,
type: DataType,
default_value: Any,
*,
instrument_type: str = "",
enum_type: Optional[Type[Enum]] = None,
) -> Callable:
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. If display_name is specified, override name and generate a deprecation warning.
Your Environment
- OS & Device: Windows
ni-measurementlink-serviceversion: 1.0 through 1.2.0-dev0- MeasurementLink version: N/A
- Python version: N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read ni_measurementlink_service/measurement/service.py around line 233 and inspect both MeasurementService.configuration and MeasurementService.output. Rename the misleading parameter while preserving the old display_name keyword as a deprecated override, and verify both methods expose the corrected behavior and warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100