NI-Digital: `get_channel_names()` should be a private method in `_SessionBase` as calling it with `session.channels` does not make sense
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 128
- Forks
- 110
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 10
Description
Description of issue
A user can use get_channel_names() as follows: my_session.channels[[0,1,2]].get_channel_names("0-2").
This is equivalent to no sense. It's equivalent in functionality to my_session.get_channel_names("0-2") but the channels[] part is ignored. It should not be allowed to call the method in this manner.
The reason this happens is that currently, nidigital renders its get_channel_names() method directly in _SessionBase as public method in order to support its get_pin_results_pin_information() method. One way of fixing this is to make it a private method instead.
Notes:
Address https://github.com/ni/nimi-python/pull/1757#discussion_r901923413
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
Start in generated/nidigital/nidigital/session.py around get_channel_names() and inspect _SessionBase, then read the linked pull request discussion. Confirm how get_pin_results_pin_information() uses the method; done means calls through session.channels are no longer exposed while that internal use remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100