ni / ni/measurement-plugin-python

Add list option in Measurement Client generator

Open
#904 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
21
Forks
20
Avg merge
1d 16h
Merged PRs (30d)
3

Description

Problem to Solve

It would be beneficial to view the list of registered measurements in the Measurement Plugin Client Generator. Please refer to this thread for more details.

Proposed Solution

  • Add a new option to create_client command.

    @optgroup.option(
        "-l",
        "--list-all-measurements",
        is_flag=True,
        help="Lists all registered measurements.",
    )
    
  • Use get_all_registered_measurement_info in _support.py to get the registered measurements from the Discovery Service.

    _, measurement_display_names = get_all_registered_measurement_info(discovery_client)
    print("\nList of registered measurements:")
    for index, display_name in enumerate(measurement_display_names, start=1):
          print(f"{index}. {display_name}")
    

AB#2863168

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the create_client command and the _support.py entry point for get_all_registered_measurement_info. Review how command options are defined and how the Discovery Service is accessed. Done means the new --list-all-measurements option lists registered measurement display names with their numbered output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.