What to do with channel instances after instrument is closed
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 459
- Forks
- 359
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 73
Description
What happens when an instrument is closed but there are still instances of its `InstrumentChannel` channels lying around?
I suggest that their methods should be protected against this in order to help in debugging possible weird scenarios.
For example, for the SR860:
```python
lockin = SR860("lockin", "GPIB0::4::INSTR")
data_channel = lockin.data_channel_3
lockin.close()
data_channel.<...>(...) # <-- what will this do? raise a cryptic error?
```
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
Begin at InstrumentChannel and the instrument close() path, reproducing with SR860, data_channel_3, and lockin.close(). Determine the current behavior and agree on what channel methods should do after closure; then locate or add the relevant test coverage. Done is a documented, intentional outcome for calls on retained channels, with tests covering it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100