Remove all use of **kwargs and handle the fallout
Removes all use of **kwargs
in PyJapc. To do so, I had to handle the fact that there is a difference in meaning between setting timingSelectorOverride
to something vs not setting it at all.
For example:
japc = pyjapc.PyJapc()
japc.getParam('device/property') # Param for 'device/property', selector = "LHC.USER.ALL"
japc.getParam('device/property', timingSelectorOverride=None) # Param for 'device/property', selector = ""
This change also honours the following bug (to be fixed in v3):
japc = pyjapc.PyJapc()
japc.subscribeParam('device/property', ...) # Param for 'device/property', selector = "LHC.USER.ALL"
japc.setSelector('SPS.USER.SFTPRO1')
japc.subscribeParam('device/property', ...) # Param for 'device/property', selector = "SPS.USER.SFTPRO1"
japc.clearSubscription('device/property') # Clears both
japc.clearSubscription('device/property', selector=None) # Clears both
japc.clearSubscription('device/property', selector='SPS.USER.SFTPRO1') # Clears neither
In PyJapc v3, I propose that this should become (to be discussed elsewhere, since this isn't the topic of the MR, just context):
japc.clearSubscription('device/property') # Clears any that match the current selector in PyJapc
japc.clearSubscription('device/property', selector=None) # Clears neither (None is the same as the '' selector (or raises!))
japc.clearSubscription('device/property', selector='SPS.USER.SFTPRO1') # Clears the specified.