{"action":"created","issue":{"url":"https://api.github.com/repos/NSLS-II/bluesky/issues/991","repository_url":"https://api.github.com/repos/NSLS-II/bluesky","labels_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/991/labels{/name}","comments_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/991/comments","events_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/991/events","html_url":"https://github.com/NSLS-II/bluesky/issues/991","id":299032089,"number":991,"title":"Rename create/save to open_event/close_event","user":{"login":"jrmlhermitte","id":705366,"avatar_url":"https://avatars2.githubusercontent.com/u/705366?v=4","gravatar_id":"","url":"https://api.github.com/users/jrmlhermitte","html_url":"https://github.com/jrmlhermitte","followers_url":"https://api.github.com/users/jrmlhermitte/followers","following_url":"https://api.github.com/users/jrmlhermitte/following{/other_user}","gists_url":"https://api.github.com/users/jrmlhermitte/gists{/gist_id}","starred_url":"https://api.github.com/users/jrmlhermitte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrmlhermitte/subscriptions","organizations_url":"https://api.github.com/users/jrmlhermitte/orgs","repos_url":"https://api.github.com/users/jrmlhermitte/repos","events_url":"https://api.github.com/users/jrmlhermitte/events{/privacy}","received_events_url":"https://api.github.com/users/jrmlhermitte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-02-21T16:13:30Z","updated_at":"2018-02-21T16:29:38Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"After discussion with @danielballan about events in general, he suggested that `bps.create` and `bps.save` be renamed to `bps.open_event` and `bps.close_event`.\r\nI think these make more sense and I second them for the following reasons:\r\n- `bps.create()` could be confused with the creation of a descriptor. Note that it only creates a descriptor on the first event, and otherwise generates events.\r\n- There are cases where we may want to alternate in the creation of events for different streams. I'll give an example we have where we want to have access to a filename before data has finished collecting for example (with pseudo code):\r\n```py\r\n# start triggering the detector\r\nbps.trigger(det, group=grp)\r\nbps.create(name='stream_primary')\r\n# read filename from some file plugin\r\nbps.read(det.fileplugin)\r\n# this emits filename for a long acquisition\r\nbps.save()\r\n# wait for a long data acquisition to complete\r\nbps.wait(group=grp)\r\nbps.create(name='primary')\r\n# now read the filename again, but also other stat plugins device may have\r\nbps.read(det)\r\nbps.save()\r\n```\r\n\r\nThe naming to `open_event` and `close_event` would help make this clearer. Any thoughts? Thanks!"},"comment":{"url":"https://api.github.com/repos/NSLS-II/bluesky/issues/comments/367384971","html_url":"https://github.com/NSLS-II/bluesky/issues/991#issuecomment-367384971","issue_url":"https://api.github.com/repos/NSLS-II/bluesky/issues/991","id":367384971,"user":{"login":"CJ-Wright","id":6740689,"avatar_url":"https://avatars3.githubusercontent.com/u/6740689?v=4","gravatar_id":"","url":"https://api.github.com/users/CJ-Wright","html_url":"https://github.com/CJ-Wright","followers_url":"https://api.github.com/users/CJ-Wright/followers","following_url":"https://api.github.com/users/CJ-Wright/following{/other_user}","gists_url":"https://api.github.com/users/CJ-Wright/gists{/gist_id}","starred_url":"https://api.github.com/users/CJ-Wright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJ-Wright/subscriptions","organizations_url":"https://api.github.com/users/CJ-Wright/orgs","repos_url":"https://api.github.com/users/CJ-Wright/repos","events_url":"https://api.github.com/users/CJ-Wright/events{/privacy}","received_events_url":"https://api.github.com/users/CJ-Wright/received_events","type":"User","site_admin":false},"created_at":"2018-02-21T16:29:38Z","updated_at":"2018-02-21T16:29:38Z","author_association":"CONTRIBUTOR","body":"I'm meh on this, the new names seem nicer but I don't interface with that level too much currently. @chiahaoliu may have a stronger opinion."}}
{"actor":{"display_login":"CJ-Wright"}}