Error in return type for most 'autorange' properties in nidcpower library
Open
Nobody has claimed this yet.
API
bug
nidcpower
- Dominant language
- Python
- Stars
- 128
- Forks
- 110
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 10
Description
Description of issue
In the code documentation, most of the "autorange"-related parameter are described as bool, which is wrong.
The correct type is int.
Steps to reproduce issue
``` python
import pytest
import nidcpower
@pytest.fixture
def smu() -> nidcpower.Session:
return nidcpower.Session(
resource_name="PXI1Slot2",
channels=None,
reset=True,
options={'range_check': True,
'simulate': True,
'driver_setup': {'Model': '4163', 'BoardType': 'PXIe'}},
independent_channels=True)
def test_wrong_type(smu):
assert isinstance(smu.autorange, bool)
def test_correct_type(smu):
assert isinstance(smu.autorange, int)
```
- Run pytest on the above script.
- The first test fails because an AssertiorError is raised.
- The second test passes.
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 with the nidcpower API documentation linked in the issue and inspect the autorange-related parameters, then run the provided pytest reproduction against a simulated nidcpower.Session. Done means the affected autorange properties are documented with the correct int return type and the reproduction still passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100