bluesky / event-model

data model for event-based data collection and analysis
https://blueskyproject.io/event-model
BSD 3-Clause "New" or "Revised" License
13 stars 30 forks source link

Add convenience methods and new warning to DocumentRouter #166

Closed jklynch closed 4 years ago

jklynch commented 4 years ago

This PR proposes two modifications to DocumentRouter:

The convenience methods are prefixed with get_ since DocumentRouter already defines start(name, doc) and descriptor(name, doc) but some other naming scheme might be better.

I realize now that the event_doc parameter for get_descriptor and get_stream_name should probably just be doc.

tacaswell commented 4 years ago

Needs tests and docstrings, but I'm :+1: on this.

This is very common book keeping and in the grand scheme of things relatively cheap. I'm still meh on the stream name helper, but won't argue over it.

jklynch commented 4 years ago

The latest commits have a proposal for a minimal change to RunRouter. The warning is still issued but the exception is re-raised.