Feature: proxy attributes of remote parameters#244
Conversation
And comment remote.py about where this comes from
rather than just copying them
Reset model and restart instruments with each test case, rather than completely tearing down and rebuilding them each time.
we've got parameters and instruments all tested together here, and sometime we should probably separate these and test parameters separately, but for now it makes sense to combine these because they're all testing via instruments, and mostly RemoteInstruments.
…emote.py plus some edge case cleanup
|
@alexcjohnson |
No, this PR doesn't do that. It would be fairly easy to add functionality to a So to be concrete, # first some method/parameter/function that changes the parameters in the real instrument
ins.reconfigure(...)
# but the RemoteInstrument is unaware until you tell it to go look for changes
ins.update()
# now the RemoteInstrument is back in sync with the server copyBut to have But one problem I don't see any real solution to is if multiple processes connect to the instrument server, for example, main and a loop, maybe also a meta-instrument server. Only the one that initiated the change would have any way to know it should update the components. Anyway I'm happy to make an |
|
I would be more tha nhappy to call |
If something has changed on the server with the structure of the instrument, like new or different parameters, call update() to have this reflected in the RemoteInstrument. If just the component attribute values have changed this is not necessary, but if component existence has changed, or which attributes exist on the component has changed, you must manually call this.
|
@damazter I added Any other comments? |
|
thanks |
|
I think it makes no sense to wait to merge 💃 for me ! |
|
On a second look, docs is missing. See in line commets :D |
| Args: | ||
| new_id (int): The ID of this instrument on its server. | ||
| This is how the RemoteInstrument points its calls to the | ||
| correct server instrument when it calls the server. |
Also delete some commented out code.
|
@giulioungaretti thanks for checking the docs. OK now? |
|
@alexcjohnson awesome! 💃 |
Per discussion in https://github.com/qdev-dk/Qcodes/pull/139#issuecomment-227121328
Changes proposed in this pull request:
RemoteComponents from the server to the remote, proxy them (get/set/del). This means that:parameter.units = new_units, without worrying about whether the parameter is remote or not.setUpvssetUpClassetc - cuts off another ~7 secs while completing coverage of the new features as well as the rest of remote.py@MerlinSmiles @spauka @giulioungaretti