`niswitch.Session` doesn't support specifying an `options` dictionary or driver setup string
Open
Nobody has claimed this yet.
niswitch
- Dominant language
- Python
- Stars
- 128
- Forks
- 110
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 10
Description
Description of issue
niswitch.Session doesn't support specifying an options dictionary like the other drivers. Instead, it has parameters for simulate and topology.
Impact:
- Enabling session-based simulation requires different code than for the other drivers. (Note: if it supported
options, you would still have to specify thetopologykey instead of themodelkey.) - Specifying options other than
simulateor driver setup keys other thantopologyis unsupported.
System report
python -c "import niswitch; niswitch.print_diagnostic_information()" output
OS:
Name: Windows
Version: 10.0.19045
Bits: 64
Driver:
Name: NI-SWITCH
Version: 22.8.0.49295
Module:
Name: niswitch
Version: 1.4.4
Python:
Version: 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
Bits: 64
Is_Venv: True
Installed Packages:
click==8.1.3
colorama==0.4.6
grpcio==1.54.0
hightime==0.2.1
mypy==1.2.0
mypy-extensions==1.0.0
ni-measurementlink-service==1.0.1
niswitch==1.4.4
pip==23.0.1
protobuf==4.22.3
pywin32==303
setuptools==67.6.1
tomli==2.0.1
typing-extensions==4.5.0
wheel==0.40.0
Steps to reproduce issue
>>> import niswitch
>>> session = niswitch.Session(resource_name="", options={"simulate": True, "driver_setup": {"topology": "2567/Independent"}})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() got an unexpected keyword argument 'options'
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
The entry point named is niswitch.Session; inspect its constructor and compare how other driver sessions accept options and driver_setup. Verify the desired simulation and topology inputs, then reproduce the shown call to confirm it is accepted without breaking existing simulate and topology behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100