Ensure that channel names don't have spaces#593
Conversation
Throws an exception if a channel name doesn't match a regular expression, one which doesn't include spaces. Fixes issue panoptes#205. Greatly expand the class level documentation in PanMessaging. Enforce that the value of a message is either a string or a dict (that was already effectively required, but now the failure message will be clear).
wtgee
left a comment
There was a problem hiding this comment.
Thanks for all the docs, WAY better! I'd like the change made about the preferred usage of create_subscriber with a channel but approving now.
|
|
||
| * PANCHAT (sent from POCS.say) | ||
| * PAWS-CMD (sent from PAWS websockets.py) | ||
| * POCS (sent by class POCS) |
There was a problem hiding this comment.
I don't recall what this is used for.
| * RUNNING (test_pocs.py) | ||
| * POCS-CMD (test_pocs.py) | ||
|
|
||
| The method receive_message will return messages from all channels; |
There was a problem hiding this comment.
While this is true, the intended usage is to pass the channel to the create_subcriber and then no filtering is needed by the user. This should be the recommended behaviour.
There was a problem hiding this comment.
AFTER this PR, we should consider using the name topic instead of channel or msg_type, which is the term used by zeromq. It'll make it easier for developers that are trying to understand this subsystem.
|
|
||
| Note: PAWS doesn't use PanMessaging, which will likely result in | ||
| problems as we evolve PanMessaging and the set of channels. | ||
| TODO: Figure out how to share PanMessaging with PAWS. |
There was a problem hiding this comment.
I think the answer is that we will be changing PAWS.
| v = str(v.isot).split('.')[0].replace('T', ' ') | ||
|
|
||
| # Hmmmm | ||
| # Hmmmm. What is going on here? We need some documentation. |
There was a problem hiding this comment.
Yup. I can't remember what case this was handling. I'll try to find out.
Throws an exception if a channel name doesn't match
a regular expression, one which doesn't include spaces.
Fixes issue #205.
Enforce that the value of a message is either a string
or a dict (that was already effectively required, but
now the failure message will be clear).
Greatly expand the class level documentation in PanMessaging.